Skip to content

feat(ui): OverflowBoundaryContext#104745

Merged
TkDodo merged 6 commits intomasterfrom
tkdodo/fix/boundary-context
Dec 11, 2025
Merged

feat(ui): OverflowBoundaryContext#104745
TkDodo merged 6 commits intomasterfrom
tkdodo/fix/boundary-context

Conversation

@TkDodo
Copy link
Copy Markdown
Collaborator

@TkDodo TkDodo commented Dec 11, 2025

This PR introduces an OverflowBoundaryContext, exposed from scraps, which consumers can use to limit the size of dropdown menus (currently only for compactSelect). Per default, the menu can grow to accommodate its largest option, but it’s limited by the size of the <main> section.

In some cases, parent contains might want to further limit the width, e.g. for sidebars, drawers. The first consumer is the SlideOverPanel to fix a bug in dashboards. @gggritso FYI

before after
Screenshot 2025-12-11 at 11 00 59 Screenshot 2025-12-11 at 10 59 46

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 11, 2025
@TkDodo TkDodo marked this pull request as ready for review December 11, 2025 10:44
@TkDodo TkDodo requested a review from a team as a code owner December 11, 2025 10:44
@TkDodo TkDodo requested a review from gggritso December 11, 2025 10:44
@gggritso
Copy link
Copy Markdown
Member

cc @narsaynorath you were just talking about this bug!

Copy link
Copy Markdown
Member

@narsaynorath narsaynorath left a comment

Choose a reason for hiding this comment

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

❤️

Copy link
Copy Markdown
Member

@JonasBa JonasBa left a comment

Choose a reason for hiding this comment

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

My one note is that the current naming implies an overflow only use-case, however the actual implementation seems generic enough to where it could be used for other use-cases.

@TkDodo
Copy link
Copy Markdown
Collaborator Author

TkDodo commented Dec 11, 2025

renamed to BoundaryContext: 2fcba66

# Conflicts:
#	static/app/components/core/compactSelect/compactSelect.stories.tsx
@TkDodo TkDodo enabled auto-merge (squash) December 11, 2025 17:06
@TkDodo TkDodo merged commit f621e07 into master Dec 11, 2025
46 of 48 checks passed
@TkDodo TkDodo deleted the tkdodo/fix/boundary-context branch December 11, 2025 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants