Skip to content

Conversation

@jpbede
Copy link
Member

@jpbede jpbede commented Sep 30, 2025

Proposed change

Add undo/redo functionality to dashboard editor. I'll leave this here for discussion wether we want this and if this is the right approach.

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
Copy link
Member

piitaya commented Sep 30, 2025

We already have toast with undo when deleting something
CleanShot 2025-09-30 at 14 51 33
We should remove that logic because it will be confusing to have multiple undo/redo logic. Or it should properly call the undo action.

@jpbede jpbede force-pushed the dashboard-undo-redo branch from 8553ad0 to ad86126 Compare October 6, 2025 14:18
@jpbede jpbede marked this pull request as ready for review October 6, 2025 16:22
@jpbede jpbede added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Oct 7, 2025
@bramkragten
Copy link
Member

We probably need to store the location for every action in the stack, and navigate to that location when you undo/redo something. So you see something is changed when it happens on a different page than the one you are now on.

This is because dashboards can have multiple views.

@bramkragten bramkragten added the Needs UX Pull requests requiring a review from the Home Assistant design team label Oct 7, 2025
@bramkragten bramkragten removed the Needs UX Pull requests requiring a review from the Home Assistant design team label Oct 29, 2025
@bramkragten bramkragten marked this pull request as draft October 29, 2025 11:14
@jpbede jpbede marked this pull request as ready for review October 30, 2025 20:16
@home-assistant home-assistant bot marked this pull request as draft November 25, 2025 12:32
@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.

@jpbede jpbede marked this pull request as ready for review November 25, 2025 12:54
@home-assistant home-assistant bot requested a review from MindFreeze November 25, 2025 12:54
@MindFreeze MindFreeze merged commit fe50c12 into home-assistant:dev Nov 25, 2025
15 checks passed
@piitaya
Copy link
Member

piitaya commented Nov 25, 2025

Hum, the location restoration doesn't work right?
It set the location of the previous item instead of the current one.

CleanShot.2025-11-25.at.15.13.31.mp4

@MindFreeze
Copy link
Member

#28102

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

Labels

cla-signed Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants