Flyout rework#690
Merged
Merged
Conversation
* Transitions * dismissWithEsc * dismissOnPointerMoveAway * shouldConstrainToRootBounds * barrierColor * navigatorKey
Now, it only applies the additional offset according to the placement mode
* Renamed MenuFlyoutItemInterface to MenuFlyoutItemBase; * Improved documentation; * Ensure available space is always positive
Owner
Author
|
Some updates to |
Closed
Owner
Author
|
There should be an option to position the flyout anywhere in the screen (#622) |
This was
linked to
issues
Jan 24, 2023
dvd-bnc
reviewed
Jan 25, 2023
Contributor
dvd-bnc
left a comment
There was a problem hiding this comment.
That's most of the stuff i found, some things could be expanded and explained better if needed, you know where to find me in case :)
| @@ -0,0 +1,124 @@ | |||
| import 'package:fluent_ui/fluent_ui.dart'; | |||
|
|
|||
| class ContentManager extends StatefulWidget { | |||
Contributor
There was a problem hiding this comment.
Is this documented anywhere?
| return MenuFlyout( | ||
| items: widget.items.map<MenuFlyoutItemBase>((item) { | ||
| if (item is PaneItem) { | ||
| return _PaneItemExpanderMenuItem( |
Contributor
There was a problem hiding this comment.
Consider adding a method like getMenuItem to PaneItem so you can remove this whole switch/case statement
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.
Fixes #27
Flyouts were reworked to match the design and behavior of native WinUI 3
BREAKING Removed
Flyoutwidget.To replace it,
FlyoutTargetandFlyoutControllerwere created.FlyoutTargetworks like a target, which the givencontrollerwill use to display the flyoutMigration guide:
Before:
Now:
Now, it's possible to dismiss the flyout by tapping the barrier (
barrierDismissible), pressing theESCkeyboard key (dismissWithEsc) and by moving the cursor (pointer) away from the flyout (dismissOnPointerMoveAway- defaults to false);Automatic mode is finally implemented, and it's the default mode. By setting
autoModeConfiguration, it's possible to customize the preferred flyout placement. If flyout doesn't meet the placement conditions, it decides where it fits the best.forceAvailableSpacedetermines whether the flyout size should be forced the available space according to the attached target. It's useful when the flyout is large but can not be on top of the target.NavigationView's top navigation mode now uses it by default on pane items overflow.shouldConstrainToRootBoundsdetermines whether the flyout should fit the root bounds - usually the window bounds. If false, the flyout will be able to overflow the screen on all sides. Defaults totruemargindetermines the margin of the flyout to the root.additionalOffsetdetermines the margin of the flyout to the target.It's now possible to assign a custom transition to the flyout by providing
transitionBuilderandtransitionDuration. By default, a light slide-fade transition is used, but it can be highly customizable to fit your needs. It provides the current placement mode - since automatic mode may change it at layout time.DropdownButtonuses it to create its slidethrough transition.positionandplacementwere replaced byplacementMode, which gives horizontal and vertical options of placement, at all screen alignments. It's also possible to use it in a right-to-left context by usingplacementMode.resolve(Directionality.of(context))Pre-launch Checklist
CHANGELOG.mdwith my changes