Skip to content

Update Material 3 Demo App - #1530

Merged
QuncCccccc merged 20 commits into
mainfrom
update_material_3_demo_app
Dec 20, 2022
Merged

QuncCccccc merged 20 commits into
mainfrom
update_material_3_demo_app

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Dec 15, 2022 •

Copy link
Copy Markdown
Contributor

This PR is to update the Material 3 Demo app in the experimental folder. The layout of the demo app is adaptive based on the screen size and more newly updated components are added.

Screen.Recording.2022-12-15.at.11.35.08.AM.mov

Fixes #1510
Fixes flutter/flutter#112000
Fixes flutter/flutter#111999

Pre-launch Checklist

  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

@QuncCccccc
QuncCccccc marked this pull request as ready for review December 15, 2022 21:50

@darrenaustin darrenaustin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Nice work. Looks so much more polished!

Just had a minor concern about using shrinkWrap below, but it is fine for now.

Couple of things I noticed that we might want to consider for future improvements:

  • I think it might look better to use a grid for the entire expanded view rather than two independently scrolling lists. That way everything would scroll together and we could potentially let it expand to three columns if the window is wide enough.
  • Do we need the gaps between each group block? It looks a little odd to me to have the white showing between the card colors.

These aren't critical, just something to think about going forward.

It really looks nice. Thx!

),
),
return ListView(
shrinkWrap: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is probably fine for now, but we should really look into finding a way around using shrinkWrap here as it can lead to performance issues and we don't really want to encourage its use in an example. You might talk this over with @Piinks and see if she has any suggestions here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, I'd love to take a look at this first. We are trying to not recommend shrinkwrap unless absolutely necessary and have been removing it from sample code. It is very costly to performance and should only be used if there isn't an option to use slivers. I'll be able to take a look today and see if we can remove this.

@domesticmouse

Copy link
Copy Markdown
Contributor

@QuncCccccc feel free to land when you are happy. Thanks!

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just noting so we can look at this shrinkwrap issue

@override
Widget build(BuildContext context) {
return ListView(
shrinkWrap: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like it is being used here too. @QuncCccccc are these used inside of other lists, or are they being placed in Columns? These should probably be SliverLists instead

trailing: Expanded(
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: showLargeSizeLayout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For readability, can you wrap these subtrees in methods that return a Widget?

As in

child: showLargeSizeLayout ? _largeLayout() : _smallLayout()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed:)

@Piinks

Piinks commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

I checked this out and removed shrinkwrap, there were 5 cases of it and from what I can tell they weren't all necessary, so just removing it was an easy fix for some. :)

See changes in this commit: fb5084f

@QuncCccccc
QuncCccccc force-pushed the update_material_3_demo_app branch 2 times, most recently from 8e16f95 to 4168eb3 Compare December 17, 2022 00:02
@QuncCccccc
QuncCccccc requested a review from Piinks December 17, 2022 00:22
@QuncCccccc

Copy link
Copy Markdown
Contributor Author

Not sure why some tests in web_dashboard failed🙂, any suggestions? @domesticmouse

Screenshot 2022-12-19 at 11 00 24 AM

@domesticmouse

Copy link
Copy Markdown
Contributor

Not sure why some tests in web_dashboard failed🙂, any suggestions? @domesticmouse

Screenshot 2022-12-19 at 11 00 24 AM

Web dashboard needs to be either updated or dropped from master CI. I'll get a PR together for this today.

@QuncCccccc

Copy link
Copy Markdown
Contributor Author

Not sure why some tests in web_dashboard failed🙂, any suggestions? @domesticmouse
Screenshot 2022-12-19 at 11 00 24 AM

Web dashboard needs to be either updated or dropped from master CI. I'll get a PR together for this today.

Got it. Thanks!

@domesticmouse

Copy link
Copy Markdown
Contributor

Please pull latest from main. That should hopefully clean up the CI failures

@QuncCccccc
QuncCccccc force-pushed the update_material_3_demo_app branch from 6cb038c to e5569f1 Compare December 19, 2022 23:35
@domesticmouse

Copy link
Copy Markdown
Contributor

@Piinks PTAL and confirm your review comments have been appropriately incorporated =)

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M3] Group components by taxonomy group M3 Demo app: Make whole body scrollable Add Headers to M3 Demo App

4 participants