Skip to content

fix(styles): introduce modal max-height#2249

Merged
gupta-tanvi26 merged 8 commits intodevelopfrom
fix/introduce-modal-max-height
Mar 19, 2026
Merged

fix(styles): introduce modal max-height#2249
gupta-tanvi26 merged 8 commits intodevelopfrom
fix/introduce-modal-max-height

Conversation

@gupta-tanvi26
Copy link
Copy Markdown
Contributor

@gupta-tanvi26 gupta-tanvi26 commented Feb 13, 2026

2249.mov

This PR fixes situations when the length of the modal content exceeds the viewport. In case of modal content overflowing on large viewports, we want the modal content to be scrollable while the footer buttons stay fixed at the bottom of the screen, above the fold. On small viewports, the footer buttons can go below the fold of the screen and we should be able to scroll through the entire modal and not just the modal content.

The following are the breakpoints we follow -

@Viewport:320px (20rem)
@Viewport:768px (48rem)
@Viewport:1280px (64rem)

We want anything above 320px to have scrollable modal content.

Closes #2125

@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2249.d15792l1n26ww3.amplifyapp.com

@gupta-tanvi26 gupta-tanvi26 marked this pull request as ready for review February 13, 2026 20:13
@gupta-tanvi26 gupta-tanvi26 requested review from a team as code owners February 13, 2026 20:13
Copilot AI review requested due to automatic review settings February 13, 2026 20:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses #2125 by constraining dialog/modal height so long modal content can be scrolled instead of pushing footer controls below the fold.

Changes:

  • Add a max-height constraint to .Dialog__inner and overflow-y: auto to .Dialog__content.
  • Add Modal visual-regression coverage via new Playwright screenshot tests and baseline images.
  • Add an accessibility (axe) regression test case for long modal content.

Reviewed changes

Copilot reviewed 3 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/styles/dialog.css Adds max-height + scroll behavior for dialog content.
packages/react/src/components/Modal/screenshots.e2e.tsx New Modal screenshot coverage for small/large content across viewports and themes.
packages/react/src/components/Modal/index.test.tsx Adds axe tests intended to cover long-content scenarios.
e2e/screenshots/modal-small-content.png New baseline screenshot.
e2e/screenshots/dark--modal-small-content.png New baseline screenshot (dark theme).
e2e/screenshots/modal-large-content-large-viewport.png New baseline screenshot (large viewport).
e2e/screenshots/modal-large-content-small-viewport.png New baseline screenshot (small viewport).
e2e/screenshots/dark--modal-large-content-small-viewport.png New baseline screenshot (dark + small viewport).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/react/src/components/Modal/index.test.tsx Outdated
Comment thread packages/styles/dialog.css Outdated
Comment thread packages/styles/dialog.css
Comment thread packages/react/src/components/Modal/screenshots.e2e.tsx Outdated
Comment thread packages/react/src/components/Modal/screenshots.e2e.tsx Outdated
Bracciata

This comment was marked as resolved.

shawnsharpDQ
shawnsharpDQ previously approved these changes Feb 16, 2026
Copy link
Copy Markdown
Contributor

@Zidious Zidious left a comment

Choose a reason for hiding this comment

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

This is looking great! Left some minor comments, also the 🤖 has reasonable comments.

Small nit: we'd want to scope your title to something like fix(react): ... so we can have the changelog generation scope the fix to the correct CHANGELOG file (see conventional commits docs).

Comment thread packages/react/src/components/Modal/screenshots.e2e.tsx Outdated
Comment thread packages/styles/dialog.css Outdated
@gupta-tanvi26 gupta-tanvi26 changed the title fix: introduce modal max-height fix(styles): introduce modal max-height Feb 18, 2026
shawnsharpDQ
shawnsharpDQ previously approved these changes Feb 18, 2026
Copy link
Copy Markdown
Contributor

@maksym-shynkarenko maksym-shynkarenko left a comment

Choose a reason for hiding this comment

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

LGTM, but I'm not really familiar with cauldron. Leave the final review on @anastasialanz

@gupta-tanvi26 gupta-tanvi26 dismissed stale reviews from Zidious and Bracciata February 18, 2026 16:59

Addressed!

Zidious
Zidious previously approved these changes Feb 18, 2026
Copy link
Copy Markdown
Contributor

@Zidious Zidious left a comment

Choose a reason for hiding this comment

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

LGTM - Awesome work ☕ !

Comment thread packages/react/src/components/Modal/index.test.tsx Outdated
Bracciata
Bracciata previously approved these changes Feb 18, 2026
Copy link
Copy Markdown
Contributor

@Bracciata Bracciata left a comment

Choose a reason for hiding this comment

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

Looks good to ship 🚀🚀

chornonoh-vova
chornonoh-vova previously approved these changes Feb 23, 2026
Comment thread packages/react/src/components/Modal/index.test.tsx Outdated
Bracciata
Bracciata previously approved these changes Feb 24, 2026
Copy link
Copy Markdown
Contributor

@Bracciata Bracciata left a comment

Choose a reason for hiding this comment

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

chornonoh-vova
chornonoh-vova previously approved these changes Feb 27, 2026
Comment thread packages/react/src/components/Modal/screenshots.e2e.tsx
@gupta-tanvi26 gupta-tanvi26 dismissed stale reviews from Bracciata and chornonoh-vova via d5eab76 March 19, 2026 03:43
@gupta-tanvi26 gupta-tanvi26 merged commit 7391493 into develop Mar 19, 2026
9 checks passed
@gupta-tanvi26 gupta-tanvi26 deleted the fix/introduce-modal-max-height branch March 19, 2026 16:32
@anastasialanz
Copy link
Copy Markdown
Collaborator

This change introduced unintended changes in one of the modals in extension because of the new max-height.

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.

Introduce modal max-height

9 participants