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

feat: persist sidebar toggle state #569

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Samathingamajig
Copy link
Collaborator

@Samathingamajig Samathingamajig commented Mar 23, 2025

before:

  • sidebar state is lost on reload and closing/reopening calendar
Screen.Recording.2025-03-23.at.3.58.17.AM.mp4

after:

  • sidebar state persists across reloads and closing/reopening calendar
Screen.Recording.2025-03-23.at.3.57.18.AM.mp4

We need a loading state so that the sidebar doesn't pop in/pop out when loading (we need to know if we want it open or closed before we display it for the first time, otherwise we see the transition of it changing open-->closed or vice-versa depending on the default)

See ugly versions without loading states
Screen.Recording.2025-03-23.at.4.06.39.AM.mov
Screen.Recording.2025-03-23.at.4.08.14.AM.mov

Yes, react query is overkill for this, but it's about time we have it in the repo. We need a good loading state manager, and react query is good for that (usually across network, but chrome storage is async too)


This change is Reviewable

Copy link
Collaborator

@doprz doprz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@doprz doprz added ready-for-review dependencies Pull requests that update a dependency file feature labels Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature ready-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants