ref(button-variant): remove deprecated priority prop from Button#114756
Merged
natemoo-re merged 3 commits intomasterfrom May 4, 2026
Merged
ref(button-variant): remove deprecated priority prop from Button#114756natemoo-re merged 3 commits intomasterfrom
natemoo-re merged 3 commits intomasterfrom
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.40% |
JonasBa
approved these changes
May 4, 2026
Member
JonasBa
left a comment
There was a problem hiding this comment.
@natemoo-re Nice work! Lets send out a PSA to discuss frontend so folks are aware of the change 🙏🏼
Remove the `priority` prop, `ButtonPriority` type, and `DO_NOT_USE_resolveButtonVariant` resolver from the Button component. All callers should use `variant` instead. Blocked by the four codemod(button-variant) PRs landing first. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8196b2e to
8886af6
Compare
Comment on lines
15
to
21
| interface DirectEnableButtonProps { | ||
| buttonProps: Pick< | ||
| React.ComponentProps<typeof AddIntegrationButton>, | ||
| 'size' | 'priority' | 'disabled' | 'style' | 'data-test-id' | 'icon' | 'buttonText' | ||
| 'size' | 'variant' | 'disabled' | 'style' | 'data-test-id' | 'icon' | 'buttonText' | ||
| >; | ||
| providerSlug: string; | ||
| userHasAccess: boolean; |
Contributor
There was a problem hiding this comment.
Bug: The integration install button incorrectly uses the old priority prop instead of the new variant prop, causing it to render with the wrong visual style.
Severity: LOW
Suggested Fix
In integrationDetailedView.tsx, update the buttonProps initialization to use the new variant prop. Specifically, change priority: 'primary' to variant: 'primary'.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
static/app/views/settings/organizationIntegrations/directEnableButton.tsx#L15-L21
Potential issue: The `Button` component's API was updated to replace the `priority` prop
with `variant`. However, `integrationDetailedView.tsx` was not updated and continues to
pass `priority: 'primary'` within its `buttonProps`. This prop is now ignored by child
components like `DirectEnableButton`, causing the button to fall back to its default
`'secondary'` variant instead of the intended `'primary'` one. This results in a visual
regression on the integration detail page, where the primary install action is no longer
visually prominent.
Also affects:
static/app/views/settings/organizationIntegrations/integrationDetailedView.tsx:313
Did we get this right? 👍 / 👎 to inform future reviews.
cleptric
pushed a commit
that referenced
this pull request
May 5, 2026
…4756) Final step of the [button-variant codemod](https://github.com/getsentry/design-engineering/tree/main/codemods/button-variant): removes the `priority` prop, `ButtonPriority` type, and `DO_NOT_USE_resolveButtonVariant` resolver from the Button component. All callers must use `variant` instead. Blocked by #114730. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Final step of the button-variant codemod: removes the
priorityprop,ButtonPrioritytype, andDO_NOT_USE_resolveButtonVariantresolver from the Button component. All callers must usevariantinstead.Blocked by #114730.