Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redux store structuring #706

Closed
ddelpiano opened this issue Oct 20, 2020 · 0 comments
Closed

redux store structuring #706

ddelpiano opened this issue Oct 20, 2020 · 0 comments
Assignees

Comments

@ddelpiano
Copy link
Contributor

As discussed over a call with @jrmartin , it would greatly help to slightly change the redux store with a better structure to follow the pattern below:

  • add to the current GENERAL_DEFAULT_STATE an object to address all the components of the UI, this will help to store each component global information and keep track of visibility and focus between all the components, an example below

export const GENERAL_DEFAULT_STATE = {
error: undefined,
idsMap: {},
idsList: [],
...
ui: {
termInfo: {
visible: false,
focus: false,
},
canvas: {
visible: false,
focus: false,
},
termContext: {
visible: false,
focus: false,
}
...
}
}

  • move each store property component specific into the right context in the ui object, for instance termInfoVisible can be moved in ui.termInfo.visible, circuitQuerySelected can be moved in ui.circuitBrowser.querySelected, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants