Skip to content

FE-1133: Add drawer to ds#8971

Merged
alex-e-leon merged 14 commits into
mainfrom
FE-1133-add-drawer-to-ds
Jul 8, 2026
Merged

FE-1133: Add drawer to ds#8971
alex-e-leon merged 14 commits into
mainfrom
FE-1133-add-drawer-to-ds

Conversation

@alex-e-leon

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Adds a new Drawer component to the DS.
Updates Dialog to share many of the same internal components/styling + improves some of the nesting and mounting/unmounting animations.
Add a use-avoid-scroll-width-change hook so that expandable content inside drawers/dialogs doesn't trigger reflow when a scrollbar gets added/removed.
Also adds the duration tokens to panda so that some ark animations work properly (and fixes new panda css errors caused by adding the tokens)

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@alex-e-leon alex-e-leon requested a review from lunelson July 7, 2026 12:45
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jul 7, 2026 4:32pm
hashdotdesign-tokens Ready Ready Preview, Comment Jul 7, 2026 4:32pm
petrinaut Ready Ready Preview, Comment Jul 7, 2026 4:32pm

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Dialog close timing and visuals change via shared overlay refactor; new Drawer/stacking logic is substantial but limited to UI overlays and focus/portal behavior.

Overview
Adds a Drawer overlay (edge anchoring, sizes, optional backdrop, swipe dismiss, same-edge stacking) and exports it from the design system alongside extensive Ladle stories.

Dialog is refactored to reuse shared overlay header/body/footer (overlay-parts + --panel-* tokens on content). Enter/exit now use popover scale animations; open is driven internally so onClose runs after the exit animation (lazyMount / onExitComplete). Nested overlays use data-overlay-stack-root for backdrop hiding and adjusted stacking behavior.

Introduces useAvoidScrollWidthChange (wired into overlay bodies by default) to limit horizontal jank when scrollbars toggle, and adds duration tokens plus drawer slide keyframes so Ark animation durations resolve correctly. Minor Panda fixes: SegmentedControl uses tokenized duration; spinner story uses [.8s] arbitrary syntax.

Reviewed by Cursor Bugbot for commit da63911. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Jul 7, 2026
Comment thread libs/@hashintel/ds-components/src/util/use-avoid-scroll-width-change.ts Outdated
Comment thread libs/@hashintel/ds-components/src/components/Drawer/drawer.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 15b7329. Configure here.

Comment thread libs/@hashintel/ds-components/src/components/Drawer/drawer.tsx

@lunelson lunelson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good; but I don't see any difference between the two versions, i.e. with/without partitioned footer?

@alex-e-leon alex-e-leon added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit 075786a Jul 8, 2026
48 checks passed
@alex-e-leon alex-e-leon deleted the FE-1133-add-drawer-to-ds branch July 8, 2026 07:55
@alex-e-leon

Copy link
Copy Markdown
Contributor Author

The partitioned footer version has a grey background, otherwise white if a footer is provided - ideally would move this to a prop on the footer component but i then have to do some nasty data shuffling so that the parent can get the right css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants