-
-
Notifications
You must be signed in to change notification settings - Fork 170
Use .vec SVG class for vector_graphics_compiler transformed assets #685
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
Use .vec SVG class for vector_graphics_compiler transformed assets #685
Conversation
7cb6b47
to
4471a49
Compare
@AlexV525 should be ready now :) |
4471a49
to
3fb54fd
Compare
Looks good overall. Could you solve the CI failures? |
Looking forward to this change. 🎉 |
This would be very helpful indeed ✨ |
Looks like the fail was due to Anyway, should be fixed now I hope |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #685 +/- ##
==========================================
- Coverage 96.90% 96.62% -0.29%
==========================================
Files 22 22
Lines 840 858 +18
==========================================
+ Hits 814 829 +15
- Misses 26 29 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I've increased the volume of |
Formatting has some regression and I'm investigating. |
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.
Thanks for the feature
## What does this change? Generated files are being formatted based on confusing conditions. The PR refactored how we construct the Dart formatter in a more elegant manner. 1. The formatter will try to find a valid Dart SDK constraint from `pubspec.yaml` / `pubspec.lock`. Otherwise, it will fall back to using the current Dart SDK version as the constraint. The behavior is like: 1. When the user is using Dart SDK 3.8.0, `pubspec.yaml` has `^3.4.0`, and `pubspec.lock` resolves `^3.7.0`, the formatter will format like 3.4.0. 2. When the runner is being used for testing purposes, which the specified pubspec file does not contain `environment - sdk` (and likely does not have a `pubspec.lock`), the formatter will format based on the current Dart SDK version. 2. The formatter will try to find a valid page width from `analysis_options.yaml - formatter - page_width` / `pubspec.yaml - flutter_gen - line_length`, then prepend the format width header to make all format tools respect the config. - Fixes #685 (comment) - Fixes #659 (comment) - Fixes #620 ## Type of change - [x] New feature (non-breaking change which adds functionality)
## 5.11.0 **Feature** - [#576](#576) Add support for deferred components. by [@ianmaciel](https://github.com/ianmaciel) - [#676](#676) Add new option `parse_animation` to parse metadata for animated images. by [@huandu](https://github.com/huandu) - [#680](#680) Add svg `ColorMapper` to svg loader. by [@AlexV525](https://github.com/AlexV525) - [#685](#685) Use `.vec` SVG class for `vector_graphics_compiler` transformed assets. by [@Albert221](https://github.com/Albert221) - [#697](#697) Refactor how generated files are being formatted. by [@AlexV525](https://github.com/AlexV525) **Development** - [#681](#682) Bump `dart_style` v3 which also requires Dart 3.4. by [@AlexV525](https://github.com/AlexV525) - [#682](#682) Add Facts generate utils. by [@AlexV525](https://github.com/AlexV525) - [#694](#694) Use fine-grained logger instead of `stdout.writeln`. by [@AlexV525](https://github.com/AlexV525) - [#698](#698) Improve workflow with automatic formatting. by [@AlexV525](https://github.com/AlexV525) - [#699](#699) Allow `build 3.0.0`. by [@davidmorgan](https://github.com/davidmorgan)
What does this change?
In the SVG integration, assets that have a
vector_graphics_compiler
asset transformer will useSvgGenImage.vec
constructor to use correct bytes loader.Fixes #684 🎯
Type of change
Please delete options that are not relevant.
Checklist:
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
melos run test
)melos run format
to automatically apply formatting)