Browse Source

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 years ago
parent
commit
aa314c10ac

+ 2
- 2
modules/UI/videolayout/Filmstrip.js View File

@@ -1,6 +1,6 @@
1 1
 /* global $, APP, interfaceConfig */
2 2
 
3
-import { setFilmstripVisibility } from '../../../react/features/filmstrip';
3
+import { setFilmstripVisible } from '../../../react/features/filmstrip';
4 4
 
5 5
 import UIEvents from '../../../service/UI/UIEvents';
6 6
 import UIUtil from '../util/UIUtil';
@@ -183,7 +183,7 @@ const Filmstrip = {
183 183
                 UIEvents.TOGGLED_FILMSTRIP,
184 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 View File

@@ -1,5 +1,5 @@
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 3
  * hovered with the cursor.
4 4
  *
5 5
  * {
@@ -10,11 +10,11 @@
10 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 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 View File

@@ -1,6 +1,6 @@
1 1
 import {
2 2
     SET_FILMSTRIP_HOVERED,
3
-    SET_FILMSTRIP_VISIBILITY
3
+    SET_FILMSTRIP_VISIBLE
4 4
 } from './actionTypes';
5 5
 
6 6
 /**
@@ -21,17 +21,17 @@ export function setFilmstripHovered(hovered) {
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 27
  * @returns {{
28
- *     type: SET_FILMSTRIP_VISIBILITY,
28
+ *     type: SET_FILMSTRIP_VISIBLE,
29 29
  *     visible: boolean
30 30
  * }}
31 31
  */
32
-export function setFilmstripVisibility(visible) {
32
+export function setFilmstripVisible(visible) {
33 33
     return {
34
-        type: SET_FILMSTRIP_VISIBILITY,
34
+        type: SET_FILMSTRIP_VISIBLE,
35 35
         visible
36 36
     };
37 37
 }

+ 3
- 5
react/features/filmstrip/reducer.js View File

@@ -1,8 +1,6 @@
1 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 5
 const DEFAULT_STATE = {
8 6
     visible: true
@@ -18,7 +16,7 @@ ReducerRegistry.register(
18 16
                 hovered: action.hovered
19 17
             };
20 18
 
21
-        case SET_FILMSTRIP_VISIBILITY:
19
+        case SET_FILMSTRIP_VISIBLE:
22 20
             return {
23 21
                 ...state,
24 22
                 visible: action.visible

Loading…
Cancel
Save