forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[ImgBot] Optimize images #1
Open
imgbot
wants to merge
1
commit into
master
Choose a base branch
from
imgbot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Total -- 695.40kb -> 543.96kb (21.78%) /dev/tools/vitool/test_assets/empty_svg_2_100x50.svg -- 0.18kb -> 0.08kb (56.04%) /examples/image_list/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /examples/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /examples/api/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /dev/integration_tests/ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /dev/a11y_assessments/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /dev/integration_tests/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /dev/manual_tests/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -- 14.45kb -> 9.69kb (32.93%) /examples/image_list/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /examples/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /examples/api/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /dev/integration_tests/ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /dev/a11y_assessments/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /dev/integration_tests/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /dev/manual_tests/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -- 45.89kb -> 31.58kb (31.18%) /examples/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /examples/api/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /examples/image_list/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /dev/manual_tests/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /dev/a11y_assessments/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /dev/integration_tests/ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /dev/integration_tests/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -- 1.40kb -> 1.00kb (28.62%) /examples/api/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /examples/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /examples/image_list/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /dev/manual_tests/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /dev/a11y_assessments/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /dev/integration_tests/ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /dev/integration_tests/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -- 5.79kb -> 4.27kb (26.23%) /examples/api/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /examples/image_list/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /examples/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /dev/manual_tests/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /dev/a11y_assessments/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /dev/integration_tests/ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /dev/integration_tests/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -- 3.20kb -> 2.60kb (18.77%) /dev/tools/vitool/test_assets/illegal_svg_multiple_roots.svg -- 0.10kb -> 0.09kb (12.87%) /dev/tools/vitool/test_assets/empty_svg_1_48x48.svg -- 0.09kb -> 0.08kb (12.77%) /dev/tools/vitool/test_assets/bar_group_opacity.svg -- 0.22kb -> 0.20kb (11.01%) /dev/tools/vitool/test_assets/bars_group.svg -- 0.30kb -> 0.26kb (10.86%) /dev/tools/vitool/test_assets/bar_group_scale.svg -- 0.23kb -> 0.21kb (9.62%) /dev/tools/vitool/test_assets/bar_group_translate.svg -- 0.24kb -> 0.21kb (9.5%) /dev/tools/vitool/test_assets/leading_space_path_command.svg -- 0.13kb -> 0.12kb (9.49%) /dev/tools/vitool/test_assets/illegal_transform.svg -- 0.24kb -> 0.22kb (9.39%) /dev/tools/vitool/test_assets/bar_group_rotate_scale.svg -- 0.25kb -> 0.23kb (8.98%) /dev/tools/vitool/test_assets/illegal_path.svg -- 0.14kb -> 0.13kb (8.33%) /dev/tools/vitool/test_assets/horizontal_bar.svg -- 0.18kb -> 0.17kb (7.14%) /dev/tools/vitool/test_assets/horizontal_bar_relative.svg -- 0.18kb -> 0.17kb (7.1%) /dev/tools/vitool/test_assets/close_path_in_middle.svg -- 0.19kb -> 0.18kb (6.6%) /examples/image_list/images/coast.jpg -- 197.60kb -> 197.60kb (0%) Signed-off-by: ImgBotApp <[email protected]>
hakimLyon
pushed a commit
that referenced
this pull request
Aug 24, 2023
This is a follow up to the following pull requests: - flutter#124514 I was finally able to reproduce this bug and found out why it was happening. Consider this code: ```dart GestureDetector( behavior: HitTestBehavior.translucent, // Note: Make sure onTap is not null to ensure events // are captured by `GestureDetector` onTap: () {}, child: _shouldShowSlider ? Slider(value: _value, onChanged: _handleSlide) : const SizedBox.shrink(). ) ``` Runtime exception happens when: 1. User taps and holds the Slider (drag callback captured by `GestureDetector`) 2. `_shouldShowSlider` changes to false, Slider disappears and unmounts, and unregisters `_handleSlide`. But the callback is still registered by `GestureDetector` 3. Users moves finger as if Slider were still there 4. Drag callback is invoked, `_SliderState.showValueIndicator` is called 5. Exception - Slider is already disposed This pull request fixes it by adding a mounted check inside `_SliderState.showValueIndicator` to ensure the Slider is actually mounted at the time of invoking drag event callback. I've added a unit test that will fail without this change. The error stack trace is: ``` The following assertion was thrown while handling a gesture: This widget has been unmounted, so the State no longer has a context (and should be considered defunct). Consider canceling any active work during "dispose" or using the "mounted" getter to determine if the State is still active. When the exception was thrown, this was the stack: #0 State.context.<anonymous closure> (package:flutter/src/widgets/framework.dart:950:9) #1 State.context (package:flutter/src/widgets/framework.dart:956:6) flutter#2 _SliderState.showValueIndicator (package:flutter/src/material/slider.dart:968:18) flutter#3 _RenderSlider._startInteraction (package:flutter/src/material/slider.dart:1487:12) flutter#4 _RenderSlider._handleDragStart (package:flutter/src/material/slider.dart:1541:5) flutter#5 DragGestureRecognizer._checkStart.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:531:53) flutter#6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24) flutter#7 DragGestureRecognizer._checkStart (package:flutter/src/gestures/monodrag.dart:531:7) flutter#8 DragGestureRecognizer._checkDrag (package:flutter/src/gestures/monodrag.dart:498:5) flutter#9 DragGestureRecognizer.acceptGesture (package:flutter/src/gestures/monodrag.dart:431:7) flutter#10 _CombiningGestureArenaMember.acceptGesture (package:flutter/src/gestures/team.dart:45:14) flutter#11 GestureArenaManager._resolveInFavorOf (package:flutter/src/gestures/arena.dart:281:12) flutter#12 GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:239:9) flutter#13 GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:53:12) flutter#14 _CombiningGestureArenaMember._resolve (package:flutter/src/gestures/team.dart:85:15) flutter#15 _CombiningGestureArenaEntry.resolve (package:flutter/src/gestures/team.dart:19:15) flutter#16 OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:375:13) flutter#17 DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:414:13) flutter#18 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12) flutter#19 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9) flutter#20 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13) flutter#21 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18) flutter#22 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7) flutter#23 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19) flutter#24 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22) flutter#25 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:439:11) flutter#26 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7) flutter#27 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5) flutter#28 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7) flutter#29 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9) flutter#30 _invoke1 (dart:ui/hooks.dart:186:13) flutter#31 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:433:7) flutter#32 _dispatchPointerDataPacket (dart:ui/hooks.dart:119:31) Handler: "onStart" Recognizer: HorizontalDragGestureRecognizer#a5df2 ``` *List which issues are fixed by this PR. You must list at least one issue.* Internal bug: b/273666179, b/192329942 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
hakimLyon
pushed a commit
that referenced
this pull request
Nov 15, 2023
hakimLyon
pushed a commit
that referenced
this pull request
Nov 15, 2023
flutter#137242) This reverts commit d36a843 (flutter#136809) This fails even tho golden files were approved and `golden test` pending was cleared and green and `autosubmit` successfully merged the PR. ```console 02:42 +4618 ~5: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/outlined_button_test.dart: Material3 - OutlinedButton, OutlinedButton.icon defaults ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following SkiaException was thrown while running async test code: Skia Gold received an unapproved image in post-submit testing. Golden file images in flutter/flutter are triaged in pre-submit during code review for the given PR. Visit https://flutter-gold.skia.org/ to view and approve the image(s), or revert the associated change. For more information, visit the wiki: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter Debug information for Gold -------------------------------- stdout: Given image with hash 37275e74c51f98d7abd7f301c5c94ac1 for test material.outlined_button.ink_sparkle.default Expectation for test: 531f5fa74908d2e6db2b8fd86a6b8662 (positive) Expectation for test: 683e368ff51d947a3d63c2a5f4568cf6 (positive) Expectation for test: 749241ff0fa21595b2c6cb551fd40b68 (positive) Expectation for test: aaf9ac1328614d6c9f4540308bc86f62 (positive) Expectation for test: b31a50440c7dd31b10cacd9e7b5c6b86 (positive) Expectation for test: c0a7c8c625b69ddc695a770f28abd403 (positive) Expectation for test: f1f66ce931c2ef33ebcb699a637025a6 (positive) Expectation for test: 2d32e34efc1d7ca4cd12965402fb76ff (positive) Untriaged or negative image: https://flutter-gold.skia.org/detail?grouping=name%3Dmaterial.outlined_button.ink_sparkle.default%26source_type%3Dflutter&digest=37275e74c51f98d7abd7f301c5c94ac1 stderr: Test: material.outlined_button.ink_sparkle.default FAIL result-state.json: No result file found. When the exception was thrown, this was the stack: #0 SkiaGoldClient.imgtestAdd (package:flutter_goldens_client/skia_client.dart:243:7) <asynchronous suspension> #1 MatchesGoldenFile.matchAsync.<anonymous closure> (package:flutter_test/src/_matchers_io.dart:118:32) <asynchronous suspension> <asynchronous suspension> (elided one frame from dart:async) The exception was caught asynchronously. ════════════════════════════════════════════════════════════════════════════════════════════════════ 02:42 +4618 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/menu_anchor_test.dart: Menu functions keyboard directional traversal works 02:42 +4618 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/outlined_button_test.dart: Material3 - OutlinedButton, OutlinedButton.icon defaults [E] Test failed. See exception logs above. The test description was: Material3 - OutlinedButton, OutlinedButton.icon defaults 02:42 +4619 ~5 -1: C:/b/s/w/ir/x/w/flutter/packages/flutter/test/material/menu_anchor_test.dart: Menu functions keyboard directional traversal works ``` ## 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]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Beep boop. Your images are optimized!
Your image file size has been reduced by 22% 🎉
Details
📝 docs | repo | 🙋🏾 issues | 🏪 marketplace
~Imgbot - Part of Optimole family