-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Sorting scenes by "Last Activated" results in list being sorted in an unexpected way. #22825
Comments
Columns can be sorted by ascending, descending, and none. When you hover on the column header with the mouse when sort mode is none, it shows the arrow, as an indication that it is clickable/sortable. I would guess if you move your mouse cursor away the arrow will disappear, indicating that the column is not currently being sorted? |
Oh man. I can't believe I didn't figure that out. Great catch! The sorting function does work per your instruction. However, and I think this is what threw me off, I would argue that when sorting on a value that indicates relative time, in descending order, that we would put null values last rather than first. This will allow what I imagine is the most common use case of sorting on that field, which is to quickly find the scene that you just triggered in order to edit/debug it. I thought I was viewing the table in ascending order since I saw the first few rows having "Never" in the "Last Activated" column so I clicked it again, thinking it was a simply binary toggle (without realizing that I was in fact choosing the tertiary "none" sort option). I also thought that the arrow had simply disappeared when I was no longer hovering over it in an attempt to provide a cleaner UI, which is why I hovered my mouse over the button to take the screenshot (thinking I was actually just causing the UI to show me the currently selected value rather than the value that I would be selecting by clicking it). Sorry for the wall of text. I would ask that this issue be refactored into a change request to move null/never to be displayed at the end of the list when sorting by that column (and possibly other columns in other parts of the UI if they are using the same sort/table function(s) if possible. Thanks! |
Checklist
Describe the issue you are experiencing
When I attempt to sort the grid of the Scenes view by the "Last Activated" column, the table does not sort the way that I would imaging most people would expect (chronologically by the most recent activation of scenes). Rather, it sorts in a way that appears pseudo-random and not in chronological order.
Describe the behavior you expected
List of defined scenes should sort in order of scenes last date/time activation
Steps to reproduce the issue
...
What version of Home Assistant Core has the issue?
2024.11.1
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Version 130.0.6723.117 (Official Build) (64-bit)
Which operating system are you using to run this browser?
Windows 11 Pro Version 23H2 OS build 22631.4317 Windows Feature Experience Pack 1000.22700.1041.0
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
The text was updated successfully, but these errors were encountered: