From bdce2c9bab37ff21fc5eb688ba6e91260573d905 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka <45696119+bdlukaa@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:07:16 -0300 Subject: [PATCH 1/4] Add keys to indicator to hold state --- .../navigation/navigation_view/body.dart | 21 +++++++++++++ .../navigation_view/pane_items.dart | 8 ++++- .../navigation/navigation_view/view.dart | 30 ++++++++++++++++++- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/lib/src/controls/navigation/navigation_view/body.dart b/lib/src/controls/navigation/navigation_view/body.dart index d616abbba..ff10ec5fd 100644 --- a/lib/src/controls/navigation/navigation_view/body.dart +++ b/lib/src/controls/navigation/navigation_view/body.dart @@ -239,3 +239,24 @@ class InheritedNavigationView extends InheritedWidget { oldWidget.itemIndex != oldWidget.itemIndex; } } + +class _PaneItemKeys extends InheritedWidget { + const _PaneItemKeys({ + Key? key, + required Widget child, + required this.keys, + }) : super(key: key, child: child); + + final Map keys; + + static GlobalKey of(int index, BuildContext context) { + final reference = + context.dependOnInheritedWidgetOfExactType<_PaneItemKeys>()!; + return reference.keys[index]!; + } + + @override + bool updateShouldNotify(_PaneItemKeys oldWidget) { + return keys != oldWidget.keys; + } +} diff --git a/lib/src/controls/navigation/navigation_view/pane_items.dart b/lib/src/controls/navigation/navigation_view/pane_items.dart index ad5b381be..782cdc494 100644 --- a/lib/src/controls/navigation/navigation_view/pane_items.dart +++ b/lib/src/controls/navigation/navigation_view/pane_items.dart @@ -366,6 +366,12 @@ class PaneItem extends NavigationPaneItem { } }(); + final GlobalKey? key = () { + if (index != null && !index.isNegative) { + return _PaneItemKeys.of(index, context); + } + }(); + return Padding( padding: const EdgeInsets.only(bottom: 4.0), child: () { @@ -377,7 +383,7 @@ class PaneItem extends NavigationPaneItem { child: InheritedNavigationView.merge( itemIndex: index, child: KeyedSubtree( - key: index != null ? ValueKey(index) : null, + key: index != null ? key : null, child: maybeBody!.pane!.indicator!, ), ), diff --git a/lib/src/controls/navigation/navigation_view/view.dart b/lib/src/controls/navigation/navigation_view/view.dart index 71b762c4c..bc1a5a0ae 100644 --- a/lib/src/controls/navigation/navigation_view/view.dart +++ b/lib/src/controls/navigation/navigation_view/view.dart @@ -99,6 +99,8 @@ class NavigationViewState extends State { final _contentKey = GlobalKey(); final _overlayKey = GlobalKey(); + final Map _itemKeys = {}; + /// The overlay entry used for minimal pane OverlayEntry? minimalOverlayEntry; @@ -117,6 +119,8 @@ class NavigationViewState extends State { scrollController.addListener(() { if (mounted) setState(() {}); }); + + generateKeys(); } @override @@ -129,6 +133,27 @@ class NavigationViewState extends State { if (oldWidget.pane?.selected != widget.pane?.selected) { oldIndex = oldWidget.pane?.selected ?? 0; } + + if (oldWidget.pane?.effectiveItems.length != + widget.pane?.effectiveItems.length) { + if (widget.pane?.effectiveItems.length != null) { + generateKeys(); + } + } + } + + void generateKeys() { + _itemKeys + ..clear() + ..addAll( + Map.fromIterables( + List.generate(widget.pane!.effectiveItems.length, (i) => i), + List.generate( + widget.pane!.effectiveItems.length, + (_) => GlobalKey(), + ), + ), + ); } @override @@ -512,7 +537,10 @@ class NavigationViewState extends State { minimalPaneOpen: _minimalPaneOpen, pane: widget.pane, oldIndex: oldIndex, - child: paneResult, + child: _PaneItemKeys( + keys: _itemKeys, + child: paneResult, + ), ), ); } From 92ab980f0084625adf00dce28e62f0a728bbafdc Mon Sep 17 00:00:00 2001 From: Bruno D'Luka <45696119+bdlukaa@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:16:20 -0300 Subject: [PATCH 2/4] auto display mode no longer creates a new NavigationView --- .../navigation/navigation_view/body.dart | 1 + .../navigation/navigation_view/view.dart | 560 +++++++++--------- 2 files changed, 269 insertions(+), 292 deletions(-) diff --git a/lib/src/controls/navigation/navigation_view/body.dart b/lib/src/controls/navigation/navigation_view/body.dart index ff10ec5fd..7221e26cf 100644 --- a/lib/src/controls/navigation/navigation_view/body.dart +++ b/lib/src/controls/navigation/navigation_view/body.dart @@ -240,6 +240,7 @@ class InheritedNavigationView extends InheritedWidget { } } +/// Makes the [GlobalKey]s for [PaneItem]s accesible on the scope. class _PaneItemKeys extends InheritedWidget { const _PaneItemKeys({ Key? key, diff --git a/lib/src/controls/navigation/navigation_view/view.dart b/lib/src/controls/navigation/navigation_view/view.dart index bc1a5a0ae..8edd4d1e3 100644 --- a/lib/src/controls/navigation/navigation_view/view.dart +++ b/lib/src/controls/navigation/navigation_view/view.dart @@ -213,279 +213,162 @@ class NavigationViewState extends State { ); }(); - Widget paneResult = LayoutBuilder( - builder: (context, consts) { - late Widget paneResult; - if (widget.pane != null) { - final pane = widget.pane!; - if (pane.customPane != null) { - paneResult = Builder(builder: (context) { - return pane.customPane!.build( - context, - NavigationPaneWidgetData( - appBar: appBar, - content: ClipRect(child: widget.content), - listKey: _listKey, - paneKey: _panelKey, - scrollController: scrollController, - pane: pane, - ), - ); - }); - } else if (pane.displayMode == PaneDisplayMode.auto) { - /// For more info on the adaptive behavior, see - /// https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview#adaptive-behavior - /// - /// DD/MM/YYYY - /// (23/05/2021) - /// - /// When PaneDisplayMode is set to its default value of Auto, the adaptive behavior is to show: - /// - An expanded left pane on large window widths (1008px or greater). - /// - A left, icon-only, nav pane (compact) on medium window widths (641px to 1007px). - /// - Only a menu button (minimal) on small window widths (640px or less). - double width = consts.biggest.width; - if (width.isInfinite) width = MediaQuery.of(context).size.width; - - late PaneDisplayMode autoDisplayMode; - if (width <= 640) { - autoDisplayMode = PaneDisplayMode.minimal; - } else if (width >= 1008) { - autoDisplayMode = PaneDisplayMode.open; - } else if (width > 640) { - autoDisplayMode = PaneDisplayMode.compact; - } + return LayoutBuilder(builder: (context, consts) { + var displayMode = widget.pane?.displayMode ?? PaneDisplayMode.auto; + + if (displayMode == PaneDisplayMode.auto) { + /// For more info on the adaptive behavior, see + /// https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview#adaptive-behavior + /// + /// DD/MM/YYYY + /// (23/05/2021) + /// + /// When PaneDisplayMode is set to its default value of Auto, the adaptive behavior is to show: + /// - An expanded left pane on large window widths (1008px or greater). + /// - A left, icon-only, nav pane (compact) on medium window widths (641px to 1007px). + /// - Only a menu button (minimal) on small window widths (640px or less). + double width = consts.biggest.width; + if (width.isInfinite) width = MediaQuery.of(context).size.width; + + late PaneDisplayMode autoDisplayMode; + if (width <= 640) { + autoDisplayMode = PaneDisplayMode.minimal; + } else if (width >= 1008) { + autoDisplayMode = PaneDisplayMode.open; + } else if (width > 640) { + autoDisplayMode = PaneDisplayMode.compact; + } + + displayMode = autoDisplayMode; + } - assert(autoDisplayMode != PaneDisplayMode.auto); - - /// We display a new navigation view with the current display mode. - /// We can do this because [autoDisplayMode] can never be `auto`, - /// so it won't stack overflow (error). - return NavigationView( - appBar: widget.appBar, - content: widget.content, - clipBehavior: widget.clipBehavior, - contentShape: widget.contentShape, - pane: NavigationPane( - displayMode: autoDisplayMode, - autoSuggestBox: pane.autoSuggestBox, - autoSuggestBoxReplacement: pane.autoSuggestBoxReplacement, - footerItems: pane.footerItems, - size: pane.size, - header: pane.header, - items: pane.items, - key: pane.key, - onChanged: pane.onChanged, - selected: pane.selected, - menuButton: pane.menuButton, - scrollController: pane.scrollController, - indicator: pane.indicator, + assert(displayMode != PaneDisplayMode.auto); + + late Widget paneResult; + if (widget.pane != null) { + final pane = widget.pane!; + if (pane.customPane != null) { + paneResult = Builder(builder: (context) { + return pane.customPane!.build( + context, + NavigationPaneWidgetData( + appBar: appBar, + content: ClipRect(child: widget.content), + listKey: _listKey, + paneKey: _panelKey, + scrollController: scrollController, + pane: pane, ), ); - } else { - final contentShape = widget.contentShape ?? - RoundedRectangleBorder( - side: BorderSide( - width: 0.3, - color: FluentTheme.of(context).brightness.isDark - ? Colors.black - : const Color(0xffBCBCBC), - ), - borderRadius: const BorderRadiusDirectional.only( - topStart: Radius.circular(8.0), - ).resolve(direction), - ); - final Widget content = ClipRect( - key: _contentKey, - child: pane.displayMode == PaneDisplayMode.minimal - ? widget.content - : DecoratedBox( - position: DecorationPosition.foreground, - decoration: ShapeDecoration(shape: contentShape), - child: ClipPath( - clipBehavior: widget.clipBehavior, - clipper: ShapeBorderClipper(shape: contentShape), - child: widget.content, - ), - ), - ); - if (pane.displayMode != PaneDisplayMode.compact) { - _compactOverlayOpen = false; - } - switch (pane.displayMode) { - case PaneDisplayMode.top: - paneResult = Column(children: [ - appBar, - PrimaryScrollController( - controller: scrollController, - child: _TopNavigationPane( - pane: pane, - listKey: _listKey, - scrollbarKey: _scrollbarKey, - appBar: widget.appBar, + }); + } else { + final contentShape = widget.contentShape ?? + RoundedRectangleBorder( + side: BorderSide( + width: 0.3, + color: FluentTheme.of(context).brightness.isDark + ? Colors.black + : const Color(0xffBCBCBC), + ), + borderRadius: const BorderRadiusDirectional.only( + topStart: Radius.circular(8.0), + ).resolve(direction), + ); + final Widget content = ClipRect( + key: _contentKey, + child: displayMode == PaneDisplayMode.minimal + ? widget.content + : DecoratedBox( + position: DecorationPosition.foreground, + decoration: ShapeDecoration(shape: contentShape), + child: ClipPath( + clipBehavior: widget.clipBehavior, + clipper: ShapeBorderClipper(shape: contentShape), + child: widget.content, ), ), - Expanded(child: content), - ]); - break; - case PaneDisplayMode.compact: - void toggleCompactOpenMode() { - setState(() => _compactOverlayOpen = !_compactOverlayOpen); - } - - final openSize = - pane.size?.openWidth ?? _kOpenNavigationPanelWidth; - - final bool openedWithoutOverlay = - _compactOverlayOpen && consts.maxWidth / 2.5 > openSize; - - paneResult = Stack(children: [ - AnimatedPositionedDirectional( - duration: theme.animationDuration ?? Duration.zero, - curve: theme.animationCurve ?? Curves.linear, - top: widget.appBar?.height ?? 0.0, - start: openedWithoutOverlay - ? openSize - : pane.size?.compactWidth ?? - _kCompactNavigationPanelWidth, - end: 0, - bottom: 0, - child: content, + ); + if (displayMode != PaneDisplayMode.compact) { + _compactOverlayOpen = false; + } + switch (displayMode) { + case PaneDisplayMode.top: + paneResult = Column(children: [ + appBar, + PrimaryScrollController( + controller: scrollController, + child: _TopNavigationPane( + pane: pane, + listKey: _listKey, + scrollbarKey: _scrollbarKey, + appBar: widget.appBar, ), - // If the overlay is open, add a gesture detector above the - // content to close if the user click outside the overlay - if (_compactOverlayOpen) - Positioned.fill( - child: GestureDetector( - onTap: toggleCompactOpenMode, - child: AbsorbPointer( - child: Semantics( - label: localizations.modalBarrierDismissLabel, - child: const SizedBox.expand(), - ), + ), + Expanded(child: content), + ]); + break; + case PaneDisplayMode.compact: + void toggleCompactOpenMode() { + setState(() => _compactOverlayOpen = !_compactOverlayOpen); + } + + final openSize = + pane.size?.openWidth ?? _kOpenNavigationPanelWidth; + + final bool openedWithoutOverlay = + _compactOverlayOpen && consts.maxWidth / 2.5 > openSize; + + paneResult = Stack(children: [ + AnimatedPositionedDirectional( + duration: theme.animationDuration ?? Duration.zero, + curve: theme.animationCurve ?? Curves.linear, + top: widget.appBar?.height ?? 0.0, + start: openedWithoutOverlay + ? openSize + : pane.size?.compactWidth ?? + _kCompactNavigationPanelWidth, + end: 0, + bottom: 0, + child: content, + ), + // If the overlay is open, add a gesture detector above the + // content to close if the user click outside the overlay + if (_compactOverlayOpen) + Positioned.fill( + child: GestureDetector( + onTap: toggleCompactOpenMode, + child: AbsorbPointer( + child: Semantics( + label: localizations.modalBarrierDismissLabel, + child: const SizedBox.expand(), ), ), ), - PrimaryScrollController( - controller: scrollController, - child: () { - if (openedWithoutOverlay) { - return Mica( - key: _overlayKey, - backgroundColor: theme.backgroundColor, - child: Container( - margin: const EdgeInsets.symmetric(vertical: 1.0), - padding: appBarPadding, - child: _OpenNavigationPane( - theme: theme, - pane: pane, - paneKey: _panelKey, - listKey: _listKey, - scrollbarKey: _scrollbarKey, - onToggle: toggleCompactOpenMode, - onItemSelected: toggleCompactOpenMode, - ), - ), - ); - } else if (_compactOverlayOpen) { - return Mica( - key: _overlayKey, - backgroundColor: _overlayBackgroundColor(), - elevation: 10.0, - child: Container( - decoration: BoxDecoration( - border: Border.all( - color: const Color(0xFF6c6c6c), - width: 0.15, - ), - borderRadius: BorderRadius.circular(8.0), - ), - margin: const EdgeInsets.symmetric(vertical: 1.0), - padding: appBarPadding, - child: _OpenNavigationPane( - theme: theme, - pane: pane, - paneKey: _panelKey, - listKey: _listKey, - scrollbarKey: _scrollbarKey, - onToggle: toggleCompactOpenMode, - onItemSelected: toggleCompactOpenMode, - ), - ), - ); - } else { - return Padding( - padding: appBarPadding, - child: Mica( - key: _overlayKey, - backgroundColor: theme.backgroundColor, - child: _CompactNavigationPane( - pane: pane, - paneKey: _panelKey, - listKey: _listKey, - scrollbarKey: _scrollbarKey, - onToggle: toggleCompactOpenMode, - ), - ), - ); - } - }(), ), - appBar, - ]); - break; - case PaneDisplayMode.open: - paneResult = Column(children: [ - appBar, - Expanded( - child: Row(children: [ - PrimaryScrollController( - controller: scrollController, - child: _OpenNavigationPane( - theme: theme, - pane: pane, - paneKey: _panelKey, - listKey: _listKey, - scrollbarKey: _scrollbarKey, - ), - ), - Expanded(child: content), - ]), - ), - ]); - break; - case PaneDisplayMode.minimal: - paneResult = Stack(children: [ - Positioned( - top: widget.appBar?.height ?? 0.0, - left: 0.0, - right: 0.0, - bottom: 0.0, - child: content, - ), - if (_minimalPaneOpen) - Positioned.fill( - child: GestureDetector( - onTap: () { - setState(() => _minimalPaneOpen = false); - }, - child: AbsorbPointer( - child: Semantics( - label: localizations.modalBarrierDismissLabel, - child: const SizedBox.expand(), + PrimaryScrollController( + controller: scrollController, + child: () { + if (openedWithoutOverlay) { + return Mica( + key: _overlayKey, + backgroundColor: theme.backgroundColor, + child: Container( + margin: const EdgeInsets.symmetric(vertical: 1.0), + padding: appBarPadding, + child: _OpenNavigationPane( + theme: theme, + pane: pane, + paneKey: _panelKey, + listKey: _listKey, + scrollbarKey: _scrollbarKey, + onToggle: toggleCompactOpenMode, + onItemSelected: toggleCompactOpenMode, ), ), - ), - ), - AnimatedPositionedDirectional( - key: _overlayKey, - duration: theme.animationDuration ?? Duration.zero, - curve: theme.animationCurve ?? Curves.linear, - start: _minimalPaneOpen ? 0.0 : -_kOpenNavigationPanelWidth, - width: _kOpenNavigationPanelWidth, - height: MediaQuery.of(context).size.height, - child: PrimaryScrollController( - controller: scrollController, - child: Mica( + ); + } else if (_compactOverlayOpen) { + return Mica( + key: _overlayKey, backgroundColor: _overlayBackgroundColor(), elevation: 10.0, child: Container( @@ -504,45 +387,138 @@ class NavigationViewState extends State { paneKey: _panelKey, listKey: _listKey, scrollbarKey: _scrollbarKey, - onItemSelected: () { - setState(() => _minimalPaneOpen = false); - }, + onToggle: toggleCompactOpenMode, + onItemSelected: toggleCompactOpenMode, ), ), + ); + } else { + return Padding( + padding: appBarPadding, + child: Mica( + key: _overlayKey, + backgroundColor: theme.backgroundColor, + child: _CompactNavigationPane( + pane: pane, + paneKey: _panelKey, + listKey: _listKey, + scrollbarKey: _scrollbarKey, + onToggle: toggleCompactOpenMode, + ), + ), + ); + } + }(), + ), + appBar, + ]); + break; + case PaneDisplayMode.open: + paneResult = Column(children: [ + appBar, + Expanded( + child: Row(children: [ + PrimaryScrollController( + controller: scrollController, + child: _OpenNavigationPane( + theme: theme, + pane: pane, + paneKey: _panelKey, + listKey: _listKey, + scrollbarKey: _scrollbarKey, + ), + ), + Expanded(child: content), + ]), + ), + ]); + break; + case PaneDisplayMode.minimal: + paneResult = Stack(children: [ + Positioned( + top: widget.appBar?.height ?? 0.0, + left: 0.0, + right: 0.0, + bottom: 0.0, + child: content, + ), + if (_minimalPaneOpen) + Positioned.fill( + child: GestureDetector( + onTap: () { + setState(() => _minimalPaneOpen = false); + }, + child: AbsorbPointer( + child: Semantics( + label: localizations.modalBarrierDismissLabel, + child: const SizedBox.expand(), + ), ), ), ), - appBar, - ]); - break; - default: - paneResult = content; - } + AnimatedPositionedDirectional( + key: _overlayKey, + duration: theme.animationDuration ?? Duration.zero, + curve: theme.animationCurve ?? Curves.linear, + start: _minimalPaneOpen ? 0.0 : -_kOpenNavigationPanelWidth, + width: _kOpenNavigationPanelWidth, + height: MediaQuery.of(context).size.height, + child: PrimaryScrollController( + controller: scrollController, + child: Mica( + backgroundColor: _overlayBackgroundColor(), + elevation: 10.0, + child: Container( + decoration: BoxDecoration( + border: Border.all( + color: const Color(0xFF6c6c6c), + width: 0.15, + ), + borderRadius: BorderRadius.circular(8.0), + ), + margin: const EdgeInsets.symmetric(vertical: 1.0), + padding: appBarPadding, + child: _OpenNavigationPane( + theme: theme, + pane: pane, + paneKey: _panelKey, + listKey: _listKey, + scrollbarKey: _scrollbarKey, + onItemSelected: () { + setState(() => _minimalPaneOpen = false); + }, + ), + ), + ), + ), + ), + appBar, + ]); + break; + default: + paneResult = content; } - } else { - paneResult = Column(children: [ - appBar, - Expanded(child: widget.content), - ]); } - return paneResult; - }, - ); - return Mica( - backgroundColor: theme.backgroundColor, - child: InheritedNavigationView( - displayMode: _compactOverlayOpen - ? PaneDisplayMode.open - : widget.pane?.displayMode, - minimalPaneOpen: _minimalPaneOpen, - pane: widget.pane, - oldIndex: oldIndex, - child: _PaneItemKeys( - keys: _itemKeys, - child: paneResult, + } else { + paneResult = Column(children: [ + appBar, + Expanded(child: widget.content), + ]); + } + return Mica( + backgroundColor: theme.backgroundColor, + child: InheritedNavigationView( + displayMode: _compactOverlayOpen ? PaneDisplayMode.open : displayMode, + minimalPaneOpen: _minimalPaneOpen, + pane: widget.pane, + oldIndex: oldIndex, + child: _PaneItemKeys( + keys: _itemKeys, + child: paneResult, + ), ), - ), - ); + ); + }); } } From acdd082bbdb26cbd1a796214835d3f6111a29755 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka <45696119+bdlukaa@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:20:28 -0300 Subject: [PATCH 3/4] Update documentation --- CHANGELOG.md | 1 + .../navigation/navigation_view/pane.dart | 16 ++++++++++------ .../navigation/navigation_view/view.dart | 10 ++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeca92ec9..567dcabd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Date format: DD/MM/YYYY ## [3.x.x] - Fix overflow behavior for `TreeViewItem` ([#270](https://github.com/bdlukaa/fluent_ui/pull/270)) +- Do not animate sticky indicators when parent is updated ## [3.10.0] - Localization, Indicators, CommandBar and Flyouts - [02/04/2022] diff --git a/lib/src/controls/navigation/navigation_view/pane.dart b/lib/src/controls/navigation/navigation_view/pane.dart index b0b917caa..5747b10b1 100644 --- a/lib/src/controls/navigation/navigation_view/pane.dart +++ b/lib/src/controls/navigation/navigation_view/pane.dart @@ -44,13 +44,17 @@ enum PaneDisplayMode { /// ![Minimal Display Mode](https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/images/displaymode-leftminimal.png) minimal, - /// Let the [NavigationPane] decide what display mode should be used - /// based on the width. This is used by default on [NavigationPanel]. - /// In Auto mode, the [NavigationPane] adapts between [minimal] when - /// the window is narrow, to [compact], and then [open] as the window - /// gets wider. + /// Let the [NavigationPane] decide what display mode should be used based on + /// the width. This is used by default on [NavigationPane]. In Auto mode, the + /// [NavigationPane] adapts between [minimal] when the window is narrow, to + /// [compact], and then [open] as the window gets wider. /// - /// ![Automatic Display Mode](https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/images/displaymode-auto.png) + /// - An expanded left pane on large window widths (1008px or greater). + /// - A left, icon-only, nav pane (LeftCompact) on medium window widths + /// (641px to 1007px). + /// - Only a menu button (LeftMinimal) on small window widths (640px or less). + /// + /// ![Automatic Display Mode](https://docs.microsoft.com/en-us/windows/apps/design/controls/images/adaptive-behavior-minimal.png) auto, } diff --git a/lib/src/controls/navigation/navigation_view/view.dart b/lib/src/controls/navigation/navigation_view/view.dart index 8edd4d1e3..4fb1874a1 100644 --- a/lib/src/controls/navigation/navigation_view/view.dart +++ b/lib/src/controls/navigation/navigation_view/view.dart @@ -218,14 +218,16 @@ class NavigationViewState extends State { if (displayMode == PaneDisplayMode.auto) { /// For more info on the adaptive behavior, see - /// https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview#adaptive-behavior + /// https://docs.microsoft.com/en-us/windows/apps/design/controls/navigationview#adaptive-behavior /// /// DD/MM/YYYY - /// (23/05/2021) + /// (06/04/2022) /// - /// When PaneDisplayMode is set to its default value of Auto, the adaptive behavior is to show: + /// When PaneDisplayMode is set to its default value of Auto, the + /// adaptive behavior is to show: /// - An expanded left pane on large window widths (1008px or greater). - /// - A left, icon-only, nav pane (compact) on medium window widths (641px to 1007px). + /// - A left, icon-only, nav pane (compact) on medium window widths + /// (641px to 1007px). /// - Only a menu button (minimal) on small window widths (640px or less). double width = consts.biggest.width; if (width.isInfinite) width = MediaQuery.of(context).size.width; From 8664e818397cc1ed458a6a718c4fc43aa7936cf6 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka <45696119+bdlukaa@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:21:21 -0300 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 567dcabd4..7487a4673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Date format: DD/MM/YYYY ## [3.x.x] - Fix overflow behavior for `TreeViewItem` ([#270](https://github.com/bdlukaa/fluent_ui/pull/270)) -- Do not animate sticky indicators when parent is updated +- Do not animate sticky indicators when parent is updated ([#273](https://github.com/bdlukaa/fluent_ui/pull/273)) ## [3.10.0] - Localization, Indicators, CommandBar and Flyouts - [02/04/2022]