fix(scraps): align leadingItems in compactSelect with check box/icon #106972
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
leadingItemsagain in another container, because the internally created checkbox is also wrapped.This fixed the alignment issue, however there are cases where
hideCheck:trueis passed to hide the internal checkbox and then a separate checkbox is rendered insideleadingItems🤯 .This is what
HybridFilterdoes, and that checkbox should never get wrapped because of how pointer events are handled.The approach in this PR always just plainly returns the
leadingItemswhenhideCheckis 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
HybridFilteronly does this because it has an option to also show the checkbox on the right side, which is used by theProjectselector. If we streamline this, like @Jesse-Box has planned, we can probably just use the internal checkbox fromCompactSelectand remove all of these workarounds.