Coding style: consistent naming, one name per abstraction
Instead of having visible and visibility and setToolboxVisible and setFilmstripVisibility, have only visible as a name.
This commit is contained in:
parent
62c9762793
commit
aa314c10ac
|
@ -1,6 +1,6 @@
|
||||||
/* global $, APP, interfaceConfig */
|
/* global $, APP, interfaceConfig */
|
||||||
|
|
||||||
import { setFilmstripVisibility } from '../../../react/features/filmstrip';
|
import { setFilmstripVisible } from '../../../react/features/filmstrip';
|
||||||
|
|
||||||
import UIEvents from '../../../service/UI/UIEvents';
|
import UIEvents from '../../../service/UI/UIEvents';
|
||||||
import UIUtil from '../util/UIUtil';
|
import UIUtil from '../util/UIUtil';
|
||||||
|
@ -183,7 +183,7 @@ const Filmstrip = {
|
||||||
UIEvents.TOGGLED_FILMSTRIP,
|
UIEvents.TOGGLED_FILMSTRIP,
|
||||||
!wasFilmstripVisible);
|
!wasFilmstripVisible);
|
||||||
}
|
}
|
||||||
APP.store.dispatch(setFilmstripVisibility(!wasFilmstripVisible));
|
APP.store.dispatch(setFilmstripVisible(!wasFilmstripVisible));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.
|
* hovered with the cursor.
|
||||||
*
|
*
|
||||||
* {
|
* {
|
||||||
|
@ -10,11 +10,11 @@
|
||||||
export const SET_FILMSTRIP_HOVERED = Symbol('SET_FILMSTRIP_HOVERED');
|
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
|
* visible: boolean
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
export const SET_FILMSTRIP_VISIBILITY = Symbol('SET_FILMSTRIP_VISIBILITY');
|
export const SET_FILMSTRIP_VISIBLE = Symbol('SET_FILMSTRIP_VISIBLE');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {
|
import {
|
||||||
SET_FILMSTRIP_HOVERED,
|
SET_FILMSTRIP_HOVERED,
|
||||||
SET_FILMSTRIP_VISIBILITY
|
SET_FILMSTRIP_VISIBLE
|
||||||
} from './actionTypes';
|
} from './actionTypes';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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 {{
|
* @returns {{
|
||||||
* type: SET_FILMSTRIP_VISIBILITY,
|
* type: SET_FILMSTRIP_VISIBLE,
|
||||||
* visible: boolean
|
* visible: boolean
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
export function setFilmstripVisibility(visible) {
|
export function setFilmstripVisible(visible) {
|
||||||
return {
|
return {
|
||||||
type: SET_FILMSTRIP_VISIBILITY,
|
type: SET_FILMSTRIP_VISIBLE,
|
||||||
visible
|
visible
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { ReducerRegistry } from '../base/redux';
|
import { ReducerRegistry } from '../base/redux';
|
||||||
import {
|
|
||||||
SET_FILMSTRIP_HOVERED,
|
import { SET_FILMSTRIP_HOVERED, SET_FILMSTRIP_VISIBLE } from './actionTypes';
|
||||||
SET_FILMSTRIP_VISIBILITY
|
|
||||||
} from './actionTypes';
|
|
||||||
|
|
||||||
const DEFAULT_STATE = {
|
const DEFAULT_STATE = {
|
||||||
visible: true
|
visible: true
|
||||||
|
@ -18,7 +16,7 @@ ReducerRegistry.register(
|
||||||
hovered: action.hovered
|
hovered: action.hovered
|
||||||
};
|
};
|
||||||
|
|
||||||
case SET_FILMSTRIP_VISIBILITY:
|
case SET_FILMSTRIP_VISIBLE:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
visible: action.visible
|
visible: action.visible
|
||||||
|
|
Loading…
Reference in New Issue