Skip to content

fix(drawer): motion, sizing, scroll, and overlay story docs#620

Open
gab-az wants to merge 6 commits into
mainfrom
fix/drawer-overlay-improvements
Open

fix(drawer): motion, sizing, scroll, and overlay story docs#620
gab-az wants to merge 6 commits into
mainfrom
fix/drawer-overlay-improvements

Conversation

@gab-az
Copy link
Copy Markdown
Collaborator

@gab-az gab-az commented May 29, 2026

Summary

  • Fix drawer enter/exit animation by sharing motion state in the portal and deferring close paint so the slide-out transition runs reliably.
  • Fix medium/large drawer width via shell inline max-width, reactive size, fluid Panel, and md:w-full shell positioning.
  • Scroll long drawer body content through ScrollArea in PanelContent while header and footer stay in the panel flex layout.
  • Document canonical Panel shell usage in Drawer and Dialog Storybook stories, including Sizes and ScrollContent examples.

Commits

  1. fix(drawer): share motion state and defer close for exit animation
  2. fix(drawer): apply size presets on shell and fluid panel width
  3. feat(drawer): scroll PanelContent with ScrollArea in drawer context
  4. fix(panel): align header and footer horizontal padding to spacing-lg
  5. docs(storybook): document drawer and dialog panel shell usage
  6. docs(storybook): simplify ChangePlanDrawer to a single Default story

Test plan

  • Open Drawer → Default, Sizes, and ScrollContent in Storybook (desktop viewport)
  • Confirm small/medium/large widths differ (384 / 672 / 1024 px)
  • Confirm drawer slide-in and slide-out animations on open/close/reopen
  • Confirm ScrollContent keeps header/footer in layout while body scrolls
  • Open Dialog → Default and verify Panel shell anatomy in docs Usage block
  • Open Templates → ChangePlanDrawer Default and verify trigger + drawer flow

Made with Cursor

gab-az and others added 6 commits May 29, 2026 18:33
Centralize useDrawerMotionState in drawer-portal and inject it into overlay
and content so enter/exit transitions stay in sync. Defer painting closed
state on exit so the slide-out animation can run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drive drawer max-width via inline shell styles and reactive size prop.
Use data-fluid on Panel to avoid medium cap conflicts, and md:w-full on the
shell so medium and large presets render at distinct widths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Render ScrollArea inside PanelContent when drawer-content provides scroll
host context so only the body scrolls while header and footer stay in the
panel flex layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match panel header and footer inset tokens for consistent shell spacing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add Usage blocks, Sizes and ScrollContent drawer stories, and align Dialog
Default with the shared PanelHeader, PanelContent, and PanelFooter anatomy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use button-triggered drawer with the standard panel regions and drop extra
playground and accessibility variants from the template story.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gab-az gab-az requested a review from a team as a code owner May 29, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant