Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

[Reply] Cap body at 1340 for desktop and tablet #425

Merged
merged 8 commits into from
Feb 18, 2021
14 changes: 10 additions & 4 deletions lib/studies/reply/adaptive_nav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,17 @@ class _DesktopNavState extends State<_DesktopNav>
);
},
),
const VerticalDivider(thickness: 1, width: 1),
const VerticalDivider(thickness: 1, width: 2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reason for this change?

Copy link
Contributor Author

@Renzo-Olivares Renzo-Olivares Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

white_lines

I increased the width to remedy some artifacts (white vertical lines surrounding body shown above). From my observation, they seem to be a result of the navigation rail body not expanding to its max-width like it previously did before this change.

Copy link
Contributor Author

@Renzo-Olivares Renzo-Olivares Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these lines still show up if I don't have my browser window maximized. It looks like they show up right when I stretch the body past the 1340 width cap. Maybe because the Expanded widget is no longer taking up the entire available space, so there is a gap. I'll keep working on this.

Expanded(
child: _SharedAxisTransitionSwitcher(
defaultChild: _MailNavigator(
child: MailboxBody(key: widget.inboxKey),
child: Center(
child: ConstrainedBox(
constraints:
BoxConstraints(maxWidth: widget.extended ? 1340 : 800),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original bug was to cap at only 1340. Why 800 for non extended?

Copy link
Contributor Author

@Renzo-Olivares Renzo-Olivares Feb 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right. I misunderstood the purpose of the cap and made it consistent for both desktop and tablet. I changed it back to match the original issue, also the margins were not constant when the width was under 1340 with the added 800 cap.

child: _SharedAxisTransitionSwitcher(
defaultChild: _MailNavigator(
child: MailboxBody(key: widget.inboxKey),
),
),
),
),
),
Expand Down