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

fix(add_enable_all_disable_all_buttons): this PR adds enable and disable all patterns to the UI to quickly manage all patterns if desired. #47

Closed

Conversation

caleyg
Copy link

@caleyg caleyg commented Apr 18, 2023

The UI on the page loads if nothing is enabled, DisableAll is disabled, and EnableAll is enabled.
Screen Shot 2023-04-18 at 4 16 33 PM

When the EnableAll button is pushed, we show a spinner (this is useful when there is a persistent store on the backend in another PR in this repo.) so that users do not get trigger-happy. The implementation of this spinner is a little hacky. React lifecycles are opinionated on how it re-renders the UI for performance optimization... we trick it by setting a timeout and using the timeout callback.
Screen Shot 2023-04-18 at 4 17 30 PM

This is the UI when the page is loaded, and all patterns are enabled. Note the Enable All button is disabled, and the Disable All button is activated. This is so the user doesn't add the same patterns to the same playlist, preventing accidental duplicates.
Screen Shot 2023-04-18 at 4 29 30 PM

This is the result of a user clicking on Disable All. Note the Enable All button is activated, and the Disable All button is disabled. The UI reflects nothing is in the current playlist, and the local storage also shows [].
Screen Shot 2023-04-18 at 4 17 02 PM

This PR resolves #45

all patterns to the UI to quickly manage all patterns if desired.
@caleyg caleyg closed this Apr 26, 2023
@caleyg
Copy link
Author

caleyg commented Apr 26, 2023

this will be resolved in this PR #44

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.

[feature]: enable / disable all buttons to quickly add patterns to playlist
1 participant