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

fix(web): settings accordion open state #7504

Merged
merged 1 commit into from Feb 28, 2024

Conversation

michelheusschen
Copy link
Contributor

Each SettingAccordion updates the search parameters shortly after another, causing a race condition where the state of accordions isn't updated correctly. This new solution avoids the race condition by keeping state in SettingAccordionState that is passed to each child using the context API.

Fixes #7499

Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 75bf475
Status: ✅  Deploy successful!
Preview URL: https://ac660d2a.immich.pages.dev
Branch Preview URL: https://fix-web-settings-accordion-o.immich.pages.dev

View logs

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

Thanks, I've noticed this issue a while ago but didn't get around to fixing it. And in hindsight, I'm glad I didn't because your approach is better than everything I could've thought of lol

@alextran1502 alextran1502 merged commit 93f0a86 into main Feb 28, 2024
25 of 26 checks passed
@alextran1502 alextran1502 deleted the fix/web-settings-accordion-open-state branch February 28, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library settings folding is broken
4 participants