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

Use undo notification when deleting a card or badge #22414

Merged
merged 9 commits into from
Oct 22, 2024
Merged

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Oct 17, 2024

Proposed change

Use notification with undo button instead of confirm dialog when deleting a card or a badge.
This PR also fixes some issues with notifications manager :

  • Adding a new notification did not clear well the previous one
  • The deleted notification wasn't always shown because the element that fired the event was deleted. It's fixed by adding showToast method on the lovelace object.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya force-pushed the delete-card-badge-undo branch from b2d1ac1 to e66caaf Compare October 17, 2024 18:43
@github-actions github-actions bot added the Cast Related to Home Assistant Cast UI label Oct 17, 2024
@piitaya piitaya force-pushed the delete-card-badge-undo branch from f8970cd to 7bd9216 Compare October 21, 2024 07:10
@piitaya piitaya marked this pull request as ready for review October 21, 2024 07:43
@marcinbauer85
Copy link
Contributor

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft October 22, 2024 07:27
@piitaya piitaya marked this pull request as ready for review October 22, 2024 08:50
@home-assistant home-assistant bot requested a review from wendevlin October 22, 2024 08:50
@piitaya piitaya force-pushed the delete-card-badge-undo branch from 31e9251 to a9b4117 Compare October 22, 2024 09:00
Copy link
Contributor

@wendevlin wendevlin left a comment

Choose a reason for hiding this comment

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

I can check if we can add the type import check into our linter.

@home-assistant home-assistant bot marked this pull request as draft October 22, 2024 09:39
Co-authored-by: Wendelin <12148533+wendevlin@users.noreply.github.com>
@piitaya piitaya marked this pull request as ready for review October 22, 2024 13:01
@home-assistant home-assistant bot requested a review from wendevlin October 22, 2024 13:01
@piitaya piitaya enabled auto-merge (squash) October 22, 2024 13:13
@piitaya piitaya merged commit b9922b2 into dev Oct 22, 2024
11 checks passed
@piitaya piitaya deleted the delete-card-badge-undo branch October 22, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cast Related to Home Assistant Cast UI cla-signed hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants