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 and unnecessary "Close selection mode" key #22425

Closed
NoRi2909 opened this issue Oct 18, 2024 · 3 comments · Fixed by #22434
Closed

Inconsistent and unnecessary "Close selection mode" key #22425

NoRi2909 opened this issue Oct 18, 2024 · 3 comments · Fixed by #22434

Comments

@NoRi2909
Copy link
Contributor

NoRi2909 commented Oct 18, 2024

Describe the issue you are experiencing

There are two ways to exit selection mode in Settings:

  • Select "Close selection mode" from the Select menu
  • Click the X in the upper left

However, when you hover over the X icon the overlay says "Exit selection mode"

Describe the behavior you expected

Both should be made consistent by using the same key for both elements in the UI.
This simplifies translations quite a bit, too.

There should be

"exit_selection_mode": "Exit selection mode",

used in both places and the following can be removed:

"close_select_mode": "Close selection mode",

This also makes it consistent with all other "exit mode" keys like, e.g.:

"exit_edit_mode": "Exit edit mode",

Steps to reproduce the issue

  1. Go to any list view in Settings
  2. Enable selection mode using the button next to the Filter button.
  3. Compare the menu item and the overlay for the X.

What version of Home Assistant Core has the issue?

core-2024.10.2

@NoRi2909
Copy link
Contributor Author

@j4n-e4t That's one for you. Note that here the fix is not just removing close_select_mode from the strings file, but also in the actual code replacing close_select_mode with exit_selection_mode.
I did not find that code myself, but you know your way around in github much better than me. 😃

@NoRi2909 NoRi2909 changed the title Duplicate keys for "Exit selection mode" / "Close selection mode" cause inconsistency Inconsistent and unnecessary "Close selection mode" key Oct 18, 2024
j4n-e4t added a commit to j4n-e4t/home-assistant-frontend that referenced this issue Oct 18, 2024
@j4n-e4t
Copy link
Contributor

j4n-e4t commented Oct 18, 2024

I've now replaced all occurrences of close_select_mode with exit_selection_mode. Could you take a look? (#22434)

@NoRi2909
Copy link
Contributor Author

Looks OK to me. Let's see if it goes through. Then we have a consistent UI in that area.

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