[PR #6716] [MERGED] Launcher: Sort by dropdown on the Mods page #7048

Closed
opened 2026-11-03 06:32:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6716
Author: @ClickingMaster
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: feat/mods-sort-dropdown


📝 Commits (3)

  • 97199d1 Launcher: Sort by dropdown on the Mods page
  • 2508fa5 Launcher: Sort by on the registry, below the GitHub row; no scroll jump
  • 18d256d Merge main into #6716

📊 Changes

15 files changed (+228 additions, -33 deletions)

View changed files

📝 launcher/lang/de.json (+2 -1)
📝 launcher/lang/es.json (+2 -1)
📝 launcher/lang/fr.json (+2 -1)
📝 launcher/lang/ja.json (+2 -1)
📝 launcher/lang/pl.json (+2 -1)
📝 launcher/lang/pt-br.json (+2 -1)
📝 launcher/lang/ru.json (+2 -1)
📝 launcher/lang/tr.json (+2 -1)
📝 launcher/lang/uk.json (+2 -1)
📝 launcher/lang/zh.json (+2 -1)
📝 launcher/src/browser/horizon.rs (+34 -4)
📝 launcher/src/browser/horizon/tests.rs (+27 -0)
📝 launcher/src/main.rs (+1 -0)
📝 launcher/src/mods_page.rs (+27 -5)
📝 launcher/src/mods_project.rs (+119 -14)

📄 Description

🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Fixes #6714

What

The Mods page's sort was a row of five segmented buttons. It is now a Sort by: dropdown (same look and behaviour as Settings > Language): Best match, Relevance, Downloads, Follows, Newest, Updated. Picking one closes the list and searches again with that order; the list also closes when the page changes.

Also:

  • The Horizon registry (the default source) used to hide the filter bar, so it had no sort at all. It now shows the dropdown below the "Add from GitHub" row, with Best match, Downloads, Newest (first published) and Updated (latest version); the registry has no follows or relevance data.
  • Changing the sort or a filter keeps the listed rows until the new ones arrive, so the page doesn't shrink and the scroll doesn't jump to the top.

Where

launcher/src/mods_project.rs: new mods_sort_dropdown, used by mods_filters in place of segments("mods-sort", …); Browse.sort_menu holds the open state. launcher/src/main.rs: closes it on page switch. New string Sort by: {order} added to all ten launcher/lang/*.json.

Test

The launcher has no UI test harness. A new registry test (browser/horizon/tests.rs) checks the Newest and Updated order, and fails without the sorting code. i18n::tests::every_language_has_every_string_the_code_asks_for failed on the new string before the translations were added, and passes after (422 passed, 0 failed). Checked by eye in a launcher run in scratch homes.

Self-check

  • cargo fmt clean, cargo clippy --tests -- -D warnings clean, cargo test --lib in launcher/: 422 passed
  • User-facing text goes through tr/trf; translations added for every language
  • pr_ready.py not run: no ALSA headers on this machine
  • Translations other than English are machine-written; native speakers welcome to correct them

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6716 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/mods-sort-dropdown` --- ### 📝 Commits (3) - [`97199d1`](https://github.com/horizon-rust/horizon/commit/97199d16dae56713f900ea8192ce8b0e1243211b) Launcher: Sort by dropdown on the Mods page - [`2508fa5`](https://github.com/horizon-rust/horizon/commit/2508fa5be29bc00a3fff6c214384fda231cb0118) Launcher: Sort by on the registry, below the GitHub row; no scroll jump - [`18d256d`](https://github.com/horizon-rust/horizon/commit/18d256d9353116fbd2d53f9b9f9f100447cd2deb) Merge main into #6716 ### 📊 Changes **15 files changed** (+228 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `launcher/lang/de.json` (+2 -1) 📝 `launcher/lang/es.json` (+2 -1) 📝 `launcher/lang/fr.json` (+2 -1) 📝 `launcher/lang/ja.json` (+2 -1) 📝 `launcher/lang/pl.json` (+2 -1) 📝 `launcher/lang/pt-br.json` (+2 -1) 📝 `launcher/lang/ru.json` (+2 -1) 📝 `launcher/lang/tr.json` (+2 -1) 📝 `launcher/lang/uk.json` (+2 -1) 📝 `launcher/lang/zh.json` (+2 -1) 📝 `launcher/src/browser/horizon.rs` (+34 -4) 📝 `launcher/src/browser/horizon/tests.rs` (+27 -0) 📝 `launcher/src/main.rs` (+1 -0) 📝 `launcher/src/mods_page.rs` (+27 -5) 📝 `launcher/src/mods_project.rs` (+119 -14) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. Fixes #6714 ## What The Mods page's sort was a row of five segmented buttons. It is now a **Sort by: <order>** dropdown (same look and behaviour as Settings > Language): Best match, Relevance, Downloads, Follows, Newest, Updated. Picking one closes the list and searches again with that order; the list also closes when the page changes. Also: - The Horizon registry (the default source) used to hide the filter bar, so it had no sort at all. It now shows the dropdown below the "Add from GitHub" row, with Best match, Downloads, Newest (first published) and Updated (latest version); the registry has no follows or relevance data. - Changing the sort or a filter keeps the listed rows until the new ones arrive, so the page doesn't shrink and the scroll doesn't jump to the top. ## Where `launcher/src/mods_project.rs`: new `mods_sort_dropdown`, used by `mods_filters` in place of `segments("mods-sort", …)`; `Browse.sort_menu` holds the open state. `launcher/src/main.rs`: closes it on page switch. New string `Sort by: {order}` added to all ten `launcher/lang/*.json`. ## Test The launcher has no UI test harness. A new registry test (`browser/horizon/tests.rs`) checks the Newest and Updated order, and fails without the sorting code. `i18n::tests::every_language_has_every_string_the_code_asks_for` failed on the new string before the translations were added, and passes after (422 passed, 0 failed). Checked by eye in a launcher run in scratch homes. ## Self-check - [x] `cargo fmt` clean, `cargo clippy --tests -- -D warnings` clean, `cargo test --lib` in `launcher/`: 422 passed - [x] User-facing text goes through `tr`/`trf`; translations added for every language - [ ] `pr_ready.py` not run: no ALSA headers on this machine - [ ] Translations other than English are machine-written; native speakers welcome to correct them 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:32:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7048
No description provided.