Skip to content

backstage: the side menu scrolls when the window is too short for it (#6639) - #6647

Open
dotCooCoo wants to merge 1 commit into
storytold:mainfrom
dotCooCoo:fix/backstage-sidebar-scroll
Open

dotCooCoo wants to merge 1 commit into
storytold:mainfrom
dotCooCoo:fix/backstage-sidebar-scroll

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6639.

The File page's side menu was laid out at a fixed height with nothing to scroll it. In a window too short for the menu, the items below the window's bottom edge (Options and About, and more as the window gets shorter) were cut off, and the wheel over the menu did nothing. This happened left to right and right to left.

In crates/ui-egui/src/backstage.rs, the menu items and the bottom links (About and the community link) are now in a vertical scroll area below the back button, and an item reached with Tab scrolls into view. When the whole menu fits, About and the community link stay at the bottom of the menu as before.

Tests in crates/ui-egui/src/backstage/tests.rs:

  • the_side_menu_scrolls_with_the_wheel_in_a_short_window: a 360 point tall window, left to right and right to left (a fixture catalog, so it does not need the translations). It fails without the scroll area: Options stays at y 490 to 528 in both directions after the wheel.
  • tab_to_about_scrolls_it_into_a_short_window: Tab to About in the same window, both directions. It fails without the scroll-into-view: About gets the focus at y 376 to 408, below the window's bottom edge at 352.
  • about_stays_at_the_bottom_of_a_side_menu_that_fits: About's place in a 900 point window, both directions, with and without the macOS title bar.

Checks

Run on Linux (Ubuntu 26.04) on 6f9c45a, based on main at 60415e0:

  • cargo fmt --all -- --check
  • cargo clippy -p wordcraft-ui-egui --all-targets -- -D warnings
  • cargo test -p wordcraft-ui-egui --no-fail-fast: 1,259 passed, 3 failed, 3 ignored. Without CRAFT_I18N_DIR and CRAFT_FONTS_DIR, backstage::tests::rtl_template_titles_are_right_aligned and theme::tests::interface_symbols_have_glyphs fail with the same messages on 60415e0. tests::a_pointer_zoom_stretches_pages_until_it_stops failed in the full run and passed in three runs on its own.

Summary by CodeRabbit

  • Improvements
    • The Backstage menu now scrolls when its contents exceed the available space, and keyboard focus brings navigation items into view.
    • About and the optional Discord link remain at the bottom when space allows, and scroll with the menu when it does not.

…torytold#6639)

The File page's side menu was laid out at a fixed height, so in a window
too short for it the items below the window's bottom edge (Options and
About, and more as the window gets shorter) were cut off, and the wheel
over the menu did nothing.

The menu below the back button is now a vertical scroll area, and a menu
item reached with Tab scrolls into view. When the whole menu fits, About
and the community link stay at the bottom of the menu as before. Tests
cover the wheel and Tab in a short window, left to right and right to
left, and About's place when the menu fits, with and without the macOS
title bar.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Backstage side menu now scrolls when its contents exceed the available height. About and the optional Discord link remain at the bottom when space permits. Focused navigation rows and links scroll into view. Regression tests cover scrolling, keyboard focus, layout direction, and integrated macOS title bars.

Changes: Backstage Side-Menu Scrolling

Layer / File(s) Summary
Scrollable navigation and focus
crates/ui-egui/src/backstage.rs, crates/ui-egui/src/backstage/tests.rs
Page rows now appear in a vertical scroll area. Tests check wheel scrolling and verify that Backstage remains open in both layout directions.
Bottom-link placement and focus
crates/ui-egui/src/backstage.rs, crates/ui-egui/src/backstage/tests.rs
About and the optional Discord link follow the page rows. Focused links scroll into view. Tests check keyboard focus and confirm About remains 12 points above the window margin when the menu fits.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Suggested reviewers: echelon, tareq-halaby, aiongg

Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity>

Merge Risk: Minimal · up to 6f9c4

The File side menu now scrolls when the window is short, and About and the community link stay at the bottom when there is room. The change is limited to the menu layout and has regression tests. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the Backstage side menu now scrolls when the window is too short to show all of its items. The raw summary confirms vertical scrolling of the menu, with About and the …
Linked Issues check Passed Issue #6639 asks that the File side menu stay reachable when the window is shorter than the menu. It expects either mouse-wheel scrolling or a layout that fits all items. The diff to crates/ui-egui/sr…
Out of Scope Changes check Passed All source changes sit in the backstage side menu. The diff covers the PAGES loop, the bottom links, and the scroll wrapper, which are the elements the issue describes. The changes keep existing behav…
Full details: Title check

Explanation

The title names the main change: the Backstage side menu now scrolls when the window is too short to show all of its items. The raw summary confirms vertical scrolling of the menu, with About and the Discord link placed in the scrollable content when space is short. The objectives show the same intent, linked to issue #6639. The title includes the issue reference, which is acceptable and does not make it misleading. The title is 76 characters, which is within a reasonable length for a title.

Full details: Linked Issues check

Explanation

Issue #6639 asks that the File side menu stay reachable when the window is shorter than the menu. It expects either mouse-wheel scrolling or a layout that fits all items. The diff to crates/ui-egui/src/backstage.rs wraps the page rows and bottom links in egui::ScrollArea::vertical() with id_salt "backstage_nav_scroll". This gives wheel scrolling in both LTR and RTL layouts, which meets the expected outcome. Rows and links call scroll_to_me() on gained_focus(), so Tab-focused items scroll into view. When the menu fits, a computed gap (fits - links_h) keeps About and the community link at the bottom, which preserves the prior layout. The reported tests in crates/ui-egui/src/backstage/tests.rs cover these cases. I read the source diff but did not run the tests or the build. The test outcomes rest on the PR description and the summary.

Full details: Out of Scope Changes check

Explanation

All source changes sit in the backstage side menu. The diff covers the PAGES loop, the bottom links, and the scroll wrapper, which are the elements the issue describes. The changes keep existing behavior: enabled and disabled states, the active highlight, keytip badges, click handling, and the discord and about actions. The added tests in tests/tests.rs cover the same menu. No unrelated files or behavior changes appear in the summary or the diff I read.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b02baeb and 6f9c45a.

Files selected for processing: 2

  • crates/ui-egui/src/backstage.rs
  • crates/ui-egui/src/backstage/tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
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.

[UI/UX] Sidebar menu is not scrollable when the window is resized after clicking the "File" option

1 participant