Skip to content

Commit

Permalink
Coding style: consistent naming, one name per abstraction
Browse files Browse the repository at this point in the history
Instead of having visible and visibility and setToolboxVisible and
setFilmstripVisibility, have only visible as a name.
  • Loading branch information
lyubomir committed Feb 5, 2018
1 parent 62c9762 commit aa314c1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions modules/UI/videolayout/Filmstrip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global $, APP, interfaceConfig */

import { setFilmstripVisibility } from '../../../react/features/filmstrip';
import { setFilmstripVisible } from '../../../react/features/filmstrip';

import UIEvents from '../../../service/UI/UIEvents';
import UIUtil from '../util/UIUtil';
Expand Down Expand Up @@ -183,7 +183,7 @@ const Filmstrip = {
UIEvents.TOGGLED_FILMSTRIP,
!wasFilmstripVisible);
}
APP.store.dispatch(setFilmstripVisibility(!wasFilmstripVisible));
APP.store.dispatch(setFilmstripVisible(!wasFilmstripVisible));
},

/**
Expand Down
8 changes: 4 additions & 4 deletions react/features/filmstrip/actionTypes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* The type of the action which sets whether or not the filmstrip is being
* The type of (redux) action which sets whether or not the filmstrip is being
* hovered with the cursor.
*
* {
Expand All @@ -10,11 +10,11 @@
export const SET_FILMSTRIP_HOVERED = Symbol('SET_FILMSTRIP_HOVERED');

/**
* The type of action sets the visibility of the entire filmstrip.
* The type of (redux) action which sets the visibility of the filmstrip.
*
* {
* type: SET_FILMSTRIP_VISIBILITY,
* type: SET_FILMSTRIP_VISIBLE,
* visible: boolean
* }
*/
export const SET_FILMSTRIP_VISIBILITY = Symbol('SET_FILMSTRIP_VISIBILITY');
export const SET_FILMSTRIP_VISIBLE = Symbol('SET_FILMSTRIP_VISIBLE');
12 changes: 6 additions & 6 deletions react/features/filmstrip/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
SET_FILMSTRIP_HOVERED,
SET_FILMSTRIP_VISIBILITY
SET_FILMSTRIP_VISIBLE
} from './actionTypes';

/**
Expand All @@ -21,17 +21,17 @@ export function setFilmstripHovered(hovered) {
}

/**
* Sets if the entire filmstrip should be visible.
* Sets if the filmstrip should be visible.
*
* @param {boolean} visible - Whether not the filmstrip is visible.
* @param {boolean} visible - Whether the filmstrip should be visible.
* @returns {{
* type: SET_FILMSTRIP_VISIBILITY,
* type: SET_FILMSTRIP_VISIBLE,
* visible: boolean
* }}
*/
export function setFilmstripVisibility(visible) {
export function setFilmstripVisible(visible) {
return {
type: SET_FILMSTRIP_VISIBILITY,
type: SET_FILMSTRIP_VISIBLE,
visible
};
}
8 changes: 3 additions & 5 deletions react/features/filmstrip/reducer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ReducerRegistry } from '../base/redux';
import {
SET_FILMSTRIP_HOVERED,
SET_FILMSTRIP_VISIBILITY
} from './actionTypes';

import { SET_FILMSTRIP_HOVERED, SET_FILMSTRIP_VISIBLE } from './actionTypes';

const DEFAULT_STATE = {
visible: true
Expand All @@ -18,7 +16,7 @@ ReducerRegistry.register(
hovered: action.hovered
};

case SET_FILMSTRIP_VISIBILITY:
case SET_FILMSTRIP_VISIBLE:
return {
...state,
visible: action.visible
Expand Down

0 comments on commit aa314c1

Please sign in to comment.