Skip to content

fix(sidebar): Update SIDEBAR_COOKIE_NAME #131

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

firebed
Copy link
Contributor

@firebed firebed commented Apr 29, 2025

Change SIDEBAR_COOKIE_NAME to sidebar_state as mentioned in #106.

Change SIDEBAR_COOKIE_NAME to `sidebar_state`
@taylorotwell
Copy link
Member

I'm so confused by all this sidebar state cookie stuff. Why does this not match the middleware?

@firebed
Copy link
Contributor Author

firebed commented Apr 29, 2025

The actual issue lies in shadcn's sidebar utils.ts and by extension in vue-starter-kit's utils.ts
Shadcn uses sidebar:state (by mistake) and laravel's middleware uses sidebar_state, so they don't match and this causes the sidebar to always lose it's open/close state after navigation.

This is a known issue and shadcn has already fixed the react version, but the vue version remains problematic.
react-starter-kit also uses sidebar_state sidebar.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants