-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Cupertino icons golden tests #7421
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
Cupertino icons golden tests #7421
Conversation
/// The full list of [IconData] constants defined in the [CupertinoIcons] class, | ||
/// sorted by their code points in ascending order. | ||
/// | ||
/// This list cannot be mutated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This automatically generated. Is there a way to incorporate the code gen step on CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This automatically generated.
By what? There should be a prominent comment in this file explain that it is generated, and how to regenerate it.
Is there a way to incorporate the code gen step on CI?
Since this is included from another file, not currently; there is not currently a mechanism to generate files before analyze
is run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think about it, it's probably not a good idea to try to automate the codegen for now.
The codegen script generates the List of IconData from the CupertinoICons
class which currently lives in flutter/flutter, so it updates with a delay after a new cupertino_icons version is available.
This list should be updated manually for now, after changing the ttf file. I'll add a comment to this file (or in a more visible place? since it's tied to the font).
3fbb667
to
ff7cd7b
Compare
ff7cd7b
to
7a33212
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- is sensitive to how flutter renders text on Linux, and how the
Icon
widget positions the glyph.
Any test in flutter/packages that is sensitive to framework rendering must be set up to run only on main
(example), otherwise the first time there is a framework change that affects this test, it will become impossible to roll.
- will require contributors to have access to a Linux box in order to generate new goldens.
FYI, in practice this means that the test will periodically be disabled by the gardener, with an issue filed against the package's CODEOWNER to re-enable it, because not all gardeners have access to a machine that can regenerate goldens.
/// The full list of [IconData] constants defined in the [CupertinoIcons] class, | ||
/// sorted by their code points in ascending order. | ||
/// | ||
/// This list cannot be mutated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This automatically generated.
By what? There should be a prominent comment in this file explain that it is generated, and how to regenerate it.
Is there a way to incorporate the code gen step on CI?
Since this is included from another file, not currently; there is not currently a mechanism to generate files before analyze
is run.
Added myself to the codeowner list of the golden files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, but otherwise my CI concerns are addressed, thanks!
flutter: | ||
sdk: flutter | ||
flutter_test: | ||
sdk: flutter | ||
path: 1.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this pinned to an exact version? path
is allowed as an unpinned dependency in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change after reading https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#dependencies
If you add a dev_dependency on an external package, pin it to a specific version if at all possible.
But it looks like that only applies to external packages. I'll change it back to any
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be any
, it should be a standard ^
dependency.
Version/CHANGELOG override: dev_dependency changes are exempt per policy. |
@@ -14,7 +14,7 @@ dev_dependencies: | |||
sdk: flutter | |||
flutter_test: | |||
sdk: flutter | |||
path: 1.9.0 | |||
path: any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't ever use any
anywhere in a package; this is a recipe for OOB tree breakage. It literally means "I want to get intentionally breaking changes without warning".
…oong/packages into cupertino-icons-golden-tests
ff3a577
to
fb4c4bb
Compare
flutter/packages@d862279...2a0f254 2024-08-28 [email protected] [interactive_media_ads] Adds internal wrapper for remaining methods of the Android native `AdsManager` (flutter/packages#7437) 2024-08-28 [email protected] [shared_preferences] Fix typo in changelog (flutter/packages#7523) 2024-08-27 [email protected] Remove matan from codeowners (flutter/packages#7511) 2024-08-27 [email protected] [shared_preferences] Add test to enforce mutable lists (flutter/packages#7369) 2024-08-27 [email protected] [google_sign_in_ios] Fix "callee requires a non-null parameter" analyzer warning (flutter/packages#7513) 2024-08-27 [email protected] [in_app_purchase_storekit] Allows 'localizedDescription' to be nullable to handle occasional nulls in Storekit objects (flutter/packages#7515) 2024-08-27 [email protected] Cupertino icons golden tests (flutter/packages#7421) 2024-08-26 49699333+dependabot[bot]@users.noreply.github.com [pigeon]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.10 to 2.0.20 in /packages/pigeon/platform_tests/test_plugin/android (flutter/packages#7500) 2024-08-26 [email protected] [video_player] Updates minimum supported SDK (flutter/packages#7498) 2024-08-26 [email protected] [url_launcher] Ignore new `unreachable_switch_default` warning. (flutter/packages#7487) 2024-08-26 [email protected] Revert "[video_player] Relands #6456: Uses SurfaceProducer, this time with setCallback for suspend/resume lifecycles" (flutter/packages#7497) 2024-08-24 [email protected] [video_player] Relands #6456: Uses `SurfaceProducer`, this time with `setCallback` for suspend/resume lifecycles. (flutter/packages#6989) 2024-08-23 [email protected] [google_maps_flutter_android] Convert `PlatformTileOverlay` to Pigeon (flutter/packages#7467) 2024-08-23 [email protected] [go_router] Fixes issue so that the parseRouteInformationWithContext � (flutter/packages#7337) 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-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@d862279...2a0f254 2024-08-28 [email protected] [interactive_media_ads] Adds internal wrapper for remaining methods of the Android native `AdsManager` (flutter/packages#7437) 2024-08-28 [email protected] [shared_preferences] Fix typo in changelog (flutter/packages#7523) 2024-08-27 [email protected] Remove matan from codeowners (flutter/packages#7511) 2024-08-27 [email protected] [shared_preferences] Add test to enforce mutable lists (flutter/packages#7369) 2024-08-27 [email protected] [google_sign_in_ios] Fix "callee requires a non-null parameter" analyzer warning (flutter/packages#7513) 2024-08-27 [email protected] [in_app_purchase_storekit] Allows 'localizedDescription' to be nullable to handle occasional nulls in Storekit objects (flutter/packages#7515) 2024-08-27 [email protected] Cupertino icons golden tests (flutter/packages#7421) 2024-08-26 49699333+dependabot[bot]@users.noreply.github.com [pigeon]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.10 to 2.0.20 in /packages/pigeon/platform_tests/test_plugin/android (flutter/packages#7500) 2024-08-26 [email protected] [video_player] Updates minimum supported SDK (flutter/packages#7498) 2024-08-26 [email protected] [url_launcher] Ignore new `unreachable_switch_default` warning. (flutter/packages#7487) 2024-08-26 [email protected] Revert "[video_player] Relands flutter#6456: Uses SurfaceProducer, this time with setCallback for suspend/resume lifecycles" (flutter/packages#7497) 2024-08-24 [email protected] [video_player] Relands flutter#6456: Uses `SurfaceProducer`, this time with `setCallback` for suspend/resume lifecycles. (flutter/packages#6989) 2024-08-23 [email protected] [google_maps_flutter_android] Convert `PlatformTileOverlay` to Pigeon (flutter/packages#7467) 2024-08-23 [email protected] [go_router] Fixes issue so that the parseRouteInformationWithContext � (flutter/packages#7337) 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-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This is for flutter/flutter#148075, we want to make sure the glyphs don't look different when the font generation script is migrated from python.
Also it will be nice to be able to inspect glyph changes whenever the ttf file gets updated. The
flutter test
command takes 6s to complete on my computer.Unfortunately this test:
Icon
widget positions the glyph.The tests are disabled on the web since it needs the
dart:io
import.The
icons_list.dart
file is automatically generated. Not sure if there's a way to incorporate the code gen step on CI?Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.