Skip to content

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Nov 16, 2023

Description

This PR activates the M3 InkSparkle splash animation on Android + CanvasKit.
Before it InkSparkle was only activated on native Android.

Related Issue

Fixes #138487

Tests

Updates several existing tests.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Nov 16, 2023
@bleroux
Copy link
Contributor Author

bleroux commented Nov 16, 2023

Web tests are failing because the ink sparkle shaders can not be loaded in the test environment:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following HttpFetchNoPayloadError was thrown running a test:
Flutter Web engine failed to fetch "assets/shaders/ink_sparkle.frag". HTTP request succeeded, but
the server responded with HTTP status 404.

When the exception was thrown, this was the stack:
../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3  throw_
../lib/_engine/engine/dom.dart 1653:7                                           get payload
../lib/ui_web/ui_web/asset_manager.dart 96:27                                   load
../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50           <fn>
../packages/stack_trace/src/stack_zone_specification.dart.js 187:98             <fn>
../packages/stack_trace/src/stack_zone_specification.dart.js 239:16             [_run]
../packages/stack_trace/src/stack_zone_specification.dart.js 187:80             <fn>
../dart-sdk/lib/async/zone.dart 1407:47                                         _rootRunUnary
../dart-sdk/lib/async/zone.dart 1308:19                                         runUnary
../dart-sdk/lib/async/future_impl.dart 162:18                                   handleValue
../dart-sdk/lib/async/future_impl.dart 838:44                                   handleValueCallback
../dart-sdk/lib/async/future_impl.dart 867:13                                   _propagateToListeners
../dart-sdk/lib/async/future_impl.dart 643:5                                    [_completeWithValue]
../dart-sdk/lib/async/future_impl.dart 713:7                                    <fn>
../packages/fake_async/fake_async.dart.js 140:40                                flushMicrotasks
../packages/flutter_test/src/test_text_input_key_handler.dart.js 10702:21       <fn>
../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50           <fn>
../packages/stack_trace/src/stack_zone_specification.dart.js 187:98             <fn>
../packages/stack_trace/src/stack_zone_specification.dart.js 239:16             [_run]
../packages/stack_trace/src/stack_zone_specification.dart.js 187:80             <fn>
../dart-sdk/lib/async/zone.dart 1407:47                                         _rootRunUnary
../dart-sdk/lib/async/zone.dart 1308:19                                         runUnary
../dart-sdk/lib/async/future_impl.dart 162:18                                   handleValue
../dart-sdk/lib/async/future_impl.dart 838:44                                   handleValueCallback
../dart-sdk/lib/async/future_impl.dart 867:13                                   _propagateToListeners
../dart-sdk/lib/async/future_impl.dart 643:5                                    [_completeWithValue]
../dart-sdk/lib/async/future_impl.dart 713:7                                    callback
../dart-sdk/lib/async/schedule_microtask.dart 40:11                             _microtaskLoop
../dart-sdk/lib/async/schedule_microtask.dart 49:5                              _startMicrotaskLoop
../dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7           <fn>

Outside test, the shader works nicely (see #138487 description).

@bleroux bleroux requested a review from Piinks November 16, 2023 15:08
@Piinks
Copy link
Contributor

Piinks commented Nov 16, 2023

I am not sure if we need to do something in the engine to have this work on web. Maybe @yjbanov knows?

@bleroux bleroux force-pushed the activate_ink_sparkle_on_canvaskit branch from 2b52f8f to 3f3d7ad Compare November 30, 2023 06:34
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

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

@bleroux bleroux force-pushed the activate_ink_sparkle_on_canvaskit branch from 3f3d7ad to 03465b9 Compare December 21, 2023 06:55
@bleroux bleroux force-pushed the activate_ink_sparkle_on_canvaskit branch from 03465b9 to af424c8 Compare February 6, 2024 10:14
@Piinks Piinks added the a: fidelity Matching the OEM platforms better label Feb 7, 2024
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Woohoo, Glad to see this land! LGTM!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 7, 2024
@auto-submit auto-submit bot merged commit 7f811fb into flutter:master Feb 7, 2024
@zanderso
Copy link
Member

zanderso commented Feb 7, 2024

Reason for revert: Failing in post-submit: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20web_long_running_tests_5_5/14975/overview

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following FormatException was thrown running a test:
Invalid Shader Data

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 328:3  throw_
lib/_engine/engine/shader_data.dart 24:7                                     fromBytes
lib/_engine/engine/canvaskit/painting.dart 384:46                            fromBytes
lib/_engine/engine/canvaskit/renderer.dart 507:32                            <fn>
dart-sdk/lib/async/zone.dart 1407:47                                         _rootRunUnary
dart-sdk/lib/async/zone.dart 1308:19                                         runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                   handleValue
dart-sdk/lib/async/future_impl.dart 838:44                                   handleValueCallback
dart-sdk/lib/async/future_impl.dart 867:13                                   _propagateToListeners
dart-sdk/lib/async/future_impl.dart 643:5                                    [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 713:7                                    <fn>
dart-sdk/lib/async/zone.dart 1399:13                                         _rootRun
dart-sdk/lib/async/zone.dart 1301:19                                         run
dart-sdk/lib/async/zone.dart 1209:7                                          runGuarded
dart-sdk/lib/async/zone.dart 1249:23                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                             _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                              _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7           <fn>

@zanderso zanderso added the revert Autorevert PR (with "Reason for revert:" comment) label Feb 7, 2024
auto-submit bot pushed a commit that referenced this pull request Feb 7, 2024
@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Feb 7, 2024
auto-submit bot added a commit that referenced this pull request Feb 7, 2024
Reverts #138545

Initiated by: zanderso

Reason for reverting: Failing in post-submit: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20web_long_running_tests_5_5/14975/overview

```
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following FormatException was thrown running a test:
Invalid Shader Data

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.da

Original PR Author: bleroux

Reviewed By: {Piinks}

This change reverts the following previous change:
Original Description:
## Description

This PR activates the M3 `InkSparkle` splash animation on Android + CanvasKit.
Before it `InkSparkle` was only activated on native Android.

## Related Issue

Fixes #138487

## Tests

Updates several existing tests.
dumazy added a commit to dumazy/flutter that referenced this pull request Feb 7, 2024
* master: (32 commits)
  [reland] Add `AnimationStyle` to `showSnackBar` (flutter#143052)
  Run Mac x64 build tests in postsubmit only (flutter#142334)
  Copy the flutter version JSON file into the simulated Flutter SDK used by update_packages (flutter#143035)
  Mark `Windows_android hot_mode_dev_cycle_win__benchmark` as no longer flaky (flutter#143016)
  Dispose precached image info (flutter#143017)
  Instrument CurvedAnimation. (flutter#143007)
  Update _goldens_io.dart to generate failure images during a size mism… (flutter#142177)
  Reverts "Activate InkSparkle on CanvasKit" (flutter#143036)
  Activate InkSparkle on CanvasKit (flutter#138545)
  [Windows] Fix signed/unsigned int comparison (flutter#142341)
  Reverts "Move native assets to `isolated/` directory" (flutter#143027)
  Reverts "Roll Flutter Engine from 8088863 to 07cdaab (18 revisions)" (flutter#143025)
  Make destructiveRed a CupertinoDynamicColor (flutter#141364)
  Move native assets to `isolated/` directory (flutter#142709)
  Roll Flutter Engine from 8088863 to 07cdaab (18 revisions) (flutter#143005)
  Fix CupertinoPageScaffold resizeToAvoidBottomInset (flutter#142776)
  Reverts "Add `AnimationStyle` to `showSnackBar`" (flutter#143001)
  Material 3 - Tab indicator stretch animation (flutter#141954)
  Add `AnimationStyle` to `showSnackBar` (flutter#142825)
  Roll Packages from ae3494d to 1a5a7ce (2 revisions) (flutter#142985)
  ...
@bleroux bleroux deleted the activate_ink_sparkle_on_canvaskit branch February 7, 2024 14:12
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 7, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 7, 2024
flutter/flutter@e6ba809...8431cae

2024-02-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1ac6beb8a3c2 to 6807342305e4 (6 revisions) (flutter/flutter#143082)
2024-02-07 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 808886312e2b to 1ac6beb8a3c2 (22 revisions) (flutter/flutter#143039)
2024-02-07 engine-flutter-autoroll@skia.org Roll Packages from 1a5a7ce to e4ea6bf (4 revisions) (flutter/flutter#143076)
2024-02-07 leroux_bruno@yahoo.fr Fix M3 text field height + initial step for input decorator M3 test migration (flutter/flutter#142981)
2024-02-07 tessertaha@gmail.com [reland] Add `AnimationStyle` to `showSnackBar` (flutter/flutter#143052)
2024-02-07 magder@google.com Run Mac x64 build tests in postsubmit only (flutter/flutter#142334)
2024-02-07 jason-simmons@users.noreply.github.com Copy the flutter version JSON file into the simulated Flutter SDK used by update_packages (flutter/flutter#143035)
2024-02-07 andrewrkolos@gmail.com Mark `Windows_android hot_mode_dev_cycle_win__benchmark` as no longer flaky (flutter/flutter#143016)
2024-02-07 dnfield@google.com Dispose precached image info (flutter/flutter#143017)
2024-02-07 polinach@google.com Instrument CurvedAnimation. (flutter/flutter#143007)
2024-02-07 github@bramp.net Update _goldens_io.dart to generate failure images during a size mism� (flutter/flutter#142177)
2024-02-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Activate InkSparkle on CanvasKit" (flutter/flutter#143036)
2024-02-07 leroux_bruno@yahoo.fr Activate InkSparkle on CanvasKit (flutter/flutter#138545)
2024-02-07 chris@bracken.jp [Windows] Fix signed/unsigned int comparison (flutter/flutter#142341)
2024-02-07 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Move native assets to `isolated/` directory" (flutter/flutter#143027)
2024-02-06 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions)" (flutter/flutter#143025)
2024-02-06 simonfv@gmail.com Make destructiveRed a CupertinoDynamicColor (flutter/flutter#141364)
2024-02-06 dacoharkes@google.com Move native assets to `isolated/` directory (flutter/flutter#142709)
2024-02-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 808886312e2b to 07cdaab7f531 (18 revisions) (flutter/flutter#143005)
2024-02-06 smartercallum@gmail.com Fix CupertinoPageScaffold resizeToAvoidBottomInset (flutter/flutter#142776)
2024-02-06 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add `AnimationStyle` to `showSnackBar`" (flutter/flutter#143001)
2024-02-06 davidmartos96@gmail.com Material 3 - Tab indicator stretch animation (flutter/flutter#141954)
2024-02-06 tessertaha@gmail.com Add `AnimationStyle` to `showSnackBar` (flutter/flutter#142825)

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
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
@bleroux bleroux restored the activate_ink_sparkle_on_canvaskit branch February 28, 2024 12:41
@bleroux bleroux deleted the activate_ink_sparkle_on_canvaskit branch February 28, 2024 13:39
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: fidelity Matching the OEM platforms better a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activate InkSparkle on Canvaskit (Android only)

3 participants