[PR #3811] [MERGED] Launcher: the version and account menus close on a click outside them #5232

Closed
opened 2026-11-03 05:11:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3811
Author: @DenisHumen
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/launcher-menus-close-outside


📝 Commits (1)

  • e4c1af1 Launcher: the version and account menus close on a click outside them

📊 Changes

2 files changed (+61 additions, -7 deletions)

View changed files

📝 launcher/src/main.rs (+55 -6)
📝 launcher/src/switch_page.rs (+6 -1)

📄 Description

🤖 Opened by DenisHumen's AI agent (Claude Code), not by DenisHumen personally.

What and why

The Home page's version picker only closed from its own button, a version row or "Manage versions": clicking anywhere else left it open (#3216). The account menu under the top bar's chip had the same behaviour. Both now close on a mouse-down anywhere outside them (on_mouse_down_out).

A press on the menu's own button is outside the menu too, so it closes it on mouse-down, and the button's click on mouse-up would then open it again. The position of the mouse-down that closed a menu is kept (menu_closed_at), and the button leaves the menu closed when its click began with that same press (closed_by_press, unit-tested). A keyboard click on the button toggles as before.

Fixes #3216.

Vanilla reference

Horizon-only (the launcher).

Clicked through by hand in a debug build of this branch (Windows 11, scratch profile): the version picker and the account menu each close on a click on the banner beside them, and a second press on their own button (version field / account chip) closes them and leaves them closed. Also checked with cargo clippy --all-targets --locked -- -D warnings, the launcher's tests and the new a_menu_button_stays_closed_after_the_press_that_closed_its_menu.

Self-check

pr_ready (tools/pr_ready.py --base upstream/main on DenisPC, against upstream/main at ee6cf6acb, 1 min 6 s)

Check Result
Scope ✅ 2 files, +61 −7
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 416 passed (56 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅
launcher tests ✅ 266 passed (6 s)
Parity ❌ 360 affected,
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Parity ❌: tools/parity.py imports fcntl, which Windows' Python lacks; no harness covers the launcher's UI.

🤖 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/3811 **Author:** [@DenisHumen](https://github.com/DenisHumen) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/launcher-menus-close-outside` --- ### 📝 Commits (1) - [`e4c1af1`](https://github.com/horizon-rust/horizon/commit/e4c1af1fff461af08b321e50e7e24ab8a0ffb3f2) Launcher: the version and account menus close on a click outside them ### 📊 Changes **2 files changed** (+61 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/main.rs` (+55 -6) 📝 `launcher/src/switch_page.rs` (+6 -1) </details> ### 📄 Description > 🤖 Opened by DenisHumen's AI agent (Claude Code), not by DenisHumen personally. ## What and why The Home page's version picker only closed from its own button, a version row or "Manage versions": clicking anywhere else left it open (#3216). The account menu under the top bar's chip had the same behaviour. Both now close on a mouse-down anywhere outside them (`on_mouse_down_out`). A press on the menu's own button is outside the menu too, so it closes it on mouse-down, and the button's click on mouse-up would then open it again. The position of the mouse-down that closed a menu is kept (`menu_closed_at`), and the button leaves the menu closed when its click began with that same press (`closed_by_press`, unit-tested). A keyboard click on the button toggles as before. Fixes #3216. ## Vanilla reference Horizon-only (the launcher). Clicked through by hand in a debug build of this branch (Windows 11, scratch profile): the version picker and the account menu each close on a click on the banner beside them, and a second press on their own button (version field / account chip) closes them and leaves them closed. Also checked with `cargo clippy --all-targets --locked -- -D warnings`, the launcher's tests and the new `a_menu_button_stays_closed_after_the_press_that_closed_its_menu`. ## Self-check **pr_ready** (`tools/pr_ready.py --base upstream/main` on DenisPC, against upstream/main at ee6cf6acb, 1 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +61 −7 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 416 passed (56 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ | | launcher tests | ✅ 266 passed (6 s) | | Parity | ❌ 360 affected, | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Parity ❌: `tools/parity.py` imports `fcntl`, which Windows' Python lacks; no harness covers the launcher's UI. 🤖 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 05:11:08 +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#5232
No description provided.