-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update widget catalog to show Material 3 widgets (#8574)
Fixes #8432. Site changes are viewable at the staging site: https://flutter-site-73ed1.web.app/development/ui/widgets/. Primary changes: - Addition of Material 3 Components card [(view)](https://flutter-site-73ed1.web.app/development/ui/widgets/). - New Material 3 page showing M3 widgets as displayed in matching categories to material.io/components. This also includes a note about Material 3 becoming the default - this text is not final and can be iterated on in review. - Widget cards in the M3 page have a hover effect applied. - In the widgets overview page, Material now links to M3, and contains a link to the previous M2 widgets page. General notes: - Material 2 page ~~remains unchanged~~ has a notice about Material 3. - No light/dark modes - this was explored but decided against, with the possibility of returning to it if the site undergoes a site-wide dark mode addition. ## Presubmit checklist - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/master/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
- Loading branch information
Showing
41 changed files
with
511 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- Material 3 Catalog Page --> | ||
{% for section in site.data.catalog.index %} | ||
{% if section.name == include.category %} | ||
{% assign category = section %} | ||
{% break %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
<div class="catalog"> | ||
<div class="category-description"> | ||
<p>{{category.description}}</p> | ||
</div> | ||
{% if category.subcategories and category.subcategories.size != 0 -%} | ||
<ul> | ||
{% for sub in category.subcategories -%} | ||
<li><a href="#{{sub.name}}">{{sub.name}}</a></li> | ||
{% endfor -%} | ||
</ul> | ||
{% endif -%} | ||
|
||
<p> {{ category.pagecontent }}</p> | ||
|
||
{% assign components = site.data.catalog.widgets | where_exp:"comp","comp.categories contains include.category" -%} | ||
|
||
{% if category.subcategories and category.subcategories.size != 0 -%} | ||
{% for sub in category.subcategories -%} | ||
{% assign components = site.data.catalog.widgets | where_exp:"comp","comp.subcategories contains sub.name" -%} | ||
{% if components.size != 0 -%} | ||
<h2 id="{{sub.name}}">{{sub.name}}</h2> | ||
<div class="card-deck card-deck--responsive"> | ||
{% for comp in components -%} | ||
<div class="card"> | ||
<a href="{{comp.link}}"> | ||
<div class="card-image-holder-material-3" style="--bg-color: {{sub.color}}"> | ||
{{ comp.image }} | ||
<div class="card-image-material-3-hover"> | ||
{{ comp.hoverimage }} | ||
</div> | ||
</div> | ||
</a> | ||
<div class="card-body"> | ||
<a href="{{comp.link}}"><header class="card-title card-title-material-3">{{comp.name}}</header></a> | ||
<p class="card-text">{{ comp.description | truncatewords: 25 }}</p> | ||
</div> | ||
</div> | ||
{% endfor -%} | ||
</div> | ||
{% endif -%} | ||
{% endfor -%} | ||
{% endif -%} | ||
|
||
<p>Check out more widgets in the <a href="{{site.url}}/development/ui/widgets">widget catalog</a>.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33 KB
src/assets/images/docs/widget-catalog/material-3-floating-action-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.7 KB
src/assets/images/docs/widget-catalog/material-3-navigation-drawer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.7 KB
src/assets/images/docs/widget-catalog/material-3-progress-indicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.1 KB
src/assets/images/docs/widget-catalog/material-3-segmented-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Material 2 Components widgets | ||
short-title: Material | ||
description: > | ||
A catalog of Flutter's widgets implementing the Material 2 design guidelines. | ||
--- | ||
|
||
{% include docs/catalogpage.html category="Material 2 Components" %} | ||
--- | ||
title: Material 2 Components widgets | ||
short-title: Material | ||
description: > | ||
A catalog of Flutter's widgets implementing the Material 2 design guidelines. | ||
--- | ||
|
||
{% include docs/catalogpage.html category="Material 2 Components" %} |