Explorar el Código

Coding style: consistency, documentation comments, formatting

master
Lyubo Marinov hace 7 años
padre
commit
e446acb045

+ 20
- 14
react/features/conference/components/Conference.native.js Ver fichero

9
 import { appNavigate } from '../../app';
9
 import { appNavigate } from '../../app';
10
 import { connect, disconnect } from '../../base/connection';
10
 import { connect, disconnect } from '../../base/connection';
11
 import { DialogContainer } from '../../base/dialog';
11
 import { DialogContainer } from '../../base/dialog';
12
-import { CalleeInfoContainer } from '../../invite';
13
 import { getParticipantCount } from '../../base/participants';
12
 import { getParticipantCount } from '../../base/participants';
14
 import { Container, LoadingIndicator, TintedView } from '../../base/react';
13
 import { Container, LoadingIndicator, TintedView } from '../../base/react';
15
 import { TestConnectionInfo } from '../../base/testing';
14
 import { TestConnectionInfo } from '../../base/testing';
17
 import { ConferenceNotification } from '../../calendar-sync';
16
 import { ConferenceNotification } from '../../calendar-sync';
18
 import { Filmstrip } from '../../filmstrip';
17
 import { Filmstrip } from '../../filmstrip';
19
 import { LargeVideo } from '../../large-video';
18
 import { LargeVideo } from '../../large-video';
19
+import { CalleeInfoContainer } from '../../invite';
20
 import { NotificationsContainer } from '../../notifications';
20
 import { NotificationsContainer } from '../../notifications';
21
 import { setToolboxVisible, Toolbox } from '../../toolbox';
21
 import { setToolboxVisible, Toolbox } from '../../toolbox';
22
 
22
 
30
     /**
30
     /**
31
      * The indicator which determines that we are still connecting to the
31
      * The indicator which determines that we are still connecting to the
32
      * conference which includes establishing the XMPP connection and then
32
      * conference which includes establishing the XMPP connection and then
33
-     * joining the room. If truthy, then an activity/loading indicator will
34
-     * be rendered.
33
+     * joining the room. If truthy, then an activity/loading indicator will be
34
+     * rendered.
35
      *
35
      *
36
      * @private
36
      * @private
37
      */
37
      */
48
      * The handler which dispatches the (redux) action connect.
48
      * The handler which dispatches the (redux) action connect.
49
      *
49
      *
50
      * @private
50
      * @private
51
+     * @returns {void}
51
      */
52
      */
52
     _onConnect: Function,
53
     _onConnect: Function,
53
 
54
 
55
      * The handler which dispatches the (redux) action disconnect.
56
      * The handler which dispatches the (redux) action disconnect.
56
      *
57
      *
57
      * @private
58
      * @private
59
+     * @returns {void}
58
      */
60
      */
59
     _onDisconnect: Function,
61
     _onDisconnect: Function,
60
 
62
 
63
      * associated {@code Conference}.
65
      * associated {@code Conference}.
64
      *
66
      *
65
      * @private
67
      * @private
66
-     * @returns {boolean} As the associated conference is unconditionally
67
-     * left and exiting the app while it renders a {@code Conference} is
68
-     * undesired, {@code true} is always returned.
68
+     * @returns {boolean} As the associated conference is unconditionally left
69
+     * and exiting the app while it renders a {@code Conference} is undesired,
70
+     * {@code true} is always returned.
69
      */
71
      */
70
     _onHardwareBackPress: Function,
72
     _onHardwareBackPress: Function,
71
 
73
 
92
     _room: string,
94
     _room: string,
93
 
95
 
94
     /**
96
     /**
95
-     * The handler which dispatches the (redux) action setToolboxVisible to
96
-     * show/hide the Toolbox.
97
+     * The handler which dispatches the (redux) action {@link setToolboxVisible}
98
+     * to show/hide the {@link Toolbox}.
97
      *
99
      *
100
+     * @param {boolean} visible - {@code true} to show the {@code Toolbox} or
101
+     * {@code false} to hide it.
98
      * @private
102
      * @private
103
+     * @returns {void}
99
      */
104
      */
100
     _setToolboxVisible: Function,
105
     _setToolboxVisible: Function,
101
 
106
 
281
                       */}
286
                       */}
282
                     <Filmstrip />
287
                     <Filmstrip />
283
                 </View>
288
                 </View>
289
+
284
                 <TestConnectionInfo />
290
                 <TestConnectionInfo />
285
 
291
 
286
                 {
292
                 {
362
          * Dispatches actions to create the desired local tracks and for
368
          * Dispatches actions to create the desired local tracks and for
363
          * connecting to the conference.
369
          * connecting to the conference.
364
          *
370
          *
365
-         * @returns {void}
366
          * @private
371
          * @private
372
+         * @returns {void}
367
          */
373
          */
368
         _onConnect() {
374
         _onConnect() {
369
             dispatch(createDesiredLocalTracks());
375
             dispatch(createDesiredLocalTracks());
373
         /**
379
         /**
374
          * Dispatches an action disconnecting from the conference.
380
          * Dispatches an action disconnecting from the conference.
375
          *
381
          *
376
-         * @returns {void}
377
          * @private
382
          * @private
383
+         * @returns {void}
378
          */
384
          */
379
         _onDisconnect() {
385
         _onDisconnect() {
380
             dispatch(disconnect());
386
             dispatch(disconnect());
395
         },
401
         },
396
 
402
 
397
         /**
403
         /**
398
-         * Dispatches an action changing the visibility of the Toolbox.
404
+         * Dispatches an action changing the visibility of the {@link Toolbox}.
399
          *
405
          *
400
-         * @param {boolean} visible - True to show the Toolbox or false to hide
401
-         * it.
402
-         * @returns {void}
406
+         * @param {boolean} visible - {@code true} to show the {@code Toolbox}
407
+         * or {@code false} to hide it.
403
          * @private
408
          * @private
409
+         * @returns {void}
404
          */
410
          */
405
         _setToolboxVisible(visible) {
411
         _setToolboxVisible(visible) {
406
             dispatch(setToolboxVisible(visible));
412
             dispatch(setToolboxVisible(visible));

+ 21
- 21
react/features/large-video/components/AbstractLabels.js Ver fichero

5
 import { isFilmstripVisible } from '../../filmstrip';
5
 import { isFilmstripVisible } from '../../filmstrip';
6
 import { LocalRecordingLabel } from '../../local-recording';
6
 import { LocalRecordingLabel } from '../../local-recording';
7
 import { RecordingLabel } from '../../recording';
7
 import { RecordingLabel } from '../../recording';
8
+import { TranscribingLabel } from '../../transcribing';
8
 import { shouldDisplayTileView } from '../../video-layout';
9
 import { shouldDisplayTileView } from '../../video-layout';
9
 import { VideoQualityLabel } from '../../video-quality';
10
 import { VideoQualityLabel } from '../../video-quality';
10
-import { TranscribingLabel } from '../../transcribing/';
11
 
11
 
12
 /**
12
 /**
13
  * The type of the React {@code Component} props of {@link AbstractLabels}.
13
  * The type of the React {@code Component} props of {@link AbstractLabels}.
15
 export type Props = {
15
 export type Props = {
16
 
16
 
17
     /**
17
     /**
18
-    * Whether or not the filmstrip is displayed with remote videos. Used to
19
-    * determine display classes to set.
20
-    */
18
+     * Whether the filmstrip is displayed with remote videos. Used to determine
19
+     * display classes to set.
20
+     */
21
     _filmstripVisible: boolean,
21
     _filmstripVisible: boolean,
22
 
22
 
23
     /**
23
     /**
24
-     * Whether or not the video quality label should be displayed.
24
+     * Whether the video quality label should be displayed.
25
      */
25
      */
26
     _showVideoQualityLabel: boolean
26
     _showVideoQualityLabel: boolean
27
 };
27
 };
34
  */
34
  */
35
 export default class AbstractLabels<P: Props, S> extends Component<P, S> {
35
 export default class AbstractLabels<P: Props, S> extends Component<P, S> {
36
     /**
36
     /**
37
-     * Renders the {@code RecordingLabel} that is platform independent.
37
+     * Renders the {@code LocalRecordingLabel}.
38
      *
38
      *
39
      * @protected
39
      * @protected
40
-     * @param {string} mode - The recording mode that this label is rendered
41
-     * for.
42
      * @returns {React$Element}
40
      * @returns {React$Element}
43
      */
41
      */
44
-    _renderRecordingLabel(mode: string) {
42
+    _renderLocalRecordingLabel() {
45
         return (
43
         return (
46
-            <RecordingLabel mode = { mode } />
44
+            <LocalRecordingLabel />
47
         );
45
         );
48
     }
46
     }
49
 
47
 
50
     /**
48
     /**
51
-     * Renders the {@code VideoQualityLabel} that is platform independent.
49
+     * Renders the {@code RecordingLabel} that is platform independent.
52
      *
50
      *
51
+     * @param {string} mode - The recording mode that this label is rendered
52
+     * for.
53
      * @protected
53
      * @protected
54
      * @returns {React$Element}
54
      * @returns {React$Element}
55
      */
55
      */
56
-    _renderVideoQualityLabel() {
56
+    _renderRecordingLabel(mode: string) {
57
         return (
57
         return (
58
-            <VideoQualityLabel />
58
+            <RecordingLabel mode = { mode } />
59
         );
59
         );
60
     }
60
     }
61
 
61
 
62
     /**
62
     /**
63
      * Renders the {@code TranscribingLabel}.
63
      * Renders the {@code TranscribingLabel}.
64
      *
64
      *
65
-     * @returns {React$Element}
66
      * @protected
65
      * @protected
66
+     * @returns {React$Element}
67
      */
67
      */
68
     _renderTranscribingLabel() {
68
     _renderTranscribingLabel() {
69
         return (
69
         return (
72
     }
72
     }
73
 
73
 
74
     /**
74
     /**
75
-     * Renders the {@code LocalRecordingLabel}.
75
+     * Renders the {@code VideoQualityLabel} that is platform independent.
76
      *
76
      *
77
-     * @returns {React$Element}
78
      * @protected
77
      * @protected
78
+     * @returns {React$Element}
79
      */
79
      */
80
-    _renderLocalRecordingLabel() {
80
+    _renderVideoQualityLabel() {
81
         return (
81
         return (
82
-            <LocalRecordingLabel />
82
+            <VideoQualityLabel />
83
         );
83
         );
84
     }
84
     }
85
 }
85
 }
86
 
86
 
87
 /**
87
 /**
88
- * Maps (parts of) the Redux state to the associated props for the
89
- * {@code Labels} component.
88
+ * Maps (parts of) the redux state to the associated props of the {@link Labels}
89
+ * {@code Component}.
90
  *
90
  *
91
- * @param {Object} state - The Redux state.
91
+ * @param {Object} state - The redux state.
92
  * @private
92
  * @private
93
  * @returns {{
93
  * @returns {{
94
  *     _filmstripVisible: boolean,
94
  *     _filmstripVisible: boolean,

+ 6
- 8
react/features/large-video/components/Labels.native.js Ver fichero

1
 // @flow
1
 // @flow
2
+
2
 import React from 'react';
3
 import React from 'react';
3
 import { View } from 'react-native';
4
 import { View } from 'react-native';
4
 import { connect } from 'react-redux';
5
 import { connect } from 'react-redux';
23
      * @inheritdoc
24
      * @inheritdoc
24
      */
25
      */
25
     render() {
26
     render() {
26
-        const _wide = !isNarrowAspectRatio(this);
27
+        const wide = !isNarrowAspectRatio(this);
27
         const { _filmstripVisible } = this.props;
28
         const { _filmstripVisible } = this.props;
28
 
29
 
29
         return (
30
         return (
31
                 pointerEvents = 'box-none'
32
                 pointerEvents = 'box-none'
32
                 style = { [
33
                 style = { [
33
                     styles.indicatorContainer,
34
                     styles.indicatorContainer,
34
-                    _wide && _filmstripVisible && styles.indicatorContainerWide
35
+                    wide && _filmstripVisible && styles.indicatorContainerWide
35
                 ] }>
36
                 ] }>
36
                 {
37
                 {
37
                     this._renderRecordingLabel(
38
                     this._renderRecordingLabel(
48
         );
49
         );
49
     }
50
     }
50
 
51
 
51
-    _renderRecordingLabel: string => React$Element<*>
52
-
53
-    _renderVideoQualityLabel: () => React$Element<*>
52
+    _renderRecordingLabel: string => React$Element<*>;
54
 
53
 
54
+    _renderVideoQualityLabel: () => React$Element<*>;
55
 }
55
 }
56
 
56
 
57
 /**
57
 /**
76
     };
76
     };
77
 }
77
 }
78
 
78
 
79
-export default connect(_mapStateToProps)(
80
-    makeAspectRatioAware(Labels)
81
-);
79
+export default connect(_mapStateToProps)(makeAspectRatioAware(Labels));

+ 5
- 5
react/features/large-video/components/Labels.web.js Ver fichero

23
      * @type {boolean}
23
      * @type {boolean}
24
      */
24
      */
25
     filmstripBecomingVisible: boolean
25
     filmstripBecomingVisible: boolean
26
-}
26
+};
27
 
27
 
28
 /**
28
 /**
29
  * A container to hold video status labels, including recording status and
29
  * A container to hold video status labels, including recording status and
99
         );
99
         );
100
     }
100
     }
101
 
101
 
102
-    _renderRecordingLabel: string => React$Element<*>
102
+    _renderLocalRecordingLabel: () => React$Element<*>;
103
 
103
 
104
-    _renderVideoQualityLabel: () => React$Element<*>
104
+    _renderRecordingLabel: string => React$Element<*>;
105
 
105
 
106
-    _renderTranscribingLabel: () => React$Element<*>
106
+    _renderTranscribingLabel: () => React$Element<*>;
107
 
107
 
108
-    _renderLocalRecordingLabel: () => React$Element<*>
108
+    _renderVideoQualityLabel: () => React$Element<*>;
109
 }
109
 }
110
 
110
 
111
 export default connect(_mapStateToProps)(Labels);
111
 export default connect(_mapStateToProps)(Labels);

Loading…
Cancelar
Guardar