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

clean up reducer for setting focus time and shift key #142

Open
magland opened this issue Sep 15, 2022 · 0 comments
Open

clean up reducer for setting focus time and shift key #142

magland opened this issue Sep 15, 2022 · 0 comments

Comments

@magland
Copy link
Owner

magland commented Sep 15, 2022

Better not to mix the UI implementation detail (whether the shift key being held down) with the internal state logic (whether to set focus time or focus interval).

I think we'd be better served here by having a separate reducer action to set the interval (and maybe it takes both ends of the interval, or is overloaded so that it infers that one of them is the current focus time if it only gets one time) and let the front-end look at the shift key to choose which to call. (This would also make it easier to implement a drag-based version if we changed our minds or wanted to make it easier for the user to modify an existing interval.)

Originally posted by @jsoules in #140 (comment)

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

No branches or pull requests

1 participant