Skip to content

Below lg, two CreatePanel instances mount and the preset picker opens twice #538

Description

@mehdibha

In www/src/routes/_app/create.tsx the desktop panel is only CSS-hidden (max-lg:hidden) while the mobile sheet mounts a second CreatePanel. Below lg with the sheet open, both are mounted at once.

Failures:

  • The preset picker is URL-driven (?gallery=) and portals to body, so portals ignore the hidden parent — tapping the preset name opens two stacked pickers with a doubled backdrop and fighting focus traps.
  • The hidden instance runs its own ⌘K listener and its own usePresetHistory, recording the visible instance's undos as fresh edits, so its stacks are corrupt if the viewport later crosses to desktop.

Related: the registry Drawer renders through a Base UI Portal, so the lg:hidden wrapper never applies to an open sheet — resizing past lg with the sheet open leaves it over the desktop layout.

Found reviewing #511.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: builderThe /create builder experiencebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions