-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cp-12.13.0 fix modal scroll bar flash #30355
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
}; | ||
|
||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes bug in the Modal
storybook
Before
before.storybook720.mov
After
storybook.after720.mov
} | ||
|
||
to { | ||
transform: translateY(0); | ||
opacity: 1; | ||
overflow: hidden; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to update this doc/screenshot to have the children string says something along that line of ModalBody Content
instead of Modal Content
? Since there's a ModalContent
component I actually thought it should be used instead of ModalBody
from reading that ss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with a non-blocking recommendation to update doc for better clarity
Builds ready [992023b]
Page Load Metrics (1672 ± 69 ms)
Bundle size diffs
|
overflow: auto; | ||
overscroll-behavior-y: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impact of removing overflow: auto
The removal of overflow: auto
in the ModalContent
component is designed to fix the scrollbar flickering issue without affecting properly composed modals that already handle scrolling correctly through the design system components. This includes modals structured in either of these standard ways:
// Standard Modal Structure 1
<ModalContent>
<ModalHeader />
<ModalBody>
Modal Body
</ModalBody>
</ModalContent>
// Standard Modal Structure 2
<ModalContent>
<ModalHeader />
<Box className="handle-scrolling-via-css">
Modal content
</Box>
</ModalContent>
Potential Impact Considerations:
- ✅ Modals using the design system components correctly will continue to work as expected
⚠️ Modals that don't follow the standard composition pattern might experience layout issues where the overflow content is not visible
Verification & Testing:
To ensure compatibility, I've completed comprehensive visual regression testing of all modal implementations. The results are documented in:
Builds ready [b51bea9]
Page Load Metrics (1755 ± 53 ms)
Bundle size diffs
|
Description
This PR fixes a visual issue where a flashing scroll bar appears during modal animations. The issue was caused by the animation properties in the
modal-content
component in this recently merged PR. The fix involves:overflow: auto
from the modal-content containeroverflow: hidden
to the animation keyframes to prevent scroll bar flickeringThis is a hotfix for the 12.13.0 release and addresses a regression identified during visual testing.
Related issues
Fixes: #30354
Manual testing steps
Screenshots/Recordings
Before
before.mov
After
after.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Visual regression testing for all modals is being tracked in this spreadsheet:
https://docs.google.com/spreadsheets/d/1fzGHktbmnE-jDa8SxvmiTmunTOchFyAYmpBRlKAbQYo/edit?gid=700367359#gid=700367359