Skip to content

feat(repositories): Add danger delete button with label to repository row#108764

Merged
JonasBa merged 3 commits intomasterfrom
feat/repository-row-delete-button-label
Feb 24, 2026
Merged

feat(repositories): Add danger delete button with label to repository row#108764
JonasBa merged 3 commits intomasterfrom
feat/repository-row-delete-button-label

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Feb 20, 2026

This is a destructive action so it should use the appropriate variant and text

… row

Replace the icon-only delete button with a labeled danger button in
the repository row component. The button now shows a trash icon with
a "Delete" label and uses the danger priority variant for clearer
visual affordance.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 20, 2026
@JonasBa JonasBa marked this pull request as ready for review February 20, 2026 22:27
@JonasBa JonasBa requested a review from a team February 20, 2026 22:27
/>
>
{t('Delete')}
</StyledButton>
Copy link
Collaborator

Choose a reason for hiding this comment

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

StyledButton does nothing but add a margin-left. We could inline this

Copy link
Member Author

Choose a reason for hiding this comment

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

Refactored to flex gap 🙏🏼

@JonasBa JonasBa enabled auto-merge (squash) February 24, 2026 17:51
@JonasBa JonasBa force-pushed the feat/repository-row-delete-button-label branch 2 times, most recently from 768abcc to f0fd4b6 Compare February 24, 2026 18:10
@JonasBa JonasBa force-pushed the feat/repository-row-delete-button-label branch from f0fd4b6 to 33cf113 Compare February 24, 2026 18:45
@JonasBa JonasBa force-pushed the feat/repository-row-delete-button-label branch from 33cf113 to 39d3176 Compare February 24, 2026 18:47
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

disabled={!hasAccess}
>
{t('Delete')}
</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

Button disabled prop silently overridden by cloneElement

Medium Severity

The Confirm component uses cloneElement internally to override the child's disabled and onClick props. This means disabled={!hasAccess} on the Button is dead code — Confirm silently replaces it with its own disabled logic. This is the "cloneElement footgun" noted in the PR discussion. The Confirm component supports a render prop pattern (children({open})) that avoids this implicit prop override and makes the control flow explicit. Using that pattern would also make the disabled prop on the Button actually take effect.

Additional Locations (1)

Fix in Cursor Fix in Web

@JonasBa JonasBa merged commit 66c6c49 into master Feb 24, 2026
63 checks passed
@JonasBa JonasBa deleted the feat/repository-row-delete-button-label branch February 24, 2026 19:01
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
… row (#108764)

This is a destructive action so it should use the appropriate variant
and text

---------

Co-authored-by: Claude <noreply@anthropic.com>
wedamija pushed a commit that referenced this pull request Feb 24, 2026
… row (#108764)

This is a destructive action so it should use the appropriate variant
and text

---------

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 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