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

Separate UI state from config #21

Open
j5v opened this issue Jun 18, 2023 · 1 comment
Open

Separate UI state from config #21

j5v opened this issue Jun 18, 2023 · 1 comment
Labels
chore non-functional engineering changes could-do

Comments

@j5v
Copy link
Owner

j5v commented Jun 18, 2023

Problem

config should contain only configuration state. It currently contains: configuration state, current project data (tunings and their notes), UI state (selections).

Approach

This is a 'could-do' issue that helps code comply with the principle of separating concerns. It carries regression risk if implemented wholly. It can be ignored for the time being, but the problem might become significant when we provide explicit interfaces for configuration options.

While it's beneficial to save UI state that the user is invested in, it should really be separated out into UI state, and perhaps persisted as a UI state object, so that invested selections are restored over sessions.

Some UI state, like tunings[].notes[].selected would need to be separated out, and use serializable references. Most of the code addresses tunings and notes by .id, but look out for synchronization issues when arrays of objects are mutated.

@j5v j5v added chore non-functional engineering changes could-do labels Jun 18, 2023
@j5v
Copy link
Owner Author

j5v commented Jun 18, 2023

Gut instinct is to leave this alone until a feature needs the states to be separated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore non-functional engineering changes could-do
Projects
None yet
Development

No branches or pull requests

1 participant