`DashboardSidebarCollapse` controls the `DashboardSidebar` despite its `collapsed` value being readonly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Environment
- Node Version: v20.12.1
- Nuxt Version: 4.0.3
- CLI Version: 3.28.0
- Nitro Version: 2.12.4
- Package Manager: pnpm@8.15.6
- Builder: -
- User Config: devtools, modules, css, compatibilityDate
- Runtime Modules: @nuxt/ui@4.5.0, @nuxt/eslint@1.9.0, @vueuse/nuxt@13.7.0
- Build Modules: -
Version
v4.5.0
Reproduction
https://codesandbox.io/p/sandbox/pxxcvj
Description
Attaching a read-only :collapsed to DashboardSidebar does not prevent DashboardSidebarCollapse from collapsing/expanding the sidebar.
In the reproduction, when you change the width of the screen to be narrower than 96rem, sidebar will always collapse. When you widen it back out, sidebar will expand if it was expanded before.
If you make the screen narrower until the sidebar collapses, and then press the DashboardSidebarCollapse, it will expand, despite the fact that the computed collapsed is still true.
In the reproduction that is represented by having collapsed: true written on the page, but the sidebar being expanded.
Expected the sidebar to keep being collapsed, until computed collapsed becomes false.
Additional context
No response
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DashboardSidebar and DashboardSidebarCollapse components, then reproduce the behavior using the linked CodeSandbox while changing the viewport below and above 96rem. Trace how the readonly collapsed value and the collapse control interact; done means the sidebar cannot expand or collapse against that value, with the existing responsive behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100