[PR #2096] [MERGED] Recipe book: category tabs take clicks again #4003

Closed
opened 2026-11-03 04:13:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2096
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/2091-recipe-book-tabs


📝 Commits (1)

  • 76e2c84 Recipe book: a click on a category tab reaches the book before the outside test

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+7 -0)

📄 Description

What and why

The recipe book's category tabs did nothing when clicked, except the tab that was already selected.

The press handler decides first whether the click is outside the window. Vanilla's hasClickedOutside only counts a strip of 147 pixels left of the menu as the book, plus the selected tab when it is hovered. The tabs sit about 30 pixels further left, so a click on any other tab counted as outside, and the handler returned before the book ever saw it.

Vanilla gives the book the click before the outside test. This now does the same: an outside click goes to the book first, and only a click the book did not use carries on as a click outside the window.

Fixes #2091.

Vanilla reference

  • AbstractRecipeBookScreen.mouseClicked (the recipe book component first, then the container screen)
  • AbstractRecipeBookScreen.hasClickedOutside and RecipeBookComponent.hasClickedOutside
  • RecipeBookComponent.mouseClicked (page, search box, filter button, then the tab buttons)

Self-check

cargo check -p horizon-client passes.


🔄 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/2096 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2091-recipe-book-tabs` --- ### 📝 Commits (1) - [`76e2c84`](https://github.com/horizon-rust/horizon/commit/76e2c84103fb5b3ad7bcc67638106858ab73b908) Recipe book: a click on a category tab reaches the book before the outside test ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+7 -0) </details> ### 📄 Description ## What and why The recipe book's category tabs did nothing when clicked, except the tab that was already selected. The press handler decides first whether the click is outside the window. Vanilla's `hasClickedOutside` only counts a strip of 147 pixels left of the menu as the book, plus the selected tab when it is hovered. The tabs sit about 30 pixels further left, so a click on any other tab counted as outside, and the handler returned before the book ever saw it. Vanilla gives the book the click before the outside test. This now does the same: an outside click goes to the book first, and only a click the book did not use carries on as a click outside the window. Fixes #2091. ## Vanilla reference - `AbstractRecipeBookScreen.mouseClicked` (the recipe book component first, then the container screen) - `AbstractRecipeBookScreen.hasClickedOutside` and `RecipeBookComponent.hasClickedOutside` - `RecipeBookComponent.mouseClicked` (page, search box, filter button, then the tab buttons) ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:56 +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#4003
No description provided.