Skip to content

feat: improve Modal/Dialog/Drawer animations - #6729

Open
jsulpis wants to merge 6 commits into
mainfrom
modal-animations
Open

feat: improve Modal/Dialog/Drawer animations#6729
jsulpis wants to merge 6 commits into
mainfrom
modal-animations

Conversation

@jsulpis

@jsulpis jsulpis commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

Type

  • Enhancement

Summarize concisely:

What is expected?

Smooth opening/closing animations

The following changes were made:

  • update the Modal component to delay the unmount when closing
  • update styles
  • update the Dialog action button to trigger a different animation than when "canceling" the Dialog

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 37b2566

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ultraviolet/ui Patch
@ultraviolet/form Patch
@ultraviolet/nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.80488% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.05%. Comparing base (7a4e1a4) to head (37b2566).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ges/ui/src/components/Dialog/components/Button.tsx 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6729      +/-   ##
==========================================
- Coverage   91.06%   91.05%   -0.01%     
==========================================
  Files         560      561       +1     
  Lines       10253    10276      +23     
  Branches     3692     3719      +27     
==========================================
+ Hits         9337     9357      +20     
- Misses        916      919       +3     
Files with missing lines Coverage Δ
packages/ui/src/components/Drawer/index.tsx 100.00% <ø> (ø)
packages/ui/src/components/Drawer/styles.css.ts 100.00% <100.00%> (ø)
packages/ui/src/components/Modal/ModalContent.tsx 100.00% <100.00%> (ø)
...ages/ui/src/components/Modal/components/Dialog.tsx 75.55% <100.00%> (-0.27%) ⬇️
packages/ui/src/components/Modal/constants.css.ts 100.00% <100.00%> (ø)
packages/ui/src/components/Modal/index.tsx 97.29% <100.00%> (+0.07%) ⬆️
packages/ui/src/components/Modal/styles.css.ts 100.00% <100.00%> (ø)
...ckages/ui/src/compositions/Navigation/constants.ts 100.00% <100.00%> (ø)
...ges/ui/src/components/Dialog/components/Button.tsx 22.22% <0.00%> (-27.78%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a49bf6...37b2566. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

*/
export const ANIMATION_DURATION = 250
export const ANIMATION_EASING = 'cubic-bezier(0.5, 0, 0.2, 1)'
export const ANIMATION_EASING = 'cubic-bezier(0.5, 0, 0.1, 1)'

@jsulpis jsulpis Jul 31, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I updated the curve on the Navigation component to be the same as the Drawer, and the duration is the same too, so that we can mutualize them later in the animations package. I'm not doing it now because I don't really know in what format to export them (JS constant, vanilla extract variables, CSS variables...)

@jsulpis
jsulpis marked this pull request as ready for review July 31, 2026 08:31
@jsulpis
jsulpis requested review from a team and lisalupi as code owners July 31, 2026 08:31
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.

2 participants