-
Notifications
You must be signed in to change notification settings - Fork 323
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
Generalize keyed local storage for more client side graph-editor data #9990
Conversation
s: number | ||
doc: boolean | ||
rw: number | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we're so cryptic? RW sounds like "Read-Write" :)
@@ -0,0 +1,142 @@ | |||
import { useAbortScope } from '@/util/net' | |||
import { debouncedWatch, useLocalStorage } from '@vueuse/core' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know there is something like debounceWatch
. You may check if it's suitable to our debouncedGetter
(my implementation uses timeouts).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think is actually a suitable and easy to understand replacement for manual timers in this case. I'm going to refactor it then.
Pull Request Description
Fixes #9938
The documentation panel openness and size state are saved in localStorage. On initial graph entry, the documentation panel is automatically opened if the graph's function is documented.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.