fix(ui-modal): restore Modal open/close transition animation#2599
Open
matyasf wants to merge 1 commit into
Open
fix(ui-modal): restore Modal open/close transition animation#2599matyasf wants to merge 1 commit into
matyasf wants to merge 1 commit into
Conversation
The Modal mounted and unmounted instantly with no fade. Transition drives its
enter/exit lifecycle on its single direct child, but that child was a
ModalContext.Provider (no DOM node), so the dialog was never animated. Move the
Provider to wrap Transition (v1 and v2) so the dialog/Mask is the transitioned
element again.
In v2 the Dialog was additionally gated with `open={open && !transitioning}`, so
the window was not rendered during the transition and could not fade with the
Mask. Pass `open` unconditionally (matching v1) so the window fades together
with the Mask, and release focus from the Dialog at the start of the exit
transition so focus is not retained inside the aria-hidden, fading subtree.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
matyasf
commented
Jun 19, 2026
Comment on lines
+621
to
+626
| themeOverride={{ | ||
| Mask: { | ||
| zIndex: 555 | ||
| } | ||
| }} | ||
| > |
Collaborator
Author
There was a problem hiding this comment.
Note: This token does not exist yet in v2, I've asked Adam to create it
|
Visual regression report✅ No changes.
Baselines come from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ModalContext.ProvideroutsideTransition(v1 + v2) so the dialog/Mask isTransition's direct child again and the fade lifecycle runs.opento theDialogunconditionally (was gated on!transitioning) so the window renders during the transition and fades together with the Mask.Dialogat the start of the exit transition so focus isn't retained inside thearia-hiddenfading subtree (fixes the retained-focus console warning).Maskz-index theme-override example in the v2 README.Test Plan
aria-hidden/retained-focus warning in the console, and that focus returns to the trigger.Fixes INSTUI-5072
🤖 Generated with Claude Code