瀏覽代碼

Coding style: consistent naming, one name per abstraction

Instead of having visible and visibility and setToolboxVisible and
setFilmstripVisibility, have only visible as a name.
master
Lyubo Marinov 7 年之前
父節點
當前提交
aa314c10ac

+ 2
- 2
modules/UI/videolayout/Filmstrip.js 查看文件

1
 /* global $, APP, interfaceConfig */
1
 /* global $, APP, interfaceConfig */
2
 
2
 
3
-import { setFilmstripVisibility } from '../../../react/features/filmstrip';
3
+import { setFilmstripVisible } from '../../../react/features/filmstrip';
4
 
4
 
5
 import UIEvents from '../../../service/UI/UIEvents';
5
 import UIEvents from '../../../service/UI/UIEvents';
6
 import UIUtil from '../util/UIUtil';
6
 import UIUtil from '../util/UIUtil';
183
                 UIEvents.TOGGLED_FILMSTRIP,
183
                 UIEvents.TOGGLED_FILMSTRIP,
184
                 !wasFilmstripVisible);
184
                 !wasFilmstripVisible);
185
         }
185
         }
186
-        APP.store.dispatch(setFilmstripVisibility(!wasFilmstripVisible));
186
+        APP.store.dispatch(setFilmstripVisible(!wasFilmstripVisible));
187
     },
187
     },
188
 
188
 
189
     /**
189
     /**

+ 4
- 4
react/features/filmstrip/actionTypes.js 查看文件

1
 /**
1
 /**
2
- * The type of the action which sets whether or not the filmstrip is being
2
+ * The type of (redux) action which sets whether or not the filmstrip is being
3
  * hovered with the cursor.
3
  * hovered with the cursor.
4
  *
4
  *
5
  * {
5
  * {
10
 export const SET_FILMSTRIP_HOVERED = Symbol('SET_FILMSTRIP_HOVERED');
10
 export const SET_FILMSTRIP_HOVERED = Symbol('SET_FILMSTRIP_HOVERED');
11
 
11
 
12
 /**
12
 /**
13
- * The type of action sets the visibility of the entire filmstrip.
13
+ * The type of (redux) action which sets the visibility of the filmstrip.
14
  *
14
  *
15
  * {
15
  * {
16
- *     type: SET_FILMSTRIP_VISIBILITY,
16
+ *     type: SET_FILMSTRIP_VISIBLE,
17
  *     visible: boolean
17
  *     visible: boolean
18
  * }
18
  * }
19
  */
19
  */
20
-export const SET_FILMSTRIP_VISIBILITY = Symbol('SET_FILMSTRIP_VISIBILITY');
20
+export const SET_FILMSTRIP_VISIBLE = Symbol('SET_FILMSTRIP_VISIBLE');

+ 6
- 6
react/features/filmstrip/actions.js 查看文件

1
 import {
1
 import {
2
     SET_FILMSTRIP_HOVERED,
2
     SET_FILMSTRIP_HOVERED,
3
-    SET_FILMSTRIP_VISIBILITY
3
+    SET_FILMSTRIP_VISIBLE
4
 } from './actionTypes';
4
 } from './actionTypes';
5
 
5
 
6
 /**
6
 /**
21
 }
21
 }
22
 
22
 
23
 /**
23
 /**
24
- * Sets if the entire filmstrip should be visible.
24
+ * Sets if the filmstrip should be visible.
25
  *
25
  *
26
- * @param {boolean} visible - Whether not the filmstrip is visible.
26
+ * @param {boolean} visible - Whether the filmstrip should be visible.
27
  * @returns {{
27
  * @returns {{
28
- *     type: SET_FILMSTRIP_VISIBILITY,
28
+ *     type: SET_FILMSTRIP_VISIBLE,
29
  *     visible: boolean
29
  *     visible: boolean
30
  * }}
30
  * }}
31
  */
31
  */
32
-export function setFilmstripVisibility(visible) {
32
+export function setFilmstripVisible(visible) {
33
     return {
33
     return {
34
-        type: SET_FILMSTRIP_VISIBILITY,
34
+        type: SET_FILMSTRIP_VISIBLE,
35
         visible
35
         visible
36
     };
36
     };
37
 }
37
 }

+ 3
- 5
react/features/filmstrip/reducer.js 查看文件

1
 import { ReducerRegistry } from '../base/redux';
1
 import { ReducerRegistry } from '../base/redux';
2
-import {
3
-    SET_FILMSTRIP_HOVERED,
4
-    SET_FILMSTRIP_VISIBILITY
5
-} from './actionTypes';
2
+
3
+import { SET_FILMSTRIP_HOVERED, SET_FILMSTRIP_VISIBLE } from './actionTypes';
6
 
4
 
7
 const DEFAULT_STATE = {
5
 const DEFAULT_STATE = {
8
     visible: true
6
     visible: true
18
                 hovered: action.hovered
16
                 hovered: action.hovered
19
             };
17
             };
20
 
18
 
21
-        case SET_FILMSTRIP_VISIBILITY:
19
+        case SET_FILMSTRIP_VISIBLE:
22
             return {
20
             return {
23
                 ...state,
21
                 ...state,
24
                 visible: action.visible
22
                 visible: action.visible

Loading…
取消
儲存