Lucas Parry and Smit Barmase
fd837b348f
project_panel: Make natural sort ordering consistent with other apps ( #41080 )
...
The existing sorting approach when faced with `Dir1`, `dir2`, `Dir3`,
would only get as far as comparing the stems without numbers (`dir` and
`Dir`), and then the lowercase-first tie breaker in that function would
determine that `dir2` should come first, resulting in an undesirable
order of `dir2`, `Dir1`, `Dir3`.
This patch defers tie-breaking until it's determined that there's no
other difference in the strings outside of case to order on, at which
point we tie-break to provide a stable sort.
Natural number sorting is still preserved, and mixing different cases
alphabetically (as opposed to all lowercase alpha, followed by all
uppercase alpha) is preserved.
Closes #41080
Release Notes:
- Fixed: ProjectPanel sorting bug
Screenshots:
Before | After
----|---
<img width="237" height="325" alt="image"
src="https://github.com/user-attachments/assets/6e92e8c0-2172-4a8f-a058-484749da047b "
/> | <img width="239" height="325" alt="image"
src="https://github.com/user-attachments/assets/874ad29f-7238-4bfc-b89b-fd64f9b8889a "
/>
I'm having trouble reasoning through what was previously going wrong
with `docs` in the before screenshot, but it also seems to now appear
alphabetically where you'd expect it with this patch
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com >
2025-11-13 02:04:40 +05:30
..
2025-11-12 15:13:40 +00:00
2025-11-02 18:11:21 +00:00
2025-11-07 22:27:14 +00:00
2025-11-11 01:02:13 -05:00
2025-11-12 16:55:25 +00:00
2025-11-11 15:25:27 +00:00
2025-11-10 11:11:24 -03:00
2025-11-12 16:55:25 +00:00
2025-10-20 08:35:28 -03:00
2025-10-17 18:58:14 +00:00
2025-10-24 18:19:53 +02:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-11 16:15:12 +00:00
2025-11-11 12:55:19 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-29 16:41:43 +01:00
2025-11-03 14:50:34 -03:00
2025-11-03 19:25:15 +00:00
2025-11-12 20:27:04 +00:00
2025-11-07 22:27:14 +00:00
2025-10-28 20:21:49 +00:00
2025-11-11 12:47:08 -03:00
2025-11-06 09:16:45 +00:00
2025-11-10 23:00:55 -07:00
2025-10-17 18:58:14 +00:00
2025-11-10 15:44:54 -07:00
2025-11-12 18:16:13 +00:00
2025-11-06 18:36:58 -05:00
2025-11-12 15:38:16 +00:00
2025-11-07 22:27:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-05 22:34:05 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-06 12:53:59 -05:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-31 01:53:46 +00:00
2025-11-11 16:34:25 -05:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 10:32:46 -08:00
2025-10-23 14:13:35 -04:00
2025-11-06 18:36:58 -05:00
2025-11-11 21:31:42 +00:00
2025-11-07 22:27:14 +00:00
2025-11-12 20:27:04 +00:00
2025-11-11 16:07:57 +00:00
2025-10-17 18:58:14 +00:00
2025-11-11 15:45:03 +02:00
2025-09-11 13:56:06 -07:00
2025-10-31 21:18:22 +00:00
2025-11-11 15:45:03 +02:00
2025-11-12 10:12:02 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-11 15:42:00 +02:00
2025-10-17 18:58:14 +00:00
2025-11-12 16:26:53 +00:00
2025-10-20 10:30:06 +00:00
2025-10-17 18:58:14 +00:00
2025-10-20 23:54:56 +03:00
2025-11-10 09:27:51 +00:00
2025-11-09 21:37:22 -05:00
2025-11-12 15:13:29 +01:00
2025-11-07 22:27:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 20:27:04 +00:00
2025-10-17 18:58:14 +00:00
2025-10-26 13:24:26 +00:00
2025-10-17 18:58:14 +00:00
2025-11-10 23:00:55 -07:00
2025-10-17 18:58:14 +00:00
2025-11-11 12:50:56 -03:00
2025-11-07 22:27:14 +00:00
2025-11-11 16:34:25 -05:00
2025-10-17 18:58:14 +00:00
2025-11-11 20:51:57 +02:00
2025-11-11 15:43:25 +02:00
2025-11-11 16:34:25 -05:00
2025-11-12 01:36:22 +00:00
2025-11-03 19:25:15 +00:00
2025-11-08 01:06:12 +00:00
2025-11-11 16:10:47 +01:00
2025-10-17 18:58:14 +00:00
2025-10-22 19:52:38 +00:00
2025-11-11 19:20:38 +02:00
2025-11-12 19:59:10 +00:00
2025-10-22 19:52:38 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 09:42:55 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-08 14:00:53 +01:00
2025-11-07 16:12:27 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 03:23:40 +05:30
2025-11-12 15:31:20 +01:00
2025-10-17 18:58:14 +00:00
2025-11-09 10:55:56 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-05 14:10:42 -07:00
2025-10-20 17:20:09 +00:00
2025-11-11 16:10:47 +01:00
2025-11-10 14:26:01 -07:00
2025-11-06 18:36:58 -05:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-11 16:59:44 +05:30
2025-10-17 18:58:14 +00:00
2025-11-12 15:31:20 +01:00
2025-11-12 16:37:14 +01:00
2025-10-17 18:58:14 +00:00
2025-11-12 01:36:22 +00:00
2025-11-12 03:23:40 +05:30
2025-11-07 22:27:14 +00:00
2025-10-29 16:27:30 +00:00
2025-11-10 07:57:50 +00:00
2025-11-10 23:00:55 -07:00
2025-10-17 18:58:14 +00:00
2025-11-10 23:00:55 -07:00
2025-11-11 15:09:56 +00:00
2025-11-12 15:31:20 +01:00
2025-11-12 15:31:20 +01:00
2025-10-17 18:58:14 +00:00
2025-11-03 19:25:15 +00:00
2025-11-03 19:25:15 +00:00
2025-10-24 07:52:51 -04:00
2025-11-03 19:25:15 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-11 10:26:40 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 20:27:04 +00:00
2025-10-27 10:13:26 -04:00
2025-11-07 22:27:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-12 16:38:06 +01:00
2025-10-17 18:58:14 +00:00
2025-11-11 16:34:25 -05:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-11-03 19:25:15 +00:00
2025-11-09 10:55:56 +00:00
2025-11-06 18:36:58 -05:00
2025-10-17 18:58:14 +00:00
2025-10-29 18:49:39 +01:00
2025-10-17 18:58:14 +00:00
2025-11-07 22:27:14 +00:00
2025-10-24 18:19:53 +02:00
2025-11-07 22:27:14 +00:00
2025-11-07 11:36:05 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 16:38:06 +01:00
2025-11-12 16:38:06 +01:00
2025-11-12 20:27:04 +00:00
2025-11-10 14:26:01 -07:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-10 15:09:37 +01:00
2025-10-22 19:52:38 +00:00
2025-11-07 09:42:55 +00:00
2025-11-04 14:12:05 -05:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-13 02:04:40 +05:30
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 20:27:04 +00:00
2025-11-07 22:27:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 20:27:04 +00:00
2025-11-12 01:36:22 +00:00
2025-11-07 22:27:14 +00:00
2025-10-17 18:58:14 +00:00
2025-11-12 15:36:28 +00:00
2025-11-12 15:31:20 +01:00
2025-10-17 18:58:14 +00:00
2025-11-09 21:10:36 -08:00
2025-11-12 18:16:13 +00:00
2025-11-08 01:06:12 +00:00
2025-11-12 18:16:13 +00:00
2025-11-10 19:50:43 +00:00
2025-11-07 22:27:14 +00:00