-
-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
🐛 PaneItem overflows when transitioning from compact to open #906
Comments
…ne is transitioning (#906) and fix `NavigationPane.header`
@harlanx can you try the latest master and see if the issue goes away? dependencies:
fluent_ui:
git:
url: https://github.com/bdlukaa/fluent_ui.git |
I'm still getting an error on my project using master even without infoBar or trailing provided. I don't know why its being painted during transition even though there are null checks. Debug (My Project)
I've downloaded a local copy of the package and modified the returned widget for Code changes case PaneDisplayMode.open:
return ConstrainedBox(
key: itemKey,
constraints: const BoxConstraints(
minHeight: kPaneItemMinHeight,
),
child: Row(children: [
Padding(
padding: theme.iconPadding ?? EdgeInsets.zero,
child: IconTheme.merge(
data: iconThemeData,
child: Center(child: icon),
),
),
Expanded(child: textResult),
Flexible(
child: Align(
alignment: AlignmentDirectional.centerEnd,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
if (infoBadge != null)
Flexible(
child: IntrinsicWidth(
child: Padding(
padding: const EdgeInsetsDirectional.only(
end: 8.0),
child: infoBadge!,
),
),
),
if (trailing != null)
Flexible(
child: IntrinsicWidth(
child: IconTheme.merge(
data: const IconThemeData(size: 16.0),
child: trailing!,
),
),
),
],
),
),
),
]),
); |
Just an update on this. Turns out that all of the non-Flexible items in the row for |
I've come up with a new solution, probably better that the first one I suggested.
@bdlukaa can you take a look? If you have another solution in mind, let's go your way since I'm not familiarized with the package. case PaneDisplayMode.open:
return IntrinsicHeight(
child: ConstrainedBox(
key: itemKey,
constraints: const BoxConstraints(
minHeight: kPaneItemMinHeight,
),
child: OverflowBox(
maxWidth: (maybeBody?.pane?.size?.openMaxWidth ??
kOpenNavigationPaneWidth) -
12.0,
child: Row(children: [
Padding(
padding: theme.iconPadding ?? EdgeInsets.zero,
child: IconTheme.merge(
data: iconThemeData,
child: Center(child: icon),
),
),
Expanded(child: textResult),
if (infoBadge != null)
Padding(
padding: const EdgeInsetsDirectional.only(end: 8.0),
child: infoBadge!,
),
if (trailing != null)
IconTheme.merge(
data: const IconThemeData(size: 16.0),
child: trailing!,
),
]),
),
),
); |
I would rather not make use of intrinsic widgets on this widget. Ideally, the solution would be to create a Locally, I don't have any issues when hiding the |
Desktop.2023.08.04.mp4It is reproduceable in the example app. |
I see. It is fine when using the compact mode and opening the pane from there, but when changing the |
Similar issue to #588 has resurfaced on the latest update.
To Reproduce
Steps to reproduce the behavior:
infoBadge
parameter on aPaneItem
NavigationPane
toPaneDisplayMode.auto
Additional context
Debug
The text was updated successfully, but these errors were encountered: