Kaynağa Gözat

Fixes jsdocs

j8
Lyubo Marinov 8 yıl önce
ebeveyn
işleme
e7fc4739c4

+ 6
- 6
react/features/toolbox/components/AbstractToolbarButton.js Dosyayı Görüntüle

@@ -1,7 +1,7 @@
1 1
 import React, { Component } from 'react';
2 2
 
3 3
 /**
4
- * Abstract (base) class for a button in Toolbar.
4
+ * Abstract (base) class for a button in {@link Toolbar}.
5 5
  *
6 6
  * @abstract
7 7
  */
@@ -13,12 +13,12 @@ export default class AbstractToolbarButton extends Component {
13 13
      */
14 14
     static propTypes = {
15 15
         /**
16
-         * The name of the Icon of this AbstractToolbarButton.
16
+         * The name of the Icon of this {@code AbstractToolbarButton}.
17 17
          */
18 18
         iconName: React.PropTypes.string,
19 19
 
20 20
         /**
21
-         * The style of the Icon of this AbstractToolbarButton.
21
+         * The style of the Icon of this {@code AbstractToolbarButton}.
22 22
          */
23 23
         iconStyle: React.PropTypes.object,
24 24
 
@@ -28,7 +28,7 @@ export default class AbstractToolbarButton extends Component {
28 28
         onClick: React.PropTypes.func,
29 29
 
30 30
         /**
31
-         * Toolbar button styles.
31
+         * {@code AbstractToolbarButton} styles.
32 32
          */
33 33
         style:
34 34
             React.PropTypes.oneOfType([
@@ -53,12 +53,12 @@ export default class AbstractToolbarButton extends Component {
53 53
     }
54 54
 
55 55
     /**
56
-     * Renders the icon of this Toolbar button.
56
+     * Renders the icon of this {@code AbstractToolbarButton}.
57 57
      *
58 58
      * @param {string|ReactClass} type - The React Component type of the icon to
59 59
      * be rendered.
60 60
      * @protected
61
-     * @returns {ReactElement} The icon of this Toolbar button.
61
+     * @returns {ReactElement} The icon of this {@code AbstractToolbarButton}.
62 62
      */
63 63
     _renderIcon(type) {
64 64
         const props = {};

+ 6
- 6
react/features/toolbox/components/ToolbarButton.native.js Dosyayı Görüntüle

@@ -7,13 +7,13 @@ import { Icon } from '../../base/font-icons';
7 7
 import AbstractToolbarButton from './AbstractToolbarButton';
8 8
 
9 9
 /**
10
- * Represents a button in Toolbar on React Native.
10
+ * Represents a button in {@link Toolbar} on React Native.
11 11
  *
12 12
  * @extends AbstractToolbarButton
13 13
  */
14 14
 class ToolbarButton extends AbstractToolbarButton {
15 15
     /**
16
-     * ToolbarButton component's property types.
16
+     * {@code ToolbarButton} component's property types.
17 17
      *
18 18
      * @static
19 19
      */
@@ -21,18 +21,18 @@ class ToolbarButton extends AbstractToolbarButton {
21 21
         ...AbstractToolbarButton.propTypes,
22 22
 
23 23
         /**
24
-         * Indicates if this button is disabled or not.
24
+         * Indicates whether this {@code ToolbarButton} is disabled.
25 25
          */
26 26
         disabled: React.PropTypes.bool
27 27
     };
28 28
 
29 29
     /**
30
-     * Renders the button of this Toolbar button.
30
+     * Renders the button of this {@code ToolbarButton}.
31 31
      *
32 32
      * @param {Object} children - The children, if any, to be rendered inside
33
-     * the button. Presumably, contains the icon of this Toolbar button.
33
+     * the button. Presumably, contains the icon of this {@code ToolbarButton}.
34 34
      * @protected
35
-     * @returns {ReactElement} The button of this Toolbar button.
35
+     * @returns {ReactElement} The button of this {@code ToolbarButton}.
36 36
      */
37 37
     _renderButton(children) {
38 38
         const props = {};

+ 1
- 2
react/features/toolbox/components/Toolbox.native.js Dosyayı Görüntüle

@@ -154,7 +154,6 @@ class Toolbox extends Component {
154 154
     _renderPrimaryToolbar() {
155 155
         const audioButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.AUDIO);
156 156
         const videoButtonStyles = this._getMuteButtonStyles(MEDIA_TYPE.VIDEO);
157
-        const { _audioOnly: audioOnly } = this.props;
158 157
 
159 158
         /* eslint-disable react/jsx-handler-names */
160 159
 
@@ -172,7 +171,7 @@ class Toolbox extends Component {
172 171
                     style = { styles.hangup }
173 172
                     underlayColor = { ColorPalette.buttonUnderlay } />
174 173
                 <ToolbarButton
175
-                    disabled = { audioOnly }
174
+                    disabled = { this.props._audioOnly }
176 175
                     iconName = { videoButtonStyles.iconName }
177 176
                     iconStyle = { videoButtonStyles.iconStyle }
178 177
                     onClick = { this.props._onToggleVideo }

+ 8
- 6
react/features/toolbox/functions.native.js Dosyayı Görüntüle

@@ -7,9 +7,9 @@ import { toggleAudioMuted, toggleVideoMuted } from '../base/media';
7 7
 import { getLocalAudioTrack, getLocalVideoTrack } from '../base/tracks';
8 8
 
9 9
 /**
10
- * Maps (redux) actions to React component props.
10
+ * Maps redux actions to {@link Toolbox} (React {@code Component}) props.
11 11
  *
12
- * @param {Function} dispatch - Redux action dispatcher.
12
+ * @param {Function} dispatch - The redux {@code dispatch} function.
13 13
  * @returns {{
14 14
  *     _onHangup: Function,
15 15
  *     _onToggleAudio: Function,
@@ -61,9 +61,11 @@ export function abstractMapDispatchToProps(dispatch: Dispatch<*>): Object {
61 61
 }
62 62
 
63 63
 /**
64
- * Maps parts of media state to component props.
64
+ * Maps parts of the redux state to {@link Toolbox} (React {@code Component})
65
+ * props.
65 66
  *
66
- * @param {Object} state - Redux state.
67
+ * @param {Object} state - The redux state of which parts are to be mapped to
68
+ * {@code Toolbox} props.
67 69
  * @protected
68 70
  * @returns {{
69 71
  *     _audioMuted: boolean,
@@ -80,7 +82,7 @@ export function abstractMapStateToProps(state: Object): Object {
80 82
 
81 83
     return {
82 84
         /**
83
-         * Flag showing that audio is muted.
85
+         * Flag showing whether audio is muted.
84 86
          *
85 87
          * @protected
86 88
          * @type {boolean}
@@ -106,7 +108,7 @@ export function abstractMapStateToProps(state: Object): Object {
106 108
 }
107 109
 
108 110
 /**
109
- * Returns the button object corresponding to the given buttonName.
111
+ * Returns the button object corresponding to a specific {@code buttonName}.
110 112
  *
111 113
  * @param {string} buttonName - The name of the button.
112 114
  * @param {Object} state - The current state.

+ 10
- 12
react/features/welcome/components/AbstractWelcomePage.js Dosyayı Görüntüle

@@ -14,7 +14,7 @@ import { generateRoomWithoutSeparator } from '../roomnameGenerator';
14 14
  */
15 15
 export class AbstractWelcomePage extends Component {
16 16
     /**
17
-     * AbstractWelcomePage component's property types.
17
+     * {@code AbstractWelcomePage} component's property types.
18 18
      *
19 19
      * @static
20 20
      */
@@ -25,10 +25,10 @@ export class AbstractWelcomePage extends Component {
25 25
     };
26 26
 
27 27
     /**
28
-     * Initializes a new AbstractWelcomePage instance, including the initial
29
-     * state of the room name input.
28
+     * Initializes a new {@code AbstractWelcomePage} instance.
30 29
      *
31
-     * @param {Object} props - Component properties.
30
+     * @param {Object} props - The React {@code Component} props to initialize
31
+     * the new {@code AbstractWelcomePage} instance with.
32 32
      */
33 33
     constructor(props) {
34 34
         super(props);
@@ -37,15 +37,15 @@ export class AbstractWelcomePage extends Component {
37 37
          * Save room name into component's local state.
38 38
          *
39 39
          * @type {Object}
40
-         * @property {number|null} animateTimeoutId - Identificator for
41
-         * letter animation timeout.
40
+         * @property {number|null} animateTimeoutId - Identifier of the letter
41
+         * animation timeout.
42 42
          * @property {string} generatedRoomname - Automatically generated
43 43
          * room name.
44 44
          * @property {string} room - Room name.
45 45
          * @property {string} roomPlaceholder - Room placeholder
46 46
          * that's used as a placeholder for input.
47
-         * @property {nubmer|null} updateTimeoutId - Identificator for
48
-         * updating generated room name.
47
+         * @property {nubmer|null} updateTimeoutId - Identifier of the timeout
48
+         * updating the generated room name.
49 49
          */
50 50
         this.state = {
51 51
             animateTimeoutId: null,
@@ -55,7 +55,7 @@ export class AbstractWelcomePage extends Component {
55 55
             updateTimeoutId: null
56 56
         };
57 57
 
58
-        // Bind event handlers so they are only bound once for every instance.
58
+        // Bind event handlers so they are only bound once per instance.
59 59
         this._animateRoomnameChanging
60 60
             = this._animateRoomnameChanging.bind(this);
61 61
         this._onJoin = this._onJoin.bind(this);
@@ -143,9 +143,7 @@ export class AbstractWelcomePage extends Component {
143 143
     _onJoin() {
144 144
         const room = this.state.room || this.state.generatedRoomname;
145 145
 
146
-        if (room) {
147
-            this.props.dispatch(appNavigate(room));
148
-        }
146
+        room && this.props.dispatch(appNavigate(room));
149 147
     }
150 148
 
151 149
     /**

Loading…
İptal
Kaydet