Update CupertinoIcons to cupertino_icons 1.0.0 based on SF Symbols#65083
Update CupertinoIcons to cupertino_icons 1.0.0 based on SF Symbols#65083xster merged 7 commits intoflutter:masterfrom
Conversation
|
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. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Actually I can improve this slightly to make it a non-breaking change. It seems like adding the glyph svgs to multiple codepoint doesn't increase the font size. Maybe the fontforge script API has some automatic optimizations. Retweaking. |
|
I just noticed there's special code in the ide plugins to draw previews of the icon in the gutter. I'm updating the ttf in the cupertino_icons package. What needs to be updated in the plugins? |
|
I won't be able to conform to the deprecation annotation lint pattern (since it's deprecated by a package, not a flutter version). Maybe it's a good thing since I just went back and undeprecated all the glyphs by extracting the old svgs, adding them to the new ttf and auto width'ing the new glyph bounds in cupertino_icons 1.0.0-dev.3 |
|
@xster there's a repo at https://github.com/flutter/tools_metadata that collects metadata for the tools, including icon previews. Dart-Code is still using its own repo for icons right now, but I'm planning to switch to using them from that repo soon. |
|
Yup, we re-generate the framework metadata here: https://github.com/flutter/tools_metadata#regenerating-metadata, then commit the updated metadata back to the repo. We re-generate from the dev channel (we want something more stable than master). It then a manual process to copy the updated metadata into the flutter/flutter-intellij repo (https://github.com/flutter/flutter-intellij/tree/master/resources/flutter). |
|
Understood. So the next step is to wait for this to bubble through the pipeline a bit first? |
Yup; unless it's critical - the current previews become incorrect or something - we'll see a latency of about a month (wait for dev; re-generate; copy to the IDEs, and, wait for the next monthly IDE release). |
|
That's fine. I'm gonna generally going to point people to https://flutter.github.io/cupertino_icons/ as the source of truth for the time being (wonder if you can reuse some of that css stuff to make things easier for you) |
|
Soft visual breaking change doc at flutter/website#4570 |
Description
This PR makes a forward and backward compatible move to cupertino_icons 1.0.0 currently available in pre-release in https://pub.dev/packages/cupertino_icons/versions/1.0.0-dev.1.
Generation is done via https://github.com/xster/framework7-icons.
This file still works and will continue to work with cupertino_icons 0.1.3 (the latest version). When users upgrade past this commit and also pub upgrades cupertino_icons to 1.0.0, icons will be replaced in-place for the newer icon version based on the same glyph codepoint. Users can't accidentally upgrade to 1.0.0 before this PR since cupertino_icons SDK constrains to Flutter 1.22+ only.
A few cupertino_icons icons have no SF Symbol equivalent however. Those will have deprecation warnings.
There are deprecations because I didn't want to waste space and duplicate the same glyphs over multiple codepoints to fill something in for the deprecated fonts. And I can't change their definitions to a different codepoint in the SDK in case they're still on cupertino_icons 0.1.3 where those codepoints are still valid.
The new font's 390B bigger than before but that's inevitable since we ~tripled the amount of available font.
Next PRs:
Related Issues
#33916.
#16102.
Partly addresses #60034
Tests
This just changes mapping that isn't used anywhere.
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read [Handling breaking changes].