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

[Todo] Debounce dark mode to prevent weird color bugs #212

Closed
zaydek opened this issue Dec 31, 2020 · 1 comment
Closed

[Todo] Debounce dark mode to prevent weird color bugs #212

zaydek opened this issue Dec 31, 2020 · 1 comment

Comments

@zaydek
Copy link
Owner

zaydek commented Dec 31, 2020

For this one we need to add a flag to the runtime (src/runtime/runtime.ts) that prevents the dark mode shortcut (ctrl-d) from being rerun while the dark mode transition is active. So we need to add a kind of #darkModeInProgress variable to the class. Then the dark mode functions needs ask whether dark mode is in progress; if dark mode is already in progress, do nothing (return early), otherwise run normally.

Something like this:

if (#this.darkModeInProgress) {
  // No-op
  return
}
// ...

Then we’ll probably want to add a test for this in tests/runtime that makes sure this is working as expected. That might be a little tricky so I can help you with that if you need.

@zaydek
Copy link
Owner Author

zaydek commented Jan 12, 2021

This is part of #265. I just need to write tests to verify this works as expected.

@zaydek zaydek closed this as completed Jan 12, 2021
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

1 participant