Browse Source

Coding style: consistency, documentation comments, formatting

master
Lyubo Marinov 7 years ago
parent
commit
e446acb045

+ 20
- 14
react/features/conference/components/Conference.native.js View File

@@ -9,7 +9,6 @@ import { connect as reactReduxConnect } from 'react-redux';
9 9
 import { appNavigate } from '../../app';
10 10
 import { connect, disconnect } from '../../base/connection';
11 11
 import { DialogContainer } from '../../base/dialog';
12
-import { CalleeInfoContainer } from '../../invite';
13 12
 import { getParticipantCount } from '../../base/participants';
14 13
 import { Container, LoadingIndicator, TintedView } from '../../base/react';
15 14
 import { TestConnectionInfo } from '../../base/testing';
@@ -17,6 +16,7 @@ import { createDesiredLocalTracks } from '../../base/tracks';
17 16
 import { ConferenceNotification } from '../../calendar-sync';
18 17
 import { Filmstrip } from '../../filmstrip';
19 18
 import { LargeVideo } from '../../large-video';
19
+import { CalleeInfoContainer } from '../../invite';
20 20
 import { NotificationsContainer } from '../../notifications';
21 21
 import { setToolboxVisible, Toolbox } from '../../toolbox';
22 22
 
@@ -30,8 +30,8 @@ type Props = {
30 30
     /**
31 31
      * The indicator which determines that we are still connecting to the
32 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 36
      * @private
37 37
      */
@@ -48,6 +48,7 @@ type Props = {
48 48
      * The handler which dispatches the (redux) action connect.
49 49
      *
50 50
      * @private
51
+     * @returns {void}
51 52
      */
52 53
     _onConnect: Function,
53 54
 
@@ -55,6 +56,7 @@ type Props = {
55 56
      * The handler which dispatches the (redux) action disconnect.
56 57
      *
57 58
      * @private
59
+     * @returns {void}
58 60
      */
59 61
     _onDisconnect: Function,
60 62
 
@@ -63,9 +65,9 @@ type Props = {
63 65
      * associated {@code Conference}.
64 66
      *
65 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 72
     _onHardwareBackPress: Function,
71 73
 
@@ -92,10 +94,13 @@ type Props = {
92 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 102
      * @private
103
+     * @returns {void}
99 104
      */
100 105
     _setToolboxVisible: Function,
101 106
 
@@ -281,6 +286,7 @@ class Conference extends Component<Props> {
281 286
                       */}
282 287
                     <Filmstrip />
283 288
                 </View>
289
+
284 290
                 <TestConnectionInfo />
285 291
 
286 292
                 {
@@ -362,8 +368,8 @@ function _mapDispatchToProps(dispatch) {
362 368
          * Dispatches actions to create the desired local tracks and for
363 369
          * connecting to the conference.
364 370
          *
365
-         * @returns {void}
366 371
          * @private
372
+         * @returns {void}
367 373
          */
368 374
         _onConnect() {
369 375
             dispatch(createDesiredLocalTracks());
@@ -373,8 +379,8 @@ function _mapDispatchToProps(dispatch) {
373 379
         /**
374 380
          * Dispatches an action disconnecting from the conference.
375 381
          *
376
-         * @returns {void}
377 382
          * @private
383
+         * @returns {void}
378 384
          */
379 385
         _onDisconnect() {
380 386
             dispatch(disconnect());
@@ -395,12 +401,12 @@ function _mapDispatchToProps(dispatch) {
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 408
          * @private
409
+         * @returns {void}
404 410
          */
405 411
         _setToolboxVisible(visible) {
406 412
             dispatch(setToolboxVisible(visible));

+ 21
- 21
react/features/large-video/components/AbstractLabels.js View File

@@ -5,9 +5,9 @@ import React, { Component } from 'react';
5 5
 import { isFilmstripVisible } from '../../filmstrip';
6 6
 import { LocalRecordingLabel } from '../../local-recording';
7 7
 import { RecordingLabel } from '../../recording';
8
+import { TranscribingLabel } from '../../transcribing';
8 9
 import { shouldDisplayTileView } from '../../video-layout';
9 10
 import { VideoQualityLabel } from '../../video-quality';
10
-import { TranscribingLabel } from '../../transcribing/';
11 11
 
12 12
 /**
13 13
  * The type of the React {@code Component} props of {@link AbstractLabels}.
@@ -15,13 +15,13 @@ import { TranscribingLabel } from '../../transcribing/';
15 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 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 26
     _showVideoQualityLabel: boolean
27 27
 };
@@ -34,36 +34,36 @@ export type Props = {
34 34
  */
35 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 39
      * @protected
40
-     * @param {string} mode - The recording mode that this label is rendered
41
-     * for.
42 40
      * @returns {React$Element}
43 41
      */
44
-    _renderRecordingLabel(mode: string) {
42
+    _renderLocalRecordingLabel() {
45 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 53
      * @protected
54 54
      * @returns {React$Element}
55 55
      */
56
-    _renderVideoQualityLabel() {
56
+    _renderRecordingLabel(mode: string) {
57 57
         return (
58
-            <VideoQualityLabel />
58
+            <RecordingLabel mode = { mode } />
59 59
         );
60 60
     }
61 61
 
62 62
     /**
63 63
      * Renders the {@code TranscribingLabel}.
64 64
      *
65
-     * @returns {React$Element}
66 65
      * @protected
66
+     * @returns {React$Element}
67 67
      */
68 68
     _renderTranscribingLabel() {
69 69
         return (
@@ -72,23 +72,23 @@ export default class AbstractLabels<P: Props, S> extends Component<P, S> {
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 77
      * @protected
78
+     * @returns {React$Element}
79 79
      */
80
-    _renderLocalRecordingLabel() {
80
+    _renderVideoQualityLabel() {
81 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 92
  * @private
93 93
  * @returns {{
94 94
  *     _filmstripVisible: boolean,

+ 6
- 8
react/features/large-video/components/Labels.native.js View File

@@ -1,4 +1,5 @@
1 1
 // @flow
2
+
2 3
 import React from 'react';
3 4
 import { View } from 'react-native';
4 5
 import { connect } from 'react-redux';
@@ -23,7 +24,7 @@ class Labels extends AbstractLabels<Props, *> {
23 24
      * @inheritdoc
24 25
      */
25 26
     render() {
26
-        const _wide = !isNarrowAspectRatio(this);
27
+        const wide = !isNarrowAspectRatio(this);
27 28
         const { _filmstripVisible } = this.props;
28 29
 
29 30
         return (
@@ -31,7 +32,7 @@ class Labels extends AbstractLabels<Props, *> {
31 32
                 pointerEvents = 'box-none'
32 33
                 style = { [
33 34
                     styles.indicatorContainer,
34
-                    _wide && _filmstripVisible && styles.indicatorContainerWide
35
+                    wide && _filmstripVisible && styles.indicatorContainerWide
35 36
                 ] }>
36 37
                 {
37 38
                     this._renderRecordingLabel(
@@ -48,10 +49,9 @@ class Labels extends AbstractLabels<Props, *> {
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,6 +76,4 @@ function _mapStateToProps(state) {
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 View File

@@ -23,7 +23,7 @@ type State = {
23 23
      * @type {boolean}
24 24
      */
25 25
     filmstripBecomingVisible: boolean
26
-}
26
+};
27 27
 
28 28
 /**
29 29
  * A container to hold video status labels, including recording status and
@@ -99,13 +99,13 @@ class Labels extends AbstractLabels<Props, State> {
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 111
 export default connect(_mapStateToProps)(Labels);

Loading…
Cancel
Save