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

Add category and labels to automation/script save and rename dialog #23240

Merged

Conversation

jpbede
Copy link
Member

@jpbede jpbede commented Dec 10, 2024

Proposed change

Add category and labels to the automation/script save and rename dialog. This way, a user can set the categories/labels at the time of creation and does not have to return to the list to do so.

Additionally this PR declutters the dialog, hides the optional parameters and make them addable via chips.
This is the first PR. There will be a second PR, when we've the possibility to catch the user when he wants to navigate away.

Worked closely with @matthiasdebaat on Discord on this, the redesign is based on his design.

WTH: https://community.home-assistant.io/t/wth-can-you-not-add-categories-labels-etc-when-creating-an-automation/802562

image image
image image

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:

@home-assistant home-assistant bot added cla-signed WTH Issues & PRs generated from the "Month of What the Heck?" labels Dec 10, 2024
@bramkragten
Copy link
Member

Nice! Should we also make the labels and categories visible on the device page? It feels weird to only have them visible in the list and now in the rename dialog.

@jpbede
Copy link
Member Author

jpbede commented Dec 10, 2024

Should we also make the labels and categories visible on the device page?

Yes, I like this.

@jpbede
Copy link
Member Author

jpbede commented Dec 10, 2024

Changed the code of the save/rename dialog to be more generic, so we can use this as well for the scene editor.

@jpbede jpbede force-pushed the automation-script-add-category-labels branch from d20a7be to 9334c97 Compare December 11, 2024 07:53
@jpbede jpbede force-pushed the automation-script-add-category-labels branch from 9334c97 to e5a630d Compare December 11, 2024 15:08
@jpbede jpbede force-pushed the automation-script-add-category-labels branch 3 times, most recently from 1a28eac to 6b6e750 Compare December 12, 2024 09:14
@jpbede jpbede force-pushed the automation-script-add-category-labels branch from b43518e to 37cb5fd Compare December 12, 2024 18:48
Copy link
Member

@bramkragten bramkragten left a comment

Choose a reason for hiding this comment

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

Looks good! Can be merged after small nits

@bramkragten bramkragten merged commit 5cd6f22 into home-assistant:dev Dec 22, 2024
15 checks passed
@bramkragten bramkragten added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Dec 22, 2024
@jpbede jpbede deleted the automation-script-add-category-labels branch December 22, 2024 16:22
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) WTH Issues & PRs generated from the "Month of What the Heck?"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants