Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove isDestructive button input #2739

Merged

Conversation

RasmusKjeldgaard
Copy link
Collaborator

@RasmusKjeldgaard RasmusKjeldgaard commented Jan 10, 2023

Which issue does this PR close?

This PR closes #2737

What is the new behavior?

Destructive buttons are now only enabled as a class that can be applied on the attention-level 1 button and is not explicitly exposed to consumers via an input. This is because the destructive button should only be used inside an alert, as per the UX spec.

Alert applies the class now instead of setting the input.

This paves the way for a simpler theme concept, as isDestructive will not have to be handled for each attention level.

Does this PR introduce a breaking change?

  • Yes
  • No

The isDesctructive behavior of button should only be used internally by Kirby in the alert, as destructive actions are always announced via an alert. Use the default button attention levels and combine with alerts when needed.

Are there any additional context?

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Reminders

  • Make sure you have implemented tests following the guidelines in: "The good: Test".
  • Make sure you have updated the cookbook with examples and showcases (for bug fixes, enhancements & new components).

Review

  • Determine if your changes are a fix, feature or breaking-change, and add the matching label to your PR. If it is tooling, dependency updates or similar, add ignore-for-release.
  • Do a self-review.
  • Request that the changes are code-reviewed
  • Request that the changes are UX reviewed (only necessary if your PR introduces visual changes)

When the pull request has been approved it will be merged to develop by Team Kirby.

@RasmusKjeldgaard RasmusKjeldgaard added the breaking-change Add this PR to the changelog as a breaking change label Jan 10, 2023
@RasmusKjeldgaard RasmusKjeldgaard force-pushed the housekeeping/2737-remove-is-destructive-button branch from c1c03a4 to 249aa43 Compare January 10, 2023 14:59
Copy link
Contributor

@mark-drastrup mark-drastrup left a comment

Choose a reason for hiding this comment

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

Nicely done!

@RasmusKjeldgaard RasmusKjeldgaard merged commit cc5683a into develop Jan 10, 2023
@RasmusKjeldgaard RasmusKjeldgaard deleted the housekeeping/2737-remove-is-destructive-button branch January 10, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Add this PR to the changelog as a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Housekeeping] Remove isDestructive button input
2 participants