Conversation
Co-authored-by: bdlukaa <45696119+bdlukaa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix NavigationView compact pane Flyout size in right-to-left directionality
fix: NavigationView compact pane PaneItemExpander flyout too small in RTL
Mar 17, 2026
Owner
|
@copilot The first PaneItemExpander of the home screen is being displayed at the middle of the screen. It should be positioned correctly. |
…s tall Co-authored-by: bdlukaa <45696119+bdlukaa@users.noreply.github.com>
Contributor
Author
Fixed in d2a9f35. The root cause was a bug in // Old - wrong when flyout is taller than space above the target:
final topY = clampVertical(targetOffset.dy - targetSize.height - flyoutSize.height);
final horizontalTopY = clampVertical(topY + flyoutSize.height);When // New - directly computes the top edge of the target:
final horizontalTopY = clampVertical(targetOffset.dy - targetSize.height);This correctly aligns the flyout's top edge with the top of the target element in all cases. |
Copilot
AI
changed the title
fix: NavigationView compact pane PaneItemExpander flyout too small in RTL
fix: NavigationView compact pane PaneItemExpander flyout size and position
Mar 17, 2026
bdlukaa
approved these changes
Mar 17, 2026
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.
In RTL directionality, the compact navigation pane appears on the physical right side of the screen. The flyout was hardcoded to
FlyoutPlacementMode.rightTop, which only had ~50px of available space (the pane width itself) rather than the full content area width. Additionally, theleftTop/rightTopflyout placement modes had a vertical positioning bug that caused flyouts to appear in the middle of the screen instead of aligned with the target item.Changes
pane_items.dart: Resolve the flyout placement mode against the current text direction so it usesleftTopin RTL (physically left = into the content area) andrightTopin LTR — leveraging the existingFlyoutPlacementMode.resolve()method.flyout.dart: FixedhorizontalTopYcalculation in_FlyoutPositionDelegate. The old formula used two chainedclampVerticalcalls that produced incorrect results when the flyout is taller than the space above the target element, causing the flyout to appear in the middle of the screen:test/navigation_view_test.dart: Added regression test asserting the flyout width exceedskCompactNavigationPaneWidthwhen opened in RTL compact mode.CHANGELOG.md: Added entries under4.15.0.Original prompt
NavigationViewcompact pane Flyout is too small when in right-to-left directionality #1289✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.