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

Generalize keyed local storage for more client side graph-editor data #9990

Merged
merged 9 commits into from
May 27, 2024

Conversation

Frizi
Copy link
Contributor

@Frizi Frizi commented May 17, 2024

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:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@Frizi Frizi added CI: No changelog needed Do not require a changelog entry for this PR. -gui labels May 19, 2024
Comment on lines 84 to 86
s: number
doc: boolean
rw: number | null
Copy link
Contributor

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'
Copy link
Contributor

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).

Copy link
Contributor Author

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.

@Frizi Frizi added the CI: Ready to merge This PR is eligible for automatic merge label May 21, 2024
@Frizi Frizi requested a review from AdRiley as a code owner May 22, 2024 14:23
@mergify mergify bot merged commit ca916b8 into develop May 27, 2024
35 checks passed
@mergify mergify bot deleted the wip/frizi/doc-panel-storage branch May 27, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-gui CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Synchronize right-dock state in module metadata
2 participants