-
Notifications
You must be signed in to change notification settings - Fork 30
feat(components): Modal set max height and allow scrolling #2865
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
Merged
edison-cy-yang
merged 17 commits into
master
from
JOB-147120-set-modal-max-height-and-allow-scrolling
Jan 20, 2026
+155
−4
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dc74fc6
set max height in floating-ui middleware
edison-cy-yang f23d7b5
test edgePadding change for pre-release
edison-cy-yang bccb8f5
add whileElementsMounted autoUpdate
edison-cy-yang b34a302
remove max height when scroll height is less than availableHeight
edison-cy-yang ee65a06
move floating ref to an outer div that wraps the motion div
edison-cy-yang 77b12c2
Revert "move floating ref to an outer div that wraps the motion div"
edison-cy-yang 275d629
use css to set max height since middleware will not work without a re…
edison-cy-yang 131e11e
create wrapper div to fix scrollbar bleeding over border radius
edison-cy-yang 1a47181
visual test
edison-cy-yang aeefadf
update modal visual snapshots
edison-cy-yang 3ff60ef
update site snapshots
edison-cy-yang 61f1209
remove flex on .modal and set max height inherit on .modalBody
edison-cy-yang 8fb48cc
moved :focus-visible back onto .modal
edison-cy-yang 906a958
dont expose modalBody useModalStyles
edison-cy-yang 1f41e80
add documentation for scrolling behavior differences in two modal ver…
edison-cy-yang e876207
add tabIndex to the new div
edison-cy-yang 64f65d9
use dvh to handle mobile browser not having space to close modal
edison-cy-yang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Binary file modified
BIN
+6.82 KB
(110%)
packages/site/tests/visual/modal.visual.ts-snapshots/1-initial-page-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.47 KB
(110%)
packages/site/tests/visual/modal.visual.ts-snapshots/1-initial-page-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.91 KB
(110%)
packages/site/tests/visual/modal.visual.ts-snapshots/1-initial-page-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.77 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/12-form-modal-filled-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.04 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/12-form-modal-filled-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.71 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/12-form-modal-filled-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.82 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/13-form-modal-closed-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.47 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/13-form-modal-closed-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.91 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/13-form-modal-closed-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.04 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/14-tab-modal-general-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.4 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/14-tab-modal-general-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.2 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/14-tab-modal-general-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.81 KB
(110%)
.../site/tests/visual/modal.visual.ts-snapshots/15-tab-modal-advanced-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.6 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/15-tab-modal-advanced-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.88 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/15-tab-modal-advanced-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.79 KB
(110%)
.../tests/visual/modal.visual.ts-snapshots/16-tab-modal-notifications-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.43 KB
(110%)
...e/tests/visual/modal.visual.ts-snapshots/16-tab-modal-notifications-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.85 KB
(110%)
...te/tests/visual/modal.visual.ts-snapshots/16-tab-modal-notifications-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.82 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/17-tab-modal-closed-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.47 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/17-tab-modal-closed-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.91 KB
(110%)
...ages/site/tests/visual/modal.visual.ts-snapshots/17-tab-modal-closed-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.86 KB
(110%)
...ests/visual/modal.visual.ts-snapshots/18-narrow-content-modal-open-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.34 KB
(110%)
...tests/visual/modal.visual.ts-snapshots/18-narrow-content-modal-open-firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.5 KB
(110%)
.../tests/visual/modal.visual.ts-snapshots/18-narrow-content-modal-open-webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+145 KB
...site/tests/visual/modal.visual.ts-snapshots/19-overflow-modal-open-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+235 KB
.../site/tests/visual/modal.visual.ts-snapshots/19-overflow-modal-open-firefox.png
Oops, something went wrong.
Binary file added
BIN
+243 KB
...s/site/tests/visual/modal.visual.ts-snapshots/19-overflow-modal-open-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.77 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/2-basic-modal-open-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.38 KB
(110%)
...ages/site/tests/visual/modal.visual.ts-snapshots/2-basic-modal-open-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.88 KB
(110%)
packages/site/tests/visual/modal.visual.ts-snapshots/2-basic-modal-open-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.82 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/3-basic-modal-closed-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.47 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/3-basic-modal-closed-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.91 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/3-basic-modal-closed-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.75 KB
(110%)
...e/tests/visual/modal.visual.ts-snapshots/4-confirmation-modal-open-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.36 KB
(110%)
...te/tests/visual/modal.visual.ts-snapshots/4-confirmation-modal-open-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.89 KB
(110%)
...ite/tests/visual/modal.visual.ts-snapshots/4-confirmation-modal-open-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.82 KB
(110%)
...tests/visual/modal.visual.ts-snapshots/5-confirmation-modal-closed-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.47 KB
(110%)
.../tests/visual/modal.visual.ts-snapshots/5-confirmation-modal-closed-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.91 KB
(110%)
...e/tests/visual/modal.visual.ts-snapshots/5-confirmation-modal-closed-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.75 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/6-custom-modal-open-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.35 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/6-custom-modal-open-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.88 KB
(110%)
...ages/site/tests/visual/modal.visual.ts-snapshots/6-custom-modal-open-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+7.23 KB
(110%)
.../site/tests/visual/modal.visual.ts-snapshots/7-custom-modal-closed-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.36 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/7-custom-modal-closed-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.94 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/7-custom-modal-closed-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+7.17 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/8-large-modal-open-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.24 KB
(110%)
...ages/site/tests/visual/modal.visual.ts-snapshots/8-large-modal-open-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+10.2 KB
(110%)
packages/site/tests/visual/modal.visual.ts-snapshots/8-large-modal-open-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.82 KB
(110%)
...s/site/tests/visual/modal.visual.ts-snapshots/9-large-modal-closed-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.47 KB
(110%)
...es/site/tests/visual/modal.visual.ts-snapshots/9-large-modal-closed-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.91 KB
(110%)
...ges/site/tests/visual/modal.visual.ts-snapshots/9-large-modal-closed-webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6.82 KB
(110%)
.../site/tests/visual/site.visual.ts-snapshots/visual-test-modal-page-chromium.png
Oops, something went wrong.
Binary file modified
BIN
+9.47 KB
(110%)
...s/site/tests/visual/site.visual.ts-snapshots/visual-test-modal-page-firefox.png
Oops, something went wrong.
Binary file modified
BIN
+9.91 KB
(110%)
...es/site/tests/visual/site.visual.ts-snapshots/visual-test-modal-page-webkit.png
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I wouldn't mind if we just removed this. if I'm understanding it right, this is the padding that used to be on
.modalhowever, that padding doesn't make sense. it's extra padding that we don't need.
I'll double check I'm understanding it right though.
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.
actually it's fine. even though I don't like it, it has nothing to do with these changes. we can keep it equivalent for the time being and address it later.
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.
Ideally this should be the overall padding of the modal and eventually we don't set margin on header, body, and actions separately.
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.
true. we need to either commit to the individual pieces providing the padding, or do that.
I have never understood our current state that is a mixture of everything 😵