Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ColorScheme.light, ColorScheme.dark, ColorScheme.highContrastLight, & ColorScheme.highContrastDark constructors docs for Material 3 #137149

Merged

Conversation

TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Oct 24, 2023

fixes Clarify ColorScheme fromSwatch/fromSeed usage

"This explains how to use ColorScheme.fromSeed as a substitute for each ColorScheme constructor."

ColorScheme.light (left) to ColorScheme.fromSeed (right)
light
ColorScheme.dark (left) to ColorScheme.fromSeed (right)
dark
ColorScheme.highContrastLight (left) to ColorScheme.fromSeed (right)
highContrastLight
ColorScheme.highContrastDark (left) to ColorScheme.fromSeed (right)
highContrastDark

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Oct 24, 2023
@TahaTesser TahaTesser added the d: api docs Issues with https://api.flutter.dev/ label Oct 24, 2023
@TahaTesser TahaTesser requested a review from HansMuller October 24, 2023 14:54
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM however we should tell developers what to substitute for ColorScheme.dark,light,highContrastLight. The substitute doesn't have to produce exactly the same color scheme as the old factories, just something moderately close.

@TahaTesser TahaTesser force-pushed the update_color_scheme_constructor_docs branch from 80947e7 to 86766b5 Compare October 25, 2023 14:00
@TahaTesser TahaTesser force-pushed the update_color_scheme_constructor_docs branch from 86766b5 to 69099ba Compare October 25, 2023 14:18
@TahaTesser
Copy link
Member Author

TahaTesser commented Oct 25, 2023

LGTM however we should tell developers what to substitute for ColorScheme.dark,light,highContrastLight. The substitute doesn't have to produce exactly the same color scheme as the old factories, just something moderately close.

I love this idea. I've added substitute for each constructor using ColorScheme.fromSeed that closely matches the corresponding constructor in the docs.

Provided previews in the PR description. Please take a look before I can merge this.

@TahaTesser
Copy link
Member Author

cc: @HansMuller

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2023
@auto-submit auto-submit bot merged commit b547e0e into flutter:master Oct 31, 2023
@TahaTesser TahaTesser deleted the update_color_scheme_constructor_docs branch October 31, 2023 20:17
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Oct 31, 2023
…rastLight`, & `ColorScheme.highContrastDark` constructors docs for Material 3 (flutter#137149)

fixes [Clarify ColorScheme fromSwatch/fromSeed usage](flutter#132584)

"This explains how to use `ColorScheme.fromSeed` as a substitute for each `ColorScheme` constructor."

| `ColorScheme.light` (left) to `ColorScheme.fromSeed` (right) | 
| --------------- | 
| ![light](https://github.com/flutter/flutter/assets/48603081/e056e723-5640-4b05-8feb-ca6b517c8682)	|

| `ColorScheme.dark` (left) to `ColorScheme.fromSeed` (right) | 
| --------------- | 
| ![dark](https://github.com/flutter/flutter/assets/48603081/5ff32611-bfb6-49ee-a34e-f935f580e84e)	|

| `ColorScheme.highContrastLight` (left) to `ColorScheme.fromSeed` (right) | 
| --------------- | 
| ![highContrastLight](https://github.com/flutter/flutter/assets/48603081/4b47f2e3-ea8e-4148-85cc-69690e9082c7) |

| `ColorScheme.highContrastDark` (left) to `ColorScheme.fromSeed` (right) | 
| --------------- | 
| ![highContrastDark](https://github.com/flutter/flutter/assets/48603081/3dbd7ec4-c78e-4228-a8ed-673832681563) |
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 31, 2023
…highContrastLight`, & `ColorScheme.highContrastDark` constructors docs for Material 3 (flutter/flutter#137149)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 1, 2023
…highContrastLight`, & `ColorScheme.highContrastDark` constructors docs for Material 3 (flutter/flutter#137149)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 1, 2023
Roll Flutter from e12d1a7 to 29b2516 (34 revisions)

flutter/flutter@e12d1a7...29b2516

2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5ef5e6da9075 to 8ffc705a55d5 (2 revisions) (flutter/flutter#137664)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from a0ac6b432cdf to 5ef5e6da9075 (1 revision) (flutter/flutter#137657)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from db06c2e10459 to a0ac6b432cdf (8 revisions) (flutter/flutter#137656)
2023-11-01 polinach@google.com Add dependency on leak_tracker and leak_tracker_testing to flutter_test. (flutter/flutter#137646)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 406b7d71ca37 to db06c2e10459 (5 revisions) (flutter/flutter#137651)
2023-11-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#137650)
2023-10-31 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 39be0fc34503 to 406b7d71ca37 (8 revisions) (flutter/flutter#137649)
2023-10-31 sokolovskyi.konstantin@gmail.com PerformanceModeRequestHandle should dispatch creation and disposal events. (flutter/flutter#137642)
2023-10-31 hrkadam.92@gmail.com Fix minor typo in doc of window.dart (flutter/flutter#137483)
2023-10-31 41873024+droidbg@users.noreply.github.com fix. typos (flutter/flutter#137178)
2023-10-31 tvolkert@users.noreply.github.com Document the scale argument to NetworkImage (flutter/flutter#137456)
2023-10-31 jason-simmons@users.noreply.github.com Revert "Roll Flutter Engine from 39be0fc34503 to ec3e988099be (2 revisions)" (flutter/flutter#137647)
2023-10-31 polinach@google.com Move dependency on leak_tracker from dependencies to dev_dependencies in flutter_test. (flutter/flutter#137633)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 39be0fc34503 to ec3e988099be (2 revisions) (flutter/flutter#137637)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4da3e5b12540 to 39be0fc34503 (4 revisions) (flutter/flutter#137635)
2023-10-31 tessertaha@gmail.com Update `ColorScheme.light`, `ColorScheme.dark`, `ColorScheme.highContrastLight`, & `ColorScheme.highContrastDark`  constructors docs for Material 3 (flutter/flutter#137149)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 47465eb4fbe6 to 4da3e5b12540 (2 revisions) (flutter/flutter#137632)
2023-10-31 41873024+droidbg@users.noreply.github.com Fix. typos (flutter/flutter#137465)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9de8146d21bf to 47465eb4fbe6 (1 revision) (flutter/flutter#137626)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b9b806151ed to 9de8146d21bf (1 revision) (flutter/flutter#137624)
2023-10-31 engine-flutter-autoroll@skia.org Roll Packages from 2af6954 to c9fec61 (12 revisions) (flutter/flutter#137623)
2023-10-31 whesse@google.com Fix divide-by-zero crash in animation_bench benchmark (flutter/flutter#137539)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 11a569d97a26 to 6b9b806151ed (1 revision) (flutter/flutter#137617)
2023-10-31 dacoharkes@google.com Fix formatting (flutter/flutter#137613)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5ca5cbb6efdb to 11a569d97a26 (1 revision) (flutter/flutter#137612)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from b4de734eb78e to 5ca5cbb6efdb (1 revision) (flutter/flutter#137610)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 17eff7ab6299 to b4de734eb78e (1 revision) (flutter/flutter#137594)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 44309c9f385c to 17eff7ab6299 (2 revisions) (flutter/flutter#137587)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 64b0e07e2259 to 44309c9f385c (1 revision) (flutter/flutter#137584)
2023-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4f87c20b3c34 to 64b0e07e2259 (4 revisions) (flutter/flutter#137582)
2023-10-30 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 84dcb4fb9301 to 4f87c20b3c34 (24 revisions) (flutter/flutter#137570)
2023-10-30 pavel.mazhnik@gmail.com [web] cache the base URL as root index.html (flutter/flutter#136594)
2023-10-30 christopherfujino@gmail.com [flutter_tools] ensure processUtils reports exit code in ProcessExceptions (flutter/flutter#136672)
2023-10-30 christopherfujino@gmail.com [flutter_tool] change print when selecting developer identity for code signing (flutter/flutter#136978)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC dit@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
HugoOlthof pushed a commit to moneybird/packages that referenced this pull request Dec 13, 2023
Roll Flutter from e12d1a7 to 29b2516 (34 revisions)

flutter/flutter@e12d1a7...29b2516

2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5ef5e6da9075 to 8ffc705a55d5 (2 revisions) (flutter/flutter#137664)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from a0ac6b432cdf to 5ef5e6da9075 (1 revision) (flutter/flutter#137657)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from db06c2e10459 to a0ac6b432cdf (8 revisions) (flutter/flutter#137656)
2023-11-01 polinach@google.com Add dependency on leak_tracker and leak_tracker_testing to flutter_test. (flutter/flutter#137646)
2023-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 406b7d71ca37 to db06c2e10459 (5 revisions) (flutter/flutter#137651)
2023-11-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#137650)
2023-10-31 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 39be0fc34503 to 406b7d71ca37 (8 revisions) (flutter/flutter#137649)
2023-10-31 sokolovskyi.konstantin@gmail.com PerformanceModeRequestHandle should dispatch creation and disposal events. (flutter/flutter#137642)
2023-10-31 hrkadam.92@gmail.com Fix minor typo in doc of window.dart (flutter/flutter#137483)
2023-10-31 41873024+droidbg@users.noreply.github.com fix. typos (flutter/flutter#137178)
2023-10-31 tvolkert@users.noreply.github.com Document the scale argument to NetworkImage (flutter/flutter#137456)
2023-10-31 jason-simmons@users.noreply.github.com Revert "Roll Flutter Engine from 39be0fc34503 to ec3e988099be (2 revisions)" (flutter/flutter#137647)
2023-10-31 polinach@google.com Move dependency on leak_tracker from dependencies to dev_dependencies in flutter_test. (flutter/flutter#137633)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 39be0fc34503 to ec3e988099be (2 revisions) (flutter/flutter#137637)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4da3e5b12540 to 39be0fc34503 (4 revisions) (flutter/flutter#137635)
2023-10-31 tessertaha@gmail.com Update `ColorScheme.light`, `ColorScheme.dark`, `ColorScheme.highContrastLight`, & `ColorScheme.highContrastDark`  constructors docs for Material 3 (flutter/flutter#137149)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 47465eb4fbe6 to 4da3e5b12540 (2 revisions) (flutter/flutter#137632)
2023-10-31 41873024+droidbg@users.noreply.github.com Fix. typos (flutter/flutter#137465)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9de8146d21bf to 47465eb4fbe6 (1 revision) (flutter/flutter#137626)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b9b806151ed to 9de8146d21bf (1 revision) (flutter/flutter#137624)
2023-10-31 engine-flutter-autoroll@skia.org Roll Packages from 2af6954 to c9fec61 (12 revisions) (flutter/flutter#137623)
2023-10-31 whesse@google.com Fix divide-by-zero crash in animation_bench benchmark (flutter/flutter#137539)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 11a569d97a26 to 6b9b806151ed (1 revision) (flutter/flutter#137617)
2023-10-31 dacoharkes@google.com Fix formatting (flutter/flutter#137613)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5ca5cbb6efdb to 11a569d97a26 (1 revision) (flutter/flutter#137612)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from b4de734eb78e to 5ca5cbb6efdb (1 revision) (flutter/flutter#137610)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 17eff7ab6299 to b4de734eb78e (1 revision) (flutter/flutter#137594)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 44309c9f385c to 17eff7ab6299 (2 revisions) (flutter/flutter#137587)
2023-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 64b0e07e2259 to 44309c9f385c (1 revision) (flutter/flutter#137584)
2023-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4f87c20b3c34 to 64b0e07e2259 (4 revisions) (flutter/flutter#137582)
2023-10-30 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 84dcb4fb9301 to 4f87c20b3c34 (24 revisions) (flutter/flutter#137570)
2023-10-30 pavel.mazhnik@gmail.com [web] cache the base URL as root index.html (flutter/flutter#136594)
2023-10-30 christopherfujino@gmail.com [flutter_tools] ensure processUtils reports exit code in ProcessExceptions (flutter/flutter#136672)
2023-10-30 christopherfujino@gmail.com [flutter_tool] change print when selecting developer identity for code signing (flutter/flutter#136978)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC dit@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
…highContrastLight`, & `ColorScheme.highContrastDark` constructors docs for Material 3 (flutter/flutter#137149)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify ColorScheme fromSwatch/fromSeed usage
2 participants