ref(scraps): remove compactSelect triggerProps#105215
Merged
Conversation
while we shouldn't provide `triggerProps` _and_ `trigger` to a `CompactSelect`, we do create an `id` that we label the `ul` by, so this id must be put onto the trigger. This does happen for the default trigger, but not if you provide your own. This PR fixes this by passing the id to the props that will eventually get spread onto the trigger.
…/remove-compactSelect-triggerProps
…dodo/ref/remove-compactSelect-triggerProps
# Conflicts: # static/app/components/core/compactSelect/control.tsx
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #105215 +/- ##
========================================
Coverage 80.62% 80.62%
========================================
Files 9428 9428
Lines 404023 404015 -8
Branches 25661 25659 -2
========================================
- Hits 325724 325718 -6
+ Misses 77830 77828 -2
Partials 469 469 |
scttcper
approved these changes
Jan 14, 2026
Member
scttcper
left a comment
There was a problem hiding this comment.
consolidating into one style seems great
# Conflicts: # static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx # static/app/components/events/featureFlags/onboarding/featureFlagOnboardingSidebar.tsx # static/app/components/events/interfaces/breadcrumbs/index.tsx # static/app/components/profiling/flamegraph/flamegraphToolbar/flamegraphThreadSelector.tsx # static/app/components/profiling/profilingOnboardingSidebar.tsx # static/app/views/performance/otlp/serviceEntrySpansTable.tsx # static/app/views/profiling/profileSummary/slowestProfileFunctions.tsx # static/gsApp/views/spendAllocations/index.tsx
JonasBa
approved these changes
Jan 15, 2026
# Conflicts: # static/app/components/assigneeSelectorDropdown.tsx # static/app/components/checkInTimeline/checkInTimeline.stories.tsx # static/app/components/events/traceEventDataSection.tsx # static/gsAdmin/components/customers/customerStatsFilters.tsx # static/gsAdmin/components/resultGrid.tsx # static/gsAdmin/views/dynamicSamplingPanel.tsx # static/gsAdmin/views/home.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
and replace them with a dedicated
triggerfunction that renders a<OverlayTrigger.Button>depends on:
closes: https://linear.app/getsentry/issue/DE-668/streamline-compactselect-triggers
Most of the changes were done automatically by a codemod, but I checked them all afterwards.
The biggest change that was migrated wrongly is that passing
children: undefinedorchildren: nullintriggerPropsbefore led to the default children being rendered, for example:The 1:1 migration would be:
But this won’t work because falling back to
undefinedmeans nothing gets rendered.So the new pattern is falling back to
triggerProps.children:trigger={triggerProps => ( <OverlayTrigger.Button {...triggerProps} prefix={t('Geo region')}> - {value.length === 0 ? t('All') : undefined} + {value.length === 0 ? t('All') : triggerProps.children} </OverlayTrigger.Button> )}As
triggerPropscontains thedefaultLabelaschildren, but the expression inside the body ofOverlayTrigger.Buttoncompletely overrides that.this is the commit where I made most of these changes: 33f22a5
To make this future-proof, I’ve disallowed
undefinedandnullon type-level aschildrenfor forSelectTrigger