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

Inconsistent dialog when deleting tag #21240

Closed
3 of 4 tasks
SeanPM5 opened this issue Jul 1, 2024 · 7 comments · Fixed by #21299
Closed
3 of 4 tasks

Inconsistent dialog when deleting tag #21240

SeanPM5 opened this issue Jul 1, 2024 · 7 comments · Fixed by #21299
Milestone

Comments

@SeanPM5
Copy link
Contributor

SeanPM5 commented Jul 1, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When deleting a tag, it has red "Delete" button at first (good)
Screen Shot 2024-07-01 at 3 05 55 AM

But then confirmation prompt shows it as "Remove" button and without red text
Screen Shot 2024-07-01 at 3 06 01 AM

Describe the behavior you expected

Consistent wording (Delete), and red text on confirmation prompt

Steps to reproduce the issue

  1. Go to Configuration → Tags
  2. Create a test tag, then click the cog to delete it

What version of Home Assistant Core has the issue?

2024.7.0b6

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@matthiasdebaat
Copy link
Collaborator

As the tag would still exist after you remove it from Home Assistant, we should change the button tot Remove.

@silamon
Copy link
Contributor

silamon commented Jul 2, 2024

So we should use "remove" because the tag still physically exists or did I misunderstand that?

@matthiasdebaat
Copy link
Collaborator

Correct

@frenck frenck added this to the 2024.7 milestone Jul 3, 2024
@silamon
Copy link
Contributor

silamon commented Jul 4, 2024

I'm not sure if I would follow for that reason to make it "remove". It still deletes the tag from Home Assistant in a non recoverable way. "remove" mentions it is kept in existence, which means it's still somewhere around but no longer associated or referenced.
We also use "delete" for floors and areas for example, which also exist physically, which is sort of the same example. I think the line should be crossed to say that "delete" and "remove" apply for things in Home Assistant.

@matthiasdebaat
Copy link
Collaborator

matthiasdebaat commented Jul 4, 2024

I've researched it a bit more and come to the following conclusion:

  • The term Remove should always be used when an item/setting or content is to be removed or disassociated, but the action can be reversed or reapplied.
  • The term Delete should always be used to refer to any action that will cause the permanent deletion of an item/setting or content.

Added this to our design docs #21297

In this case, you can add the tag again. It's recoverable, so it can be Remove.
At the same time when removing a tag, you will break automations. That is a non-recoverable action, so it can be Delete.

I can live with both.

@silamon
Copy link
Contributor

silamon commented Jul 4, 2024

I've opened a pull request for "delete" if you don't mind. Reading the design doc, I still interpret "delete" as delete everything that is known to the tag while "remove" to me is clear the associations, but keep the tag present in Home Assistant.
In fact, everything is recoverable, depending on how much time you want to spend.

@silamon
Copy link
Contributor

silamon commented Jul 4, 2024

After reading these resources below, it follows your previous/current design documentation with the addition that "remove" can also be used if you delete something to the trash can, which means it can be undone and thus recoverable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants