feat(repositories): Add danger delete button with label to repository row#108764
feat(repositories): Add danger delete button with label to repository row#108764
Conversation
… 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>
| /> | ||
| > | ||
| {t('Delete')} | ||
| </StyledButton> |
There was a problem hiding this comment.
StyledButton does nothing but add a margin-left. We could inline this
There was a problem hiding this comment.
Refactored to flex gap 🙏🏼
768abcc to
f0fd4b6
Compare
f0fd4b6 to
33cf113
Compare
33cf113 to
39d3176
Compare
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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)
… row (#108764) This is a destructive action so it should use the appropriate variant and text --------- Co-authored-by: Claude <noreply@anthropic.com>
… row (#108764) This is a destructive action so it should use the appropriate variant and text --------- Co-authored-by: Claude <noreply@anthropic.com>


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