Skip to content

feat(dialog): clearer open and close motion - #598

Draft
itsprade wants to merge 1 commit into
mainfrom
feat/dialog-motion
Draft

itsprade wants to merge 1 commit into
mainfrom
feat/dialog-motion

Conversation

@itsprade

Copy link
Copy Markdown
Contributor

Summary

Draft for discussion: makes Dialog open and close read more clearly. The change touches only the shared dialog, so every modal moves the same way.

  • Open: keeps the existing 200ms fade and zoom-in, and adds a small upward slide (8px), eased out.
  • Close: quicker, at 150ms eased in, with a matching slide down. The overlay closes on the same timing.
  • Reduced motion: both are skipped under prefers-reduced-motion.

CSS only, with existing tw-animate-css utilities and no new dependency. This is in line with the CSS-first animation direction (platform-planning#1510).

Split out of the TreePicker / LineItems work (#597, #595). Component-specific motion, like the TreePicker's accordion, stays in those PRs; the shared dialog-level change lives here.

Open questions

  • Are slide distance and timings right, or should this wait for the motion tokens (--duration-*, --ease-*) planned in #1510?
  • Should Sheet and Popover get matching treatment in the same pass?

Test plan

  • Dialog snapshot updated; full suite passes
  • Checked on /showcase/primitives: open is 200ms ease-out with the slide, close is 150ms ease-in

🤖 Generated with Claude Code

Opening adds a small upward slide (eased out) to the fade and zoom; closing
is quicker (150ms, eased in) with a matching slide down. Skipped under
prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (403eebe) #598 (3d0d032) +/-
Coverage 88.1% 88.1% 0.0%
Test Execution Time 2m18s 2m19s +1s
Details
  |                     | main (403eebe) | #598 (3d0d032) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          88.1% |          88.1% | 0.0% |
  |   Files             |            207 |            207 |    0 |
  |   Lines             |           6178 |           6178 |    0 |
  |   Covered           |           5448 |           5448 |    0 |
- | Test Execution Time |          2m18s |          2m19s |  +1s |

Code coverage of files in pull request scope (95.2% → 95.2%)

Files Coverage +/- Status
packages/core/src/components/dialog/dialog.tsx 95.2% 0.0% modified

Reported by octocov

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.

1 participant