Skip to content

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented May 13, 2022

Updates the AppIcon assets in the macOS app template to meet Apple's
icon guidelines as of macOS Big Sur. Assets were moved to the
flutter_template_images package, which includes them as of version
4.1.0.

Ref: https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/

Issue: #103371

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.

@cbracken cbracken added platform-mac Building on or for macOS specifically a: assets Packaging, accessing, or using assets labels May 13, 2022
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 13, 2022
@cbracken cbracken requested review from Hixie and stuartmorgan-g May 13, 2022 19:08
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Looking at other icons in my dock that have the "logo on a blank blob" style (Chrome, VS Code, Discord), the padding here feels much higher. I would make the logo bigger to look more like those.

But it's also a placeholder, so I don't care that much. LGTM either way :)

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Wait, sorry, this shouldn't be in flutter/flutter. macOS must have gone in before the rules change.

You should put these in https://github.com/flutter/packages/tree/main/packages/flutter_template_images and update the macOS template to pull from there, like Windows does.

@cbracken
Copy link
Member Author

cbracken commented May 13, 2022

Yep -- ended up asking @christopherfujino because I swore we'd created a better solution but couldn't find any reference to it on the wiki. I sent out flutter/packages#1930 and will update this patch to a pubspec change and icon removal once that lands, then add details to the wiki.

@cbracken
Copy link
Member Author

Re: icon size, this was my basis for comparison:
image

@stuartmorgan-g
Copy link
Contributor

I guess there's just no real consistency. 🤷🏻

@cbracken cbracken force-pushed the update-macos-icon branch from 24c75f6 to eb88895 Compare May 13, 2022 22:09
@cbracken cbracken requested a review from Piinks as a code owner May 13, 2022 22:09
@cbracken
Copy link
Member Author

cbracken commented May 13, 2022

@stuartmorgan flutter/packages#1930 has landed and was published as flutter_template_images 4.1.0. I've updated this patch to:

  • Roll to latest packages via flutter update-packages --force-upgrade
  • Truncate and rename the existing images to end in .img.tmpl
  • Update the template manifest to point to the asset_size.png.img.tmpl assets

PTAL

@cbracken cbracken force-pushed the update-macos-icon branch from eb88895 to b11c593 Compare May 13, 2022 22:47
@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label May 13, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@Hixie
Copy link
Contributor

Hixie commented May 13, 2022

test-exempt: rolling dependencies

@cbracken cbracken force-pushed the update-macos-icon branch from b11c593 to e7de74b Compare May 13, 2022 23:07
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

Do we know why charcode is moving around in some pubspecs?

@cbracken
Copy link
Member Author

cbracken commented May 14, 2022

Do we know why charcode is moving around in some pubspecs?

I ran a full flutter upgrade packages, since IIRC we're generally encouraged to rely on the tool rather than manually upgrading dependencies. It looks like charcode was removed as a transitive dependency from something; got a presubmit error asking me to remove it from the allowlist, which I did as part of this change. Updated the PR/commit description to account for this.

I may actually send a separate roll for everything but flutter_template_images, then rebase this on top of that once it lands, in order to produce a cleaner history to make it easier to follow for the next person who has to do this, since this now includes removing charcode and fixing some uses of a deprecated function it seems.

@cbracken cbracken mentioned this pull request May 14, 2022
8 tasks
@cbracken
Copy link
Member Author

I wonder if there's an "achievement unlocked" badge you can get for being broken by a recent parameter deprecation in a package that you wrote a decade ago (package:coverage) causing breakage in code that you wrote somewhere else a half-decade ago (coverage in the flutter tool).

No good deed goes unpunished...

cbracken added a commit to cbracken/flutter that referenced this pull request May 14, 2022
This rolls depdendencies to latest using
flutter update-packages --force-upgrade

This change includes three code changes:

* Removes charcode from the dependencies allowlist since it no longer
  appears in the transitive closure of dependencies of the flutter,
  flutter_test, flutter_driver, flutter_localizations, and
  integration_test packages.

* Uses Resolver.create instead of the deprecated Resolver constructor.
  The default Resolver constructor has been deprecated in favour of the
  static Resolver.create() factory function, which unfortunately happens
  to be async. Propagated the async-ness up the chain.

* Eliminates the use of the deprecated packagesPath parameter to
  HitMap.parseJson. This parameter was deprecated and replaced with
  packagePath in dart-archive/coverage#370 which
  was part of the overall deprecation of the .packages file in Dart
  itself dart-lang/sdk#48272. The overall goal
  being that end-user code shouldn't need to know about implementation
  details such as whether dependency information is stored in a
  .packages file or a package_info.json file, but rather use the
  package_config package to obtain the package metadata and perform
  other functions such as resolving its dependencies to filesystem
  paths. packagesPath was replaced by packagePath, which takes the path
  to the package directory itself. Internally, package:coverage then
  uses package_config to do the rest of the package/script URI
  resolution to filesystem paths.

This is a pre-update prior to updating flutter_template_images in
flutter#103739

Issue: flutter#103371
Issue: flutter#103775
cbracken added a commit that referenced this pull request May 14, 2022
Roll dependendencies

This rolls depdendencies to latest using
flutter update-packages --force-upgrade

This change includes three code changes:

* Removes charcode from the dependencies allowlist since it no longer
  appears in the transitive closure of dependencies of the flutter,
  flutter_test, flutter_driver, flutter_localizations, and
  integration_test packages.

* Uses Resolver.create instead of the deprecated Resolver constructor.
  The default Resolver constructor has been deprecated in favour of the
  static Resolver.create() factory function, which unfortunately happens
  to be async. Propagated the async-ness up the chain.
  This change was partially reverted and the deprecation ignored in this
  patch until package:coverage can be rolled internally at Google.

* Eliminates the use of the deprecated packagesPath parameter to
  HitMap.parseJson. This parameter was deprecated and replaced with
  packagePath in dart-archive/coverage#370 which
  was part of the overall deprecation of the .packages file in Dart
  itself dart-lang/sdk#48272. The overall goal
  being that end-user code shouldn't need to know about implementation
  details such as whether dependency information is stored in a
  .packages file or a package_info.json file, but rather use the
  package_config package to obtain the package metadata and perform
  other functions such as resolving its dependencies to filesystem
  paths. packagesPath was replaced by packagePath, which takes the path
  to the package directory itself. Internally, package:coverage then
  uses package_config to do the rest of the package/script URI
  resolution to filesystem paths.
  This change was partially reverted and the deprecation ignored in this
  patch until package:coverage can be rolled internally at Google.

This is a pre-update prior to updating flutter_template_images in
#103739

Issue: #103371
Issue: #103775
Issue: #103830

When re-applying the partially-reverted changes to code coverage,
we'll need to patch host_entrypoint.dart internally to await the Future
that we'll be returning rather than a non-async value.
Updates the AppIcon assets in the macOS app template to meet Apple's
icon guidelines as of macOS Big Sur. Assets were moved to the
[flutter_template_images][1] package, which includes them as of version
4.1.0.

Flutter packages were upgraded. `charcode` no longer occurs in the
transitive closure of dependencies and thus was removed from the
allowlist in dev/bots/allowlist.dart.

Ref: https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/

Issue: flutter#103371

[1]: https://github.com/flutter/packages/tree/main/packages/flutter_template_images
@cbracken cbracken force-pushed the update-macos-icon branch from e7de74b to 88e82b6 Compare May 14, 2022 23:38
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request May 17, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: assets Packaging, accessing, or using assets c: contributor-productivity Team-specific productivity, code health, technical debt. platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants