Skip to content

Conversation

@mxschll
Copy link
Member

@mxschll mxschll commented Oct 16, 2025

Description

With virtual scrolling enabled, selectable items would "jump" on hover/selection due to border width changes (AWSUI-61303). Virtual scrolling positions items absolutely, so when border width changes from 1px to 2px on hover, the browser recalculates layout dimensions causing visible position shifts.

Additionally, option groups were missing the separating top border.

Before After
6ab8eb377aa9c0 65b1c41442f210

The solution uses box-shadows when virtual scrolling is enabled to simulate thick borders while maintaining thin actual borders. An alternative solution of making all borders the same thickness (hover / non-hover) would change the visual appearance compared to how it's supposed to look.

In summary:

  • Eliminates jumping behavior with virtual scrolling enabled
  • Maintains visual consistency with non-virtual scrolling
  • Adds top separator to option groups

How has this been tested?

Changes ran through screenshot test and have been verified locally.

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.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.17%. Comparing base (11f474d) to head (eb5ce9a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3943   +/-   ##
=======================================
  Coverage   97.17%   97.17%           
=======================================
  Files         854      854           
  Lines       24991    24993    +2     
  Branches     8806     8806           
=======================================
+ Hits        24285    24287    +2     
  Misses        658      658           
  Partials       48       48           

☔ 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.

fix: inconsistent dropdown styling with virtual scroll
refactor: deduplicate code
- Each item is shifted up by its index in pixels
- The layout strut height is reduced by the number of items to account for the cumulative overlap
@mxschll mxschll added this pull request to the merge queue Oct 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 22, 2025
@mxschll mxschll added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 2f763cb Oct 22, 2025
50 checks passed
@mxschll mxschll deleted the dev-v3-schomax branch October 22, 2025 15:24
YueyingLu pushed a commit that referenced this pull request Nov 18, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 18, 2025
jperals pushed a commit that referenced this pull request Nov 18, 2025
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.

3 participants