Coding style: consistency, documentation comments, formatting
This commit is contained in:
parent
4283d8b342
commit
e446acb045
|
@ -9,7 +9,6 @@ import { connect as reactReduxConnect } from 'react-redux';
|
|||
import { appNavigate } from '../../app';
|
||||
import { connect, disconnect } from '../../base/connection';
|
||||
import { DialogContainer } from '../../base/dialog';
|
||||
import { CalleeInfoContainer } from '../../invite';
|
||||
import { getParticipantCount } from '../../base/participants';
|
||||
import { Container, LoadingIndicator, TintedView } from '../../base/react';
|
||||
import { TestConnectionInfo } from '../../base/testing';
|
||||
|
@ -17,6 +16,7 @@ import { createDesiredLocalTracks } from '../../base/tracks';
|
|||
import { ConferenceNotification } from '../../calendar-sync';
|
||||
import { Filmstrip } from '../../filmstrip';
|
||||
import { LargeVideo } from '../../large-video';
|
||||
import { CalleeInfoContainer } from '../../invite';
|
||||
import { NotificationsContainer } from '../../notifications';
|
||||
import { setToolboxVisible, Toolbox } from '../../toolbox';
|
||||
|
||||
|
@ -30,8 +30,8 @@ type Props = {
|
|||
/**
|
||||
* The indicator which determines that we are still connecting to the
|
||||
* conference which includes establishing the XMPP connection and then
|
||||
* joining the room. If truthy, then an activity/loading indicator will
|
||||
* be rendered.
|
||||
* joining the room. If truthy, then an activity/loading indicator will be
|
||||
* rendered.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
|
@ -48,6 +48,7 @@ type Props = {
|
|||
* The handler which dispatches the (redux) action connect.
|
||||
*
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_onConnect: Function,
|
||||
|
||||
|
@ -55,6 +56,7 @@ type Props = {
|
|||
* The handler which dispatches the (redux) action disconnect.
|
||||
*
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_onDisconnect: Function,
|
||||
|
||||
|
@ -63,9 +65,9 @@ type Props = {
|
|||
* associated {@code Conference}.
|
||||
*
|
||||
* @private
|
||||
* @returns {boolean} As the associated conference is unconditionally
|
||||
* left and exiting the app while it renders a {@code Conference} is
|
||||
* undesired, {@code true} is always returned.
|
||||
* @returns {boolean} As the associated conference is unconditionally left
|
||||
* and exiting the app while it renders a {@code Conference} is undesired,
|
||||
* {@code true} is always returned.
|
||||
*/
|
||||
_onHardwareBackPress: Function,
|
||||
|
||||
|
@ -92,10 +94,13 @@ type Props = {
|
|||
_room: string,
|
||||
|
||||
/**
|
||||
* The handler which dispatches the (redux) action setToolboxVisible to
|
||||
* show/hide the Toolbox.
|
||||
* The handler which dispatches the (redux) action {@link setToolboxVisible}
|
||||
* to show/hide the {@link Toolbox}.
|
||||
*
|
||||
* @param {boolean} visible - {@code true} to show the {@code Toolbox} or
|
||||
* {@code false} to hide it.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_setToolboxVisible: Function,
|
||||
|
||||
|
@ -281,6 +286,7 @@ class Conference extends Component<Props> {
|
|||
*/}
|
||||
<Filmstrip />
|
||||
</View>
|
||||
|
||||
<TestConnectionInfo />
|
||||
|
||||
{
|
||||
|
@ -362,8 +368,8 @@ function _mapDispatchToProps(dispatch) {
|
|||
* Dispatches actions to create the desired local tracks and for
|
||||
* connecting to the conference.
|
||||
*
|
||||
* @returns {void}
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_onConnect() {
|
||||
dispatch(createDesiredLocalTracks());
|
||||
|
@ -373,8 +379,8 @@ function _mapDispatchToProps(dispatch) {
|
|||
/**
|
||||
* Dispatches an action disconnecting from the conference.
|
||||
*
|
||||
* @returns {void}
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_onDisconnect() {
|
||||
dispatch(disconnect());
|
||||
|
@ -395,12 +401,12 @@ function _mapDispatchToProps(dispatch) {
|
|||
},
|
||||
|
||||
/**
|
||||
* Dispatches an action changing the visibility of the Toolbox.
|
||||
* Dispatches an action changing the visibility of the {@link Toolbox}.
|
||||
*
|
||||
* @param {boolean} visible - True to show the Toolbox or false to hide
|
||||
* it.
|
||||
* @returns {void}
|
||||
* @param {boolean} visible - {@code true} to show the {@code Toolbox}
|
||||
* or {@code false} to hide it.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_setToolboxVisible(visible) {
|
||||
dispatch(setToolboxVisible(visible));
|
||||
|
|
|
@ -5,9 +5,9 @@ import React, { Component } from 'react';
|
|||
import { isFilmstripVisible } from '../../filmstrip';
|
||||
import { LocalRecordingLabel } from '../../local-recording';
|
||||
import { RecordingLabel } from '../../recording';
|
||||
import { TranscribingLabel } from '../../transcribing';
|
||||
import { shouldDisplayTileView } from '../../video-layout';
|
||||
import { VideoQualityLabel } from '../../video-quality';
|
||||
import { TranscribingLabel } from '../../transcribing/';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link AbstractLabels}.
|
||||
|
@ -15,13 +15,13 @@ import { TranscribingLabel } from '../../transcribing/';
|
|||
export type Props = {
|
||||
|
||||
/**
|
||||
* Whether or not the filmstrip is displayed with remote videos. Used to
|
||||
* determine display classes to set.
|
||||
* Whether the filmstrip is displayed with remote videos. Used to determine
|
||||
* display classes to set.
|
||||
*/
|
||||
_filmstripVisible: boolean,
|
||||
|
||||
/**
|
||||
* Whether or not the video quality label should be displayed.
|
||||
* Whether the video quality label should be displayed.
|
||||
*/
|
||||
_showVideoQualityLabel: boolean
|
||||
};
|
||||
|
@ -34,11 +34,23 @@ export type Props = {
|
|||
*/
|
||||
export default class AbstractLabels<P: Props, S> extends Component<P, S> {
|
||||
/**
|
||||
* Renders the {@code RecordingLabel} that is platform independent.
|
||||
* Renders the {@code LocalRecordingLabel}.
|
||||
*
|
||||
* @protected
|
||||
* @returns {React$Element}
|
||||
*/
|
||||
_renderLocalRecordingLabel() {
|
||||
return (
|
||||
<LocalRecordingLabel />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the {@code RecordingLabel} that is platform independent.
|
||||
*
|
||||
* @param {string} mode - The recording mode that this label is rendered
|
||||
* for.
|
||||
* @protected
|
||||
* @returns {React$Element}
|
||||
*/
|
||||
_renderRecordingLabel(mode: string) {
|
||||
|
@ -47,6 +59,18 @@ export default class AbstractLabels<P: Props, S> extends Component<P, S> {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the {@code TranscribingLabel}.
|
||||
*
|
||||
* @protected
|
||||
* @returns {React$Element}
|
||||
*/
|
||||
_renderTranscribingLabel() {
|
||||
return (
|
||||
<TranscribingLabel />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the {@code VideoQualityLabel} that is platform independent.
|
||||
*
|
||||
|
@ -58,37 +82,13 @@ export default class AbstractLabels<P: Props, S> extends Component<P, S> {
|
|||
<VideoQualityLabel />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the {@code TranscribingLabel}.
|
||||
*
|
||||
* @returns {React$Element}
|
||||
* @protected
|
||||
*/
|
||||
_renderTranscribingLabel() {
|
||||
return (
|
||||
<TranscribingLabel />
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the {@code LocalRecordingLabel}.
|
||||
* Maps (parts of) the redux state to the associated props of the {@link Labels}
|
||||
* {@code Component}.
|
||||
*
|
||||
* @returns {React$Element}
|
||||
* @protected
|
||||
*/
|
||||
_renderLocalRecordingLabel() {
|
||||
return (
|
||||
<LocalRecordingLabel />
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps (parts of) the Redux state to the associated props for the
|
||||
* {@code Labels} component.
|
||||
*
|
||||
* @param {Object} state - The Redux state.
|
||||
* @param {Object} state - The redux state.
|
||||
* @private
|
||||
* @returns {{
|
||||
* _filmstripVisible: boolean,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// @flow
|
||||
|
||||
import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -23,7 +24,7 @@ class Labels extends AbstractLabels<Props, *> {
|
|||
* @inheritdoc
|
||||
*/
|
||||
render() {
|
||||
const _wide = !isNarrowAspectRatio(this);
|
||||
const wide = !isNarrowAspectRatio(this);
|
||||
const { _filmstripVisible } = this.props;
|
||||
|
||||
return (
|
||||
|
@ -31,7 +32,7 @@ class Labels extends AbstractLabels<Props, *> {
|
|||
pointerEvents = 'box-none'
|
||||
style = { [
|
||||
styles.indicatorContainer,
|
||||
_wide && _filmstripVisible && styles.indicatorContainerWide
|
||||
wide && _filmstripVisible && styles.indicatorContainerWide
|
||||
] }>
|
||||
{
|
||||
this._renderRecordingLabel(
|
||||
|
@ -48,10 +49,9 @@ class Labels extends AbstractLabels<Props, *> {
|
|||
);
|
||||
}
|
||||
|
||||
_renderRecordingLabel: string => React$Element<*>
|
||||
|
||||
_renderVideoQualityLabel: () => React$Element<*>
|
||||
_renderRecordingLabel: string => React$Element<*>;
|
||||
|
||||
_renderVideoQualityLabel: () => React$Element<*>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,6 +76,4 @@ function _mapStateToProps(state) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(_mapStateToProps)(
|
||||
makeAspectRatioAware(Labels)
|
||||
);
|
||||
export default connect(_mapStateToProps)(makeAspectRatioAware(Labels));
|
||||
|
|
|
@ -23,7 +23,7 @@ type State = {
|
|||
* @type {boolean}
|
||||
*/
|
||||
filmstripBecomingVisible: boolean
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A container to hold video status labels, including recording status and
|
||||
|
@ -99,13 +99,13 @@ class Labels extends AbstractLabels<Props, State> {
|
|||
);
|
||||
}
|
||||
|
||||
_renderRecordingLabel: string => React$Element<*>
|
||||
_renderLocalRecordingLabel: () => React$Element<*>;
|
||||
|
||||
_renderVideoQualityLabel: () => React$Element<*>
|
||||
_renderRecordingLabel: string => React$Element<*>;
|
||||
|
||||
_renderTranscribingLabel: () => React$Element<*>
|
||||
_renderTranscribingLabel: () => React$Element<*>;
|
||||
|
||||
_renderLocalRecordingLabel: () => React$Element<*>
|
||||
_renderVideoQualityLabel: () => React$Element<*>;
|
||||
}
|
||||
|
||||
export default connect(_mapStateToProps)(Labels);
|
||||
|
|
Loading…
Reference in New Issue