Skip to content

Comments

fix: restore legacy dropdown sizing behavior #4283

Open
mxschll wants to merge 6 commits intomainfrom
dev-v3-schomax-selectable-sizing
Open

fix: restore legacy dropdown sizing behavior #4283
mxschll wants to merge 6 commits intomainfrom
dev-v3-schomax-selectable-sizing

Conversation

@mxschll
Copy link
Member

@mxschll mxschll commented Feb 23, 2026

Description

This PR restores legacy behavior in Select, Multiselect and Autosuggest when expandToViewport=true.

Current behavior: When expandToViewport=true, the dropdown’s width scales up to the xss breakpoint but can be smaller than the trigger if the content inside is narrower.

Expected behavior: When expandToViewport=true, the dropdown’s width matches the width of the trigger element, but only up to the xss breakpoint. This behavior is consistent with the legacy implementation (see AWSUI-19898).

image image

We were missing a specific test case where the dropdown content is narrower than the trigger, which caused this behavior change to slip through in #4239.

Related links, issue #, if available: n/a

How has this been tested?

Pipeline is green (will add tests for that specific scenario).

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mxschll mxschll changed the title fix: legacy sizing with expandToViewport refactor: move legacy sizing to shared function Feb 23, 2026
@mxschll mxschll changed the title refactor: move legacy sizing to shared function fix: restore legacy dropdown sizing behavior Feb 23, 2026
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.42%. Comparing base (5cfcc6d) to head (cee4dbe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4283   +/-   ##
=======================================
  Coverage   97.42%   97.42%           
=======================================
  Files         891      892    +1     
  Lines       26098    26116   +18     
  Branches     9435     9437    +2     
=======================================
+ Hits        25426    25444   +18     
- Misses        629      666   +37     
+ Partials       43        6   -37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant