Skip to content

Conversation

@wolverineks
Copy link
Contributor

Close side menu when pressing settings.
Rename sidebar -> sideMenu

usersView: state.ui.scenes.controlPanel.usersView
})
const mapDispatchToProps = (dispatch) => ({
closeSideMenu: () => dispatch(closeSideMenu()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a documented coding convention that the prop parameter be the same name as the action creator? This makes it very difficult to surf code and make refactoring changes. If this not a convention, then I'd ask we use closeSideMenu: () => dispatch(dispatchCloseSideMenu()),

Copy link
Member

@paullinator paullinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good with just request that dispatch function names be different than props parameters.

export const LIST_USERS_SIDEBAR = 'LIST_USER_USER_SIDEBAR'
export const SELECT_USERS_SIDEBAR = 'SELECT_USERS_SIDEBAR'
export const REMOVE_USERS_SIDEBAR = 'REMOVE_USERS_SIDEBAR'
export const LIST_USERS_SIDE_MENU = 'LIST_USER_USER_SIDE_MENU'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the word USER supposed to be in here twice?

brandDanger: '#d9534f',
brandWarning: '#f0ad4e',
brandSidebar: '#252932',
brandSideMenu: '#252932',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a sidenote, at some point maybe we should have all theme colors in one file. I added them to themes/variables/airbitz.js, and it would be best to not have the color hex values defined in more than one place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to create a constants file for items like colors.
you can see an example in core-ui-js.
then I do
import * as Colors from '../constants/Colors.js'
or
import * as Colors from '../constants/'
since the colors are in the overall index.js.
variables is a misleading title for items that are not changing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully agree. This is a good time to just make the color palette file and use it now. Please make the change to the pull request

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realizing that this change didn't introduce these colors, I retract my previous comment. Let's put the colors in a Colors file in a different commit.

@paullinator paullinator merged commit 4cb3fe0 into develop Sep 21, 2017
@thehobbit85 thehobbit85 deleted the fix/close-side-menu branch September 22, 2017 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants