Skip to content

Apply danger button class to ConfirmRedactDialog#33601

Open
Can3299 wants to merge 2 commits into
element-hq:developfrom
Can3299:change-confirm-button-color
Open

Apply danger button class to ConfirmRedactDialog#33601
Can3299 wants to merge 2 commits into
element-hq:developfrom
Can3299:change-confirm-button-color

Conversation

@Can3299
Copy link
Copy Markdown

@Can3299 Can3299 commented May 25, 2026

ADD

  • primaryButtonClass prop to TextInputDialog

CHANGE

  • Pass primaryButtonClass="danger" to TextInputDialog in ConfirmRedactDialog

Checklist

Description:
Adds an optional primaryButtonClass prop to TextInputDialog that is forwarded to DialogButtons, allowing consumers to style the primary button. Uses this in ConfirmRedactDialog by passing "danger" so the "Remove" button in the redaction confirmation dialog is visually styled as a destructive action, making it clearer to users that the action cannot be easily undone.

Screenshot

@Can3299 Can3299 requested a review from a team as a code owner May 25, 2026 06:00
@Can3299 Can3299 requested review from dbkr and florianduros May 25, 2026 06:00
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label May 25, 2026
ADD
- `primaryButtonClass` prop to TextInputDialog

CHANGE
- Pass `primaryButtonClass="danger"` to TextInputDialog in ConfirmRedactDialog
Copy link
Copy Markdown
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Makes sense to me but you've checked the box to say you've written tests without writing a test.

Waiting for design review.

## ADD
- TextInputDialog-test.tsx: full test suite covering title/description rendering, placeholder,
  button text, primaryButtonClass, cancel behavior, and hasCancel toggle
## CHANGE
- ConfirmRedactDialog-test.tsx: add 4 rendering tests — danger button class, state event
  description, reason field presence, and onFinished call with reason
@Can3299
Copy link
Copy Markdown
Author

Can3299 commented May 27, 2026

but you've checked the box to say you've written tests without writing a test.

I had thought that unit tests werent necessary for a change like this, but I've now added the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Enhancement X-Needs-Design Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants