[PR #7101] [MERGED] Port map: client2-010's widget narration rows cite the narrator #7338

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

📋 Pull Request Information

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

Base: main ← Head: chore/narrator-client2-010-b


📝 Commits (1)

  • 9fe8a7d Port map: client2-010's widget narration rows cite the narrator

📊 Changes

1 file changed (+13 additions, -13 deletions)

View changed files

📝 tools/port_map/client2-010.tsv (+13 -13)

📄 Description

Thirteen rows of tools/port_map/client2-010.tsv said "no narrator in Horizon"
(or "the Narrator option is stored only"). The narrator exists and ports vanilla's
screen narration: crates/horizon-narrator/src/screen.rs (ScreenNarration::schedule,
due, run, find_narratable), the driver
crates/horizon-client/src/screen_narrator.rs, and the glue in
crates/horizon-client/src/game/narrator.rs. Each row now names the function or arm
that answers it.

Verdicts corrected:

  • Checkbox.updateWidgetNarration -> inline screen_narrator.rs::narrate, from
    skip:other: the checkbox arm adds gui.narrate.button(message) and then
    narration.checkbox.usage.{focused,hovered}.{check,uncheck} while the widget is
    active. The method's bytecode is createNarrationMessage, isFocused and those two
    Component.translatable calls, and the four keys it builds are the four the arm reads.
  • CycleButton.updateWidgetNarration -> inline ...::narrate: the cycle arm adds
    gui.narrate.button(name: value) and narration.cycle_button.usage.{focused,hovered}
    with the value a click moves to (Narratable::cycle's next).
  • CycleButton.createDefaultNarrationMessage -> inline ...::narrate: vanilla's
    wrapDefaultNarrationMessage is the gui.narrate.button wrap, which the cycle arm
    does; the name and value it wraps are built where the widget is recorded
    (options.generic_value in the screen's label).
  • EditBox.createNarrationMessage -> inline ...::narrate: the edit-box arm builds
    gui.narrate.editBox(message, value); the boxes record themselves through
    Narratable::edit_box (ui::EditBox::draw, screen_draw.rs).
  • MultiLineEditBox.updateWidgetNarration -> inline ...::narrate: the same arm. The
    method adds exactly gui.narrate.editBox(message, value); books and dialogs record
    their multi-line boxes as Narratable::edit_box.
  • ContainerObjectSelectionList.updateWidgetNarration -> inline ...::narrate: the
    container-list arm takes the row under the mouse for the mouse and system triggers,
    else the focused one, then adds narrator.position.list.
  • ContainerObjectSelectionList.Entry.updateNarration ->
    port screen_narrator.rs::narrate_row, which is the method: findNarratableWidget
    over the row's widgets, the picked one's priority check,
    narrator.position.object_list and the widget one level deeper.
  • FocusableTextWidget.updateWidgetNarration -> inline ...::narrate: the text arm
    reads the widget's message as the title. The row keeps a gap: minor: for the
    optional focus and hover usage a FocusableTextWidget can carry.
  • ItemDisplayWidget.updateWidgetNarration ->
    inline game/stats_screen.rs::Game::draw_stats: the stats screen's item row is an
    ItemDisplayWidget and records narration.item(<hover name>).
  • LockIconButton.createNarrationMessage ->
    inline game/lan_screen.rs::WorldOptions::narration: the difficulty lock button is
    gui.narrate.button(narrator.button.difficulty_lock) joined for narration with
    narrator.button.difficulty_lock.locked or .unlocked.
  • CommandSuggestions.getUsageNarration -> port chat.rs::ChatScreen::suggestions_usage:
    the four narration.suggestion.usage.{cycle,fill}.{hidable,fixed} keys, chosen by
    whether Tab cycles the list, which Game::draw_command_block passes as the screen's
    usage.
  • CommandSuggestions.SuggestionsList.getNarrationMessage ->
    port chat.rs::suggestion_narration: narration.suggestion, or
    narration.suggestion.tooltip with the entry's tooltip, over the position, the count
    and the text; SuggestionList::narration_message marks lastNarratedEntry as the
    method does.
  • CommandSuggestions.getNarrationMessage ->
    inline chat.rs::SuggestionList::narration_message: the same text, said when the
    selection moves (ChatScreen::select). The row keeps a gap: minor: because it is not
    added to the chat screen's own narration element (screen_info::chat reads the usage
    and the typed message).

Nothing else in the file changed; row count and columns are the same.

PORT_LEDGER_OUT=/tmp/pledger-n2 python3 tools/port_ledger.py map-check tools/port_map/client2-010.tsv
144 rows, no problems.

Proven: the ledger here is built from the 26.3 client and server jars at main;
every class, method and Rust fn these rows name resolves in it; each note is read from
the function or match arm it cites, and each vanilla side from that method's bytecode in
the client jar (the keys it builds, the calls it makes).

Not proven: no listen to the narration in a running client; these are ledger rows,
not behaviour changes.


🔄 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/7101 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/narrator-client2-010-b` --- ### 📝 Commits (1) - [`9fe8a7d`](https://github.com/horizon-rust/horizon/commit/9fe8a7d1ce90b7c8b6fa8743f4cad29dccfaa6f3) Port map: client2-010's widget narration rows cite the narrator ### 📊 Changes **1 file changed** (+13 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/client2-010.tsv` (+13 -13) </details> ### 📄 Description Thirteen rows of `tools/port_map/client2-010.tsv` said "no narrator in Horizon" (or "the Narrator option is stored only"). The narrator exists and ports vanilla's screen narration: `crates/horizon-narrator/src/screen.rs` (`ScreenNarration::schedule`, `due`, `run`, `find_narratable`), the driver `crates/horizon-client/src/screen_narrator.rs`, and the glue in `crates/horizon-client/src/game/narrator.rs`. Each row now names the function or arm that answers it. Verdicts corrected: - `Checkbox.updateWidgetNarration` -> `inline screen_narrator.rs::narrate`, from `skip:other`: the checkbox arm adds `gui.narrate.button(message)` and then `narration.checkbox.usage.{focused,hovered}.{check,uncheck}` while the widget is active. The method's bytecode is `createNarrationMessage`, `isFocused` and those two `Component.translatable` calls, and the four keys it builds are the four the arm reads. - `CycleButton.updateWidgetNarration` -> `inline ...::narrate`: the cycle arm adds `gui.narrate.button(name: value)` and `narration.cycle_button.usage.{focused,hovered}` with the value a click moves to (`Narratable::cycle`'s `next`). - `CycleButton.createDefaultNarrationMessage` -> `inline ...::narrate`: vanilla's `wrapDefaultNarrationMessage` is the `gui.narrate.button` wrap, which the cycle arm does; the name and value it wraps are built where the widget is recorded (`options.generic_value` in the screen's label). - `EditBox.createNarrationMessage` -> `inline ...::narrate`: the edit-box arm builds `gui.narrate.editBox(message, value)`; the boxes record themselves through `Narratable::edit_box` (`ui::EditBox::draw`, `screen_draw.rs`). - `MultiLineEditBox.updateWidgetNarration` -> `inline ...::narrate`: the same arm. The method adds exactly `gui.narrate.editBox(message, value)`; books and dialogs record their multi-line boxes as `Narratable::edit_box`. - `ContainerObjectSelectionList.updateWidgetNarration` -> `inline ...::narrate`: the container-list arm takes the row under the mouse for the mouse and system triggers, else the focused one, then adds `narrator.position.list`. - `ContainerObjectSelectionList.Entry.updateNarration` -> `port screen_narrator.rs::narrate_row`, which is the method: `findNarratableWidget` over the row's widgets, the picked one's priority check, `narrator.position.object_list` and the widget one level deeper. - `FocusableTextWidget.updateWidgetNarration` -> `inline ...::narrate`: the text arm reads the widget's message as the title. The row keeps a `gap: minor:` for the optional focus and hover usage a `FocusableTextWidget` can carry. - `ItemDisplayWidget.updateWidgetNarration` -> `inline game/stats_screen.rs::Game::draw_stats`: the stats screen's item row is an `ItemDisplayWidget` and records `narration.item(<hover name>)`. - `LockIconButton.createNarrationMessage` -> `inline game/lan_screen.rs::WorldOptions::narration`: the difficulty lock button is `gui.narrate.button(narrator.button.difficulty_lock)` joined for narration with `narrator.button.difficulty_lock.locked` or `.unlocked`. - `CommandSuggestions.getUsageNarration` -> `port chat.rs::ChatScreen::suggestions_usage`: the four `narration.suggestion.usage.{cycle,fill}.{hidable,fixed}` keys, chosen by whether Tab cycles the list, which `Game::draw_command_block` passes as the screen's usage. - `CommandSuggestions.SuggestionsList.getNarrationMessage` -> `port chat.rs::suggestion_narration`: `narration.suggestion`, or `narration.suggestion.tooltip` with the entry's tooltip, over the position, the count and the text; `SuggestionList::narration_message` marks `lastNarratedEntry` as the method does. - `CommandSuggestions.getNarrationMessage` -> `inline chat.rs::SuggestionList::narration_message`: the same text, said when the selection moves (`ChatScreen::select`). The row keeps a `gap: minor:` because it is not added to the chat screen's own narration element (`screen_info::chat` reads the usage and the typed message). Nothing else in the file changed; row count and columns are the same. ``` PORT_LEDGER_OUT=/tmp/pledger-n2 python3 tools/port_ledger.py map-check tools/port_map/client2-010.tsv 144 rows, no problems. ``` **Proven:** the ledger here is built from the 26.3 client and server jars at `main`; every class, method and Rust fn these rows name resolves in it; each note is read from the function or match arm it cites, and each vanilla side from that method's bytecode in the client jar (the keys it builds, the calls it makes). **Not proven:** no listen to the narration in a running client; these are ledger rows, not behaviour changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:57 +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#7338
No description provided.