Skip to content

GAUD-10486: recalculate dropdown shadows when content changes - #7321

Merged
dlockhart merged 4 commits into
mainfrom
GAUD-10486/dropdown-recalc-shadows
Aug 6, 2026
Merged

GAUD-10486: recalculate dropdown shadows when content changes#7321
dlockhart merged 4 commits into
mainfrom
GAUD-10486/dropdown-recalc-shadows

Conversation

@dlockhart

@dlockhart dlockhart commented Aug 5, 2026

Copy link
Copy Markdown
Member

Following on from adding the tests in #7319, this adds a resize observer around the dropdown content. When it triggers, the scroll shadows are recalculated.

This does solve the narrow use case where the content/dropdown width doesn't resize. If the width does change, the shadow still doesn't span the full width. That's a bigger can of worms, but I felt like this fix on its own was still useful.

Vdiff Report

{ name: 'async-content-added', initialContent: 'Initial Content', asyncContent: scrollContent },
{ name: 'async-content-removed', initialContent: scroll, asyncContent: 'Updated' }
{ name: 'async-content-added', initialContent: unsafeHTML(noScrollContent), asyncContent: scrollContent },
{ name: 'async-content-removed', initialContent: scroll, asyncContent: noScrollContent }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unfortunately I had to tweak these slightly so that the width of the content remained the same. Otherwise the shadows wouldn't span the full width.

@dlockhart
dlockhart marked this pull request as ready for review August 5, 2026 21:23
@dlockhart
dlockhart requested a review from a team as a code owner August 5, 2026 21:23
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7321/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@dlockhart
dlockhart merged commit 9c5df51 into main Aug 6, 2026
11 checks passed
@dlockhart
dlockhart deleted the GAUD-10486/dropdown-recalc-shadows branch August 6, 2026 14:18
@d2l-github-release-tokens

Copy link
Copy Markdown

🎉 This PR is included in version 3.286.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants