Conversation
GAUNSD
merged commit Sep 21, 2026
cf29347
into
GAUNSD:gmurcia/modal-backdrop-animations
2 checks passed
GAUNSD
added a commit
that referenced
this pull request
Sep 29, 2026
* feat(Modal,Backdrop): Add animation support [WIP] This is an initial and in-progress implementation of Modal and Backdrop animation support. These changes were cherry-picked (file-level) from branch gmurcia/tearsheet, originating from the following commits: - c027e56 chore: Initial modal/backdrop animation impl - 1927470 chore: Animation tweaks. - a7f4102 chore: Implement TearsheetGroup for unbounded tearsheet levels Commit-generated-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> * refactor: Previous ad-hoc animation impl now aligns with standard PF AnimationsProvider + hooks Replace custom `animated` prop with `hasAnimations` across Modal, ModalContent, ModalBox, and Backdrop. Wire up `useHasAnimations` hook in ModalContent and Backdrop so both participate in AnimationsProvider context. Add second example demonstrating the AnimationsProvider path. Generated-by: Claude <[email protected]> Co-authored-by: Claude <[email protected]> * chore: Cleanup * chore: PR feedback - Add missing onClose handler to ModalAnimated example - Add missing onClose handler to ModalAnimatedProvider example Generated-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]> * chore: PR feedback * chore: PR feedback * chore: updates to support new CSS (#1) * chore: Update to @patternfly/patternfly@npm:6.6.0-prerelease.44 * fix(Backdrop): Default isVisible to true for standalone backdrops. Generated-by: GPT-5.6 Sol <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]> * fix(ModalContent): Hide the dialog during its closing transition. Generated-by: GPT-5.6 Sol <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]> * fix(ModalContent): Complete the close without transitionend when reduced motion is active Generated-by: GPT-5.6 Sol <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]> * refactor(Modal): Enable animations on by default Generated-by: GPT-5.6 Sol <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]> * removed the reduced-motion shortcut that immediately unmounted closing modals. Modals now remain mounted until the backdrop transition ends, with a 300ms fallback Generated-by: GPT-5.6 Sol <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]> * chore: Add disabled animations modal example * chore: Remove unnecessary styles (PR feedback) Update packages/react-core/src/components/Modal/ModalBox.tsx From: @mcoker From: @ Co-authored-by: Michael Coker <[email protected]> * chore: Remove unnecessary styles * chore: Remove unnecessary Modal doc example (PR review) * chore: Remove unnecessary Modal doc example (PR review) * chore: Update doc to reflect rendering recommendation (PR review) --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: GPT-5.6 Sol <[email protected]>
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.
Hey! I added CSS support for the backdrop and modal animations, and did so working off of this branch. Here are the changes I made to get it working. Some helpful links:
The core PR with the CSS changes: patternfly/patternfly#8584
The parent PR this PR is against: patternfly#12552
Primarily I changed the modal and backdrop back to conditionally rendering, since I'm not sure if always rendering them in the DOM might create some sort of z-index/stacking order issues.
One question is about the backdrop component. Backdrop doesn't have the equivalent of modal's
isOpen, so we/users must be dynamically rendering the component, which means everyone will need to hook into thetransitionEndevent (or set a manualsetTimeout()or whatever) to allow the backdrop's hide/close animation to finish before unmounting. I wonder if it should have something like that? Not as a part of this feature, but in the future to make the backdrop more flexible.