Viewer: the model list is in the order of the names shown #108

Manually merged
github merged 4 commits from gh-pr/108/head into gh-pr/108/base 2026-11-26 20:10:24 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 02:51 UTC · original
holdmysocks:claude/picker-sort → master · +26 −0 · 1 files · 4 commits · merged 2026-11-24 03:16 UTC

Asked for by the user (who also confirmed #106 works in the running viewer).

What

With friendly names on show, the model list was still in the order of the raw model names, so the names looked shuffled. The list is now sorted by the name each row shows (case-insensitive); with "raw names" on it stays in raw-name order. The two orders are separate, and toggling "raw names" re-sorts. Up / Down follow the order shown.

The place of every item in the shown-name order is worked out once (and again when the game's names arrive), not on every search keystroke.

Checked

  • Screenshot of the Vehicles list with friendly names: 216cstreamer, Airgator, airmule, Albany '50 Hermes ... AmLoco, Annis, Ascot, Bale Trailer, Benefactor, BF: alphabetical by the name shown.
  • cargo test -p sixng-gui: 12 passed (no new tests).

Not done

  • Raw-name order and the toggle were not looked at in a screenshot.
  • Touches the same file as #106 (list scrolling), in different places.
**@⁠holdmysocks** on GitHub · 2026-11-24 02:51 UTC · [original](https://github.com/holdmysocks/SixNG/pull/108) `holdmysocks:claude/picker-sort` → `master` · +26 −0 · 1 files · 4 commits · merged 2026-11-24 03:16 UTC Asked for by the user (who also confirmed #106 works in the running viewer). ## What With friendly names on show, the model list was still in the order of the raw model names, so the names looked shuffled. The list is now sorted by the name each row shows (case-insensitive); with "raw names" on it stays in raw-name order. The two orders are separate, and toggling "raw names" re-sorts. Up / Down follow the order shown. The place of every item in the shown-name order is worked out once (and again when the game's names arrive), not on every search keystroke. ## Checked - Screenshot of the Vehicles list with friendly names: 216cstreamer, Airgator, airmule, Albany '50 Hermes ... AmLoco, Annis, Ascot, Bale Trailer, Benefactor, BF: alphabetical by the name shown. - `cargo test -p sixng-gui`: 12 passed (no new tests). ## Not done - Raw-name order and the toggle were not looked at in a screenshot. - Touches the same file as #106 (list scrolling), in different places.
- Stepping with Up / Down scrolled the list every time so that the row
  sat 120 px from the top. It now scrolls only as far as it takes to keep
  the row on screen, with one row to spare at the edge.
- A clicked row kept the keyboard focus. egui moves focus with the arrow
  keys and scrolls to the focused widget, so the list jumped about while
  Up / Down also stepped the cursor. The row gives up focus on click.
- The list has a fixed id.
With friendly names on show the list was still in the order of the raw
model names. It is now sorted by the name each row shows; with "raw
names" on it stays in raw-name order. Toggling "raw names" re-sorts.
# Conflicts:
#	crates/sixng-gui/src/model_picker.rs
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:10:23 +00:00
github manually merged commit 01815ed02d into gh-pr/108/base 2026-11-26 20:10:24 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.