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

Conversation

Renzo-Olivares
Copy link
Contributor

@Renzo-Olivares Renzo-Olivares commented Feb 8, 2021

This change caps the body of the reply material study to 1340 for better text readability.

desktop_cap

Closes #298

Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

Thanks @Renzo-Olivares

Could you please take a look at the comments, and also update this branch against the latest master as I have fixed broken tests

defaultChild: _MailNavigator(
child: MailboxBody(key: widget.inboxKey),
),
child: Row(
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 you should be able to achieve this without using a Row. Perhaps replace the Row and Flexible widgets with a Center widget?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion that works!

@@ -241,12 +241,23 @@ 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.

Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

LGTM

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.

@clocksmith
Copy link
Contributor

LGTM, assuming there are still constant margins for when the width is less than 1340

@guidezpl guidezpl merged commit cb10d4a into flutter:master Feb 18, 2021
Renzo-Olivares added a commit to Renzo-Olivares/gallery that referenced this pull request Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Reply] Cap the desktop body width to 1340
4 participants