Skip to content

fix(scraps): align leadingItems in compactSelect with check box/icon#106972

Merged
TkDodo merged 4 commits intomasterfrom
tkdodo/fix/compactSelect-align
Jan 27, 2026
Merged

fix(scraps): align leadingItems in compactSelect with check box/icon#106972
TkDodo merged 4 commits intomasterfrom
tkdodo/fix/compactSelect-align

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Jan 26, 2026

This is the second attempt to fix the alignment, after #106167 was reverted because it introduced an issue in the environment selector.

The problem was that, in order to do the alignment, we wrapped the leadingItems again in another container, because the internally created checkbox is also wrapped.

This fixed the alignment issue, however there are cases where hideCheck:true is passed to hide the internal checkbox and then a separate checkbox is rendered inside leadingItems 🤯 .

This is what HybridFilter does, and that checkbox should never get wrapped because of how pointer events are handled.

The approach in this PR always just plainly returns the leadingItems when hideCheck is passed to never do any wrapping. This is also what happened before, but it’s now a bit more explicit. This is the important change:

02cee3c

The rest are the exact changes re-applied from the reverted PR.

Note: I think HybridFilter only does this because it has an option to also show the checkbox on the right side, which is used by the Project selector. If we streamline this, like @Jesse-Box has planned, we can probably just use the internal checkbox from CompactSelect and remove all of these workarounds.

…k is passed

with hideCheck, call-sides like HybridFilter will pass their own checked indicator in `leading`, so we shouldn't wrap it again which messes with pointer events
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 26, 2026
@TkDodo TkDodo marked this pull request as ready for review January 26, 2026 16:27
@TkDodo TkDodo requested review from a team as code owners January 26, 2026 16:27
@TkDodo TkDodo merged commit 3feb39e into master Jan 27, 2026
53 checks passed
@TkDodo TkDodo deleted the tkdodo/fix/compactSelect-align branch January 27, 2026 09:16
priscilawebdev pushed a commit that referenced this pull request Feb 2, 2026
…106972)

This is the second attempt to fix the alignment, after
#106167 was reverted because it
introduced an issue in the environment selector.

The problem was that, in order to do the alignment, we wrapped the
`leadingItems` again in another container, because the internally
created checkbox is also wrapped.

This fixed the alignment issue, however there are cases where
`hideCheck:true` is passed to hide the internal checkbox and then a
separate checkbox is rendered inside `leadingItems` 🤯 .

This is what `HybridFilter` does, and that checkbox should never get
wrapped because of how pointer events are handled.

The approach in this PR always just plainly returns the `leadingItems`
when `hideCheck` is passed to never do any wrapping. This is also what
happened before, but it’s now a bit more explicit. This is the important
change:


02cee3c

The rest are the exact changes re-applied from the reverted PR.

Note: I think `HybridFilter` only does this because it has an option to
also show the checkbox on the right side, which is used by the `Project`
selector. If we streamline this, like @Jesse-Box has planned, we can
probably just use the internal checkbox from `CompactSelect` and remove
all of these workarounds.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
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.

2 participants