Skip to content

Add Sort Order - #416

Open
Chadnaut wants to merge 1 commit into
masterfrom
Add-Sort-Order
Open

Add Sort Order#416
Chadnaut wants to merge 1 commit into
masterfrom
Add-Sort-Order

Conversation

@Chadnaut

@Chadnaut Chadnaut commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator
  • Add ascending_order filter property
  • Deprecate reverse_order

The old property will be migrated to the new one the next time a display is modified.

Note this will remove reverse_order from the displays.cfg.

ALL reverse_order FIELDS FOR ALL DISPLAYS WILL BE MIGRATED TO ascending_order

Fixes #391

@Chadnaut
Chadnaut requested a review from oomek June 6, 2026 05:32
@oomek

oomek commented Jun 6, 2026

Copy link
Copy Markdown
Owner

The old property will be migrated to the new one the next time a display is modified.

It migrated all displays after I modified 1 display and I wasn't prepared for this 😅 You should have used plural form 😉

So it's just a cosmetic change and one extra option the user must change for numerical lists like stats? Is it really worth it?

The sorting order of the collection/romlist. Ascending is "A to Z" for info, "Smallest to Largest" for stats, and the source order for "No Sort".

I find the help line a bit confusing.
"Smallest to Largest" is in quotes so to me it indicates an option.
Instead stats maybe numerical values?
The later and the source order for "No Sort" refers to another option without explicitly mentioning that.

@Chadnaut

Chadnaut commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

You 👍'ed the issue - why ask now if it's worth it?

We're not currently sorting all "numeric" fields numerically.

  • All Stats, Year (parsed), Players.
  • Not: DisplayCount, Rotation, Buttons - should I add these as numeric too?

No Sort should probably be replaced with ListEntry since that's what it is - The index of the game within the list.
It IS a type of sort that can be ordered.

How about we simplify the help and don't mention field types at all.
The sorting order of the collection/romlist. Ascending sorts 0-9, A-Z. Descending sorts Z-A, 9-0.

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

My initial thumb up did not mean I stopped thinking about it. This PR is fine as long as the help is simplified as you've proposed, without mentioning other options.

@Chadnaut

Chadnaut commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

What about other numeric fields?
And replacing No Sort?

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

I think we should unify sorting of all fields.

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

When it comes to no sort I think It should stay, because curated collections shouldn't be sorted.

@Chadnaut

Chadnaut commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

Explain "unify sorting of all fields" and how it differs to what we're currently doing.

I'm not suggesting to remove No Sort, just rename it ListEntry which is more conducive to ordering.

No Sort can already be reversed. Ordering ListEntry asc/desc seems more appropriate.

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Explain "unify sorting of all fields" and how it differs to what we're currently doing.

  • We're not currently sorting all "numeric" fields numerically.

No Sort appeals to me more than ListEntry

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

DisplayCount, Rotation, Buttons - should I add these as numeric too?

Yes

Ordering ListEntry asc/desc seems more appropriate.

The problem I'm having with ListEntry is that it's a scripting token, not a part of the UI and it's not a romlist field either, so normal user may not know what that means. Maybe we could figure out some other name for it?

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

To be honest I never liked ListEntry name and was always wondering why ListPos or ListPosition weren't chosen.

@oomek

oomek commented Jun 9, 2026

Copy link
Copy Markdown
Owner

I hope you understand now where my reluctance towards this name is coming from.

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 this pull request may close these issues.

Filter reverse_order should be sort_order

2 participants