Repository navigation
HUD plugins: focus travel follows the drawn order - #1197
Merged
Merged
Conversation
…ompiled layout player_hud::travel::order reads the groups that have a stop in a state (the bar, the row, the tab pills, an open strip, an open section's buttons) and orders them top to bottom by the rects the compiled layout reports. Each links to its neighbours; the top group and the bottom group are the edge answers. Nothing names a package. Nothing calls it yet; the screen takes it next. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PlayerScreen::links and answer_edge read player_hud::travel::order instead of classic's fixed row, bar, tabs. The reference draws its row below the bar and has no tab pills, so Down from the bar went nowhere, Up reached a row that sat below it, a second Up hid the transport even paused, and with Chapters and Info both open Down off the row entered only the latest section and every section's Up went to the row, so the bar and the other section were out of reach. Now each group with a stop links to the one above and the one below it. Up off the topmost group is what Up off the row was (hide; swallowed under an open section); Down off the bottom one stays put and re-arms the linger. Up into the row (or tabs) from an open section lands on the control that opened it, as BACK does. Classic comes out as exactly today's order and no classic test changed; a modal section keeps its own links. The reference tests that walked by the inverted keys (go_to_item and what builds on it) take the real ones; up_off_the_row_under_an_open_inline_page_arms_no_hidden_dismissal is now up_off_the_bar_under_an_open_inline_page_arms_no_hidden_dismissal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…omments follow the order Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # rust-modules/appkit/src/player_hud/loaded.rs
…anding Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he disc HudGeometry::tabs reported every toggle_section control, so the reference's Info and Chapters discs were also registered as hidden tab stops at the discs' rects. The hit map resolves the later stop, so a Magic Remote click on a disc was a press of a TAB: focus went to the tab group, which the drawn order no longer links, and Up and Down after the click did nothing. CompiledState::tab now reports the pill only. Every reader of geo.tabs gets the one predicate: the pointer's tab stops (place_in), the tab group (declared only when a pill is drawn, len to the last tab), and travel::order, which reads geo.tabs again instead of filtering pills itself. A click on a disc takes the row's arm of the click handler, so it presses what OK presses; classic and the tabs fixture, whose openers are pills, click as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUD plugins PR18: focus travel follows the drawn order
No issue tracks the HUD-plugin work; none was opened for this PR.
Found on the television with the reference package.
PlayerScreen::linkswas classic's fixed order (bar Up to row, bar Down to tabs, row Down to bar, tabs Up to bar) andanswer_edgehid the transport on Up off the row. The reference draws its row below the bar and has no tab pills, so Down from the bar went nowhere, Up reached a row that sits below it, a second Up dismissed even a paused transport, with Chapters and Info both open Down from the row entered only the latest section and every section's Up went to the row (the bar and the other section were out of reach), and Up from an open section landed on Play rather than the control that opened it.What changes
appkit::player_hud::travel::order(new): one pure function from the compiled state (the open set, the row's occupant, the content) to the groups that have a stop, ordered top to bottom by the rects the layout reports (the bar's track, the row, the tab pills, the open strip, the open section's buttons). A fixed array, no heap, no package key.Order::linkslinks each group to its neighbours both ways;top()andbottom()are the edge answers.PlayerScreen::linkstakes it, except a MODAL package's open section, which keeps its singleGROUP_TABSUp link.answer_edge: Up off the topmost group is the hide it was (swallowed while a section is open); Down off the bottom group stays put and re-arms the linger. The row's Down edge is nowEdgeRule::Screenfor that (a declared link still wins, so classic's row is unchanged).seatfor the row and tab groups lands on the control that opened the open section focus is leaving (opener_elem, the lookup BACK uses), disc or pill; else the usual landing.docs/hud-plugins.md: D6's "focus travels freely" says how, and the package-authoring text states the rule.Classic comes out as exactly today's row, bar, tabs. No classic test changed.
Reference tests that changed (inverted keys -> the real keys)
go_to_item(and so every reference test that walks by it):UU->UD(Up raises it onto the bar, Down enters the row below).up_off_the_row_under_an_open_inline_page_arms_no_hidden_dismissal->up_off_the_bar_under_an_open_inline_page_arms_no_hidden_dismissal: same meaning at the topmost group, which is now the bar.go_to_item:the_reference_opens_chapters_inline_and_travels_between_it_and_the_row,the_reference_stacks_info_over_chapters_and_back_unwinds_them_in_order,closing_all_sections_twice_in_one_frame_leaves_them_closed.New tests
travel::tests(appkit, the pure order over classic, the reference with each section set,minimal,hero-center,tabs) and, inhud_pins_tests.rson the reference: Down from the bar reaches the row and Down off the bottom stays; Up off the bar dismisses a paused transport; the bar is reachable with a section open; Up from the strip lands on the Chapters disc; both sections open walk bar, row, strip, Info both ways (Info with buttons); Up from Info's buttons lands on the Info disc; Up from thetabsfixture's strip lands on the Chapters pill; Up from a section no control opens lands on the row's usual place (a pin, green on the old code too).Not decided here
reference_with_info_actions_for_test(the reference with two buttons in its Info section).tabsfixture is an inline package whose pills share the row's band, so the bar, row, tabs order comes from a tie in the rects (the fixed order breaks it).Review fix: a tab is a pill
The review found, and the television confirmed, that a click on the reference's Info disc left Up and Down dead: a disc that opens a section was registered as a row stop and as a hidden tab stop, and the hit map resolves the later one.
HudGeometry::tabsnow reports pills only, one predicate, so a click on a disc takes the row's arm and fires what OK on that disc fires,groups_indeclares the tab group only when a pill is drawn, andtravel::orderreadsgeo.tabsagain. No classic test moved.On the television
Episode with chapters on the mock, paused,
--guest, head2e346e50b.Reference: click on Info, Up reaches the bar with the card open, Down the row, Down stays. Down from the bar lands on the row's primary, Next on an episode, Play on a film. Click on Chapters with Info open: the strip opens on the current chapter, Up lands on the Chapters disc, Left walks the row. BACK closes the latest section onto its disc, the other stays; BACK again closes Info onto its disc.
Classic is unchanged: Up from the bar reaches the row; Down walks bar, then tabs, then stays; a click on a pill opens its section as OK does; Up off the row hides, paused too.
🤖 Generated with Claude Code