Skip to content

Simplify the player sub-menu code: one popover focus-stop implementation, shared geometry and language helpers - #357

Merged
GLinnik21 merged 1 commit into
mainfrom
refactor/simplify-player-submenus
Oct 1, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
refactor/simplify-player-submenus

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

This is a behaviour-identical cleanup of the player drill-in sub-menus (#335, #345, #346, #347, #352). It comes from a simplify review pass (reuse, simplification, efficiency, altitude).

What changed

  • ui/page_stack.rs: TrackMenuPart and MoreMenuPart had character-identical groups / group_of / neighbour / place / seat / draw. They now share popover_* helpers over a PopoverPanel trait, and each part keeps only its own reconcile. Stops register in the same order.
  • theme::layout::PLAYER_MENU_BOTTOM replaces five literal SCR_H - 316.0. The value is the same.
  • is_title_key wrappers removed: the callers use page_stack::is_title_key directly.
  • metadata/sub_layout.rs:
    • One display_lang helper replaces the unknown-language rule that was written twice.
    • is_image_sub_codec is now derived from image_codec_badge, so the two lists can't drift.
  • track_menu.rs: the other_tab_warmed flag is gone. It was true exactly when background_owner was Some, so the code reads that instead.
  • panel_motion.rs: begin_slide loses an expect and a duplicated reset branch.

No canon or state-hash bytes, SCREEN_SHAPES_PIN, replay fixtures, FEED_* constants or motion timings change. The content delta is +239 non-whitespace bytes: the removed copies are offset by the shared helpers and their docs.

Gates (committed tree c2b45f226)

  • cargo test --lib: test result: ok. 5389 passed; 0 failed; 7 ignored
  • --no-default-features check: clean
  • ARM make: rc 0
  • make check: rc 0 (5389 / 5466 / 102 passed, 0 failed)

🤖 Generated with Claude Code

…ion, shared geometry and language helpers

TrackMenuPart and MoreMenuPart carried character-identical groups/group_of/neighbour/place/seat
and Part::draw. They now call popover_* helpers over a PopoverPanel trait in page_stack.rs and
keep only their own reconcile. Also: PLAYER_MENU_BOTTOM replaces five SCR_H - 316.0 literals,
the is_title_key wrappers go (page_stack::is_title_key is called directly), sub_layout shares one
display_lang and derives is_image_sub_codec from image_codec_badge, the redundant
other_tab_warmed flag is derived from background_owner, and begin_slide drops an expect.

No behaviour change: same stops in the same order, same canon bytes, no constant touched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 38bc064 into main Oct 1, 2026
5 checks passed
@GLinnik21
GLinnik21 deleted the refactor/simplify-player-submenus branch October 1, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant