fix(ui): make the module tab strip a scrollable single column - #171
Closed
DeepDiver1975 wants to merge 1 commit into
Closed
fix(ui): make the module tab strip a scrollable single column#171DeepDiver1975 wants to merge 1 commit into
DeepDiver1975 wants to merge 1 commit into
Conversation
Root cause (systematic-debugging, reported live with a screenshot on a "relative small screen"): TabControl's TabStripPlacement="Left" (the "dispatch sidebar" rail — Theme/Styles.axaml) used Avalonia's default items panel, a vertically-oriented WrapPanel. Once the rail ran out of height for all 11 fixed-MinHeight-50 TabItems, it wrapped into a second column starting back at the top — WASSERFÖRDERUNG rendered directly beside AUFBAU, ABBAU beside ETB, exactly as reported. Forcing a single-column StackPanel alone wasn't enough: confirmed via a headless test that Avalonia's default template has no ScrollViewer around PART_ItemsPresenter at all, so without wrapping the last tabs would have simply been clipped off the bottom edge with no way to reach them — the same class of bug as the earlier Wasserförderung map zoom/pan dead-end, just in the navigation rail instead. Fix: replace TabControl's template with a small purpose-built one (this app only ever uses TabStripPlacement="Left", so no need to handle other placements) — a single-column ItemsPresenter wrapped in its own ScrollViewer beside the content host, instead of patching Avalonia's default template. Verified headlessly: at a window short enough that the rail genuinely needs it, all tabs stay in one column (monotonically increasing Y) and the last tab (ABBAU) is reachable by scrolling the rail into view. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UwN31QccH98YV9eEc2bue2 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Collaborator
Author
|
Closing as redundant: this branch stacks on |
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.
Summary
Reported live, with a screenshot on a "relative small screen": the left module tab strip
(AUFBAU, ETB, ..., WASSERFÖRDERUNG, ABBAU) became unusable — WASSERFÖRDERUNG rendered directly
beside AUFBAU, ABBAU beside ETB, both crammed and unreadable.
Root cause:
TabControl'sTabStripPlacement="Left"(the "dispatch sidebar" rail inTheme/Styles.axaml) relied on Avalonia's default items panel for that placement — avertically-oriented
WrapPanel. Once the rail ran out of height for all 11 fixed-MinHeight-50TabItems, it wrapped into a second column starting back at the top, exactly matching thescreenshot.
Forcing a single-column panel alone wasn't sufficient — confirmed via a headless test that
Avalonia's default template has no
ScrollVieweraroundPART_ItemsPresenterat all, sowithout wrapping, the last tabs would simply be clipped off the bottom edge with no way to reach
them (the same class of dead-end as the earlier Wasserförderung map zoom/pan bug fixed in #170,
just in the navigation rail this time).
Fix
Replaced
TabControl's template with a small purpose-built one — this app only ever usesTabStripPlacement="Left", so there's no need to handle other placements generically: asingle-column
ItemsPresenterwrapped in its ownScrollViewer, laid out beside the contenthost, instead of patching around Avalonia's default template's WrapPanel.
Verification
ModuleTabStripLayoutTests.Tabs_stay_in_a_single_column_top_to_bottom_on_a_short_window:confirmed red before the fix (reproduced the exact Y-position jump backward that causes the
visual overlap), green after — all tabs stay in one column (monotonically increasing Y), and
the last tab (ABBAU) is reachable by scrolling the rail into view at a window height that
genuinely needs it.
dotnet test LageBuch.sln: 948 tests passing, 1 pre-existing skip. This retemplates acontrol used throughout the whole app's navigation, so the full suite (extensively exercising
tab switching) is the relevant regression check here, not just the new test.
Screenshot
Please paste
/tmp/lagebuch-shots/module-tab-strip-small-screen-fixed.pnginto the PR body — Ican't upload images directly. It shows the rail scrolled to its bottom at a genuinely short
window: ATEMSCHUTZ through ABBAU all render single-column and legible, with a visible scrollbar
on the rail itself.
Checklist
git commit -s)dotnet buildanddotnet testpass locally (948 tests, 1 pre-existing skip)Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
https://claude.ai/code/session_01UwN31QccH98YV9eEc2bue2