Skip to content

Conversation

@auto-submit
Copy link
Contributor

@auto-submit auto-submit bot commented May 1, 2024

Reverts: #145647

Initiated by: jmagman

Reason for reverting: Failing draggable_test in post-submit.

Original PR Author: timcreatedit

Reviewed By: {justinmc, goderbauer}

This change reverts the following previous change:
We changed the coordinates used to position the Draggable feedback by transforming them into the Overlays coordinate space. This has no influence on any untransformed Overlay, most Flutter apps should be not affected.
This PR fixes the positioning of the feedback in transformed context (see #145639 for before video):

Screenshot.2024-03-23.at.20.30.06.mp4

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@auto-submit auto-submit bot added the revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. label May 1, 2024
@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label May 1, 2024
@jmagman
Copy link
Member

jmagman commented May 1, 2024

10:24 +15103 ~145: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/widgets/draggable_test.dart: Drag and drop - DragTarget<Object> can accept Draggable<int> data
══╡ EXCEPTION CAUGHT BY GESTURE LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown while routing a pointer event:
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:951:9)
#1      State.context (package:flutter/src/widgets/framework.dart:957:6)
#2      _DragAvatar.updateDrag (package:flutter/src/widgets/drag_target.dart:862:40)
#3      _DragAvatar.update (package:flutter/src/widgets/drag_target.dart:843:5)
#4      MultiDragPointerState._move (package:flutter/src/gestures/multidrag.dart:100:16)
#5      MultiDragGestureRecognizer._handleEvent (package:flutter/src/gestures/multidrag.dart:267:13)
#6      PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#7      PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#8      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#9      PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#10     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#11     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:495:19)
#12     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:475:22)
#13     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:450:11)
#14     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:420:7)
#15     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:383:5)
#16     TestWidgetsFlutterBinding.handlePointerEventForSource.<anonymous closure> (package:flutter_test/src/binding.dart:662:42)
#17     TestWidgetsFlutterBinding.withPointerEventSource (package:flutter_test/src/binding.dart:672:11)
#18     TestWidgetsFlutterBinding.handlePointerEventForSource (package:flutter_test/src/binding.dart:662:5)
#19     WidgetTester.sendEventToBinding.<anonymous closure> (package:flutter_test/src/widget_tester.dart:868:15)
#22     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#23     WidgetTester.sendEventToBinding (package:flutter_test/src/widget_tester.dart:867:27)
#24     TestGesture.moveTo.<anonymous closure> (package:flutter_test/src/test_pointer.dart:533:27)
#27     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#28     TestGesture.moveTo (package:flutter_test/src/test_pointer.dart:531:27)
#29     main.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter/test/widgets/draggable_test.dart:3246:19)
<asynchronous suspension>
#30     testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:183:15)
<asynchronous suspension>
#31     TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1017:5)
<asynchronous suspension>
<asynchronous suspension>
(elided 5 frames from dart:async and package:stack_trace)

router: Instance of 'PointerRouter'
route: Closure: (PointerEvent) => void from Function '_handleEvent@425470698':.
event: PointerMoveEvent#b34eb(position: Offset(400.0, 98.0))
════════════════════════════════════════════════════════════════════════════════════════════════════

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8749120090464225025/+/u/run_test.dart_for_framework_tests_shard_and_subshard_impeller/stdout

@auto-submit auto-submit bot merged commit 5a41e1e into master May 1, 2024
@auto-submit auto-submit bot deleted the revert_5f9e069111add4231fbb1817cb6d6fa0e37cd43b branch May 1, 2024 18:26
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 2, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 2, 2024
Roll Flutter from d33bb8f to bf7191f (34 revisions)

flutter/flutter@d33bb8f...bf7191f

2024-05-02 [email protected] Roll Flutter Engine from b989d239e281 to 1fb36ac9d718 (2 revisions) (flutter/flutter#147713)
2024-05-02 [email protected] Roll Flutter Engine from 3c9c2ce8369e to b989d239e281 (1 revision) (flutter/flutter#147711)
2024-05-02 [email protected] Roll Flutter Engine from 58b031c096ea to 3c9c2ce8369e (2 revisions) (flutter/flutter#147703)
2024-05-02 [email protected] Roll Flutter Engine from fc28057dbd4d to 58b031c096ea (1 revision) (flutter/flutter#147701)
2024-05-02 [email protected] Roll Flutter Engine from bfc6787eedc3 to fc28057dbd4d (1 revision) (flutter/flutter#147700)
2024-05-02 [email protected] Roll Flutter Engine from 7cbef71f4f54 to bfc6787eedc3 (1 revision) (flutter/flutter#147699)
2024-05-02 [email protected] Roll Flutter Engine from 90ce9e5959fc to 7cbef71f4f54 (1 revision) (flutter/flutter#147696)
2024-05-02 [email protected] Roll Flutter Engine from 78dced50c467 to 90ce9e5959fc (1 revision) (flutter/flutter#147695)
2024-05-02 [email protected] add verbose logging to select hot reload/hot restart tests (flutter/flutter#147673)
2024-05-02 [email protected] Roll Flutter Engine from 3087ec1adddd to 78dced50c467 (3 revisions) (flutter/flutter#147693)
2024-05-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implement computeDryBaseline for `RenderWrap` (#146260)" (flutter/flutter#147692)
2024-05-02 [email protected] Roll Flutter Engine from f56c20c6ac67 to 3087ec1adddd (2 revisions) (flutter/flutter#147688)
2024-05-02 [email protected] Allow explicit exclusion of packages from pinned packages in `flutter update-packages --force-update` (flutter/flutter#147679)
2024-05-02 [email protected] Implement getDryBaseline for Stack and Overlay (flutter/flutter#146253)
2024-05-02 [email protected] Roll Flutter Engine from 2d73fa207927 to f56c20c6ac67 (2 revisions) (flutter/flutter#147681)
2024-05-02 [email protected] Update selectable_text_test.dart (flutter/flutter#147677)
2024-05-01 [email protected] Roll Flutter Engine from c536a14052e5 to 2d73fa207927 (2 revisions) (flutter/flutter#147678)
2024-05-01 [email protected] Implement computeDryBaseline for `RenderWrap` (flutter/flutter#146260)
2024-05-01 [email protected] Roll Flutter Engine from 842cf254ec58 to c536a14052e5 (1 revision) (flutter/flutter#147675)
2024-05-01 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.3.0 to 4.3.1 (flutter/flutter#147674)
2024-05-01 [email protected] Remove obsolete performance analysis tools. (flutter/flutter#147663)
2024-05-01 [email protected] Roll Flutter Engine from 5129b4919434 to 842cf254ec58 (3 revisions) (flutter/flutter#147670)
2024-05-01 [email protected] fix DropdownMenu overflow (flutter/flutter#147233)
2024-05-01 [email protected] [web] remove platform_messages_integration test (flutter/flutter#147654)
2024-05-01 [email protected] Fix `TextField` horizontal drag conflicts (flutter/flutter#147341)
2024-05-01 [email protected] `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#147472)
2024-05-01 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Draggable feedback positioning (#145647)" (flutter/flutter#147658)
2024-05-01 [email protected] Roll Flutter Engine from 0014e0353aa9 to 5129b4919434 (1 revision) (flutter/flutter#147655)
2024-05-01 [email protected] add lang attribute to the a11y_assessments app (flutter/flutter#147586)
2024-05-01 [email protected] Draggable feedback positioning (flutter/flutter#145647)
2024-05-01 [email protected] Roll Flutter Engine from 0ce67714ce4c to 0014e0353aa9 (13 revisions) (flutter/flutter#147649)
2024-05-01 [email protected] Add test for animated_fractionally_sized_box.0.dart API example. (flutter/flutter#146721)
2024-05-01 [email protected] Roll Packages from cc47b06 to aea93d2 (5 revisions) (flutter/flutter#147647)
2024-05-01 [email protected] Update reorderable_list.dart to use Dart 3 return switch statement for consistency (flutter/flutter#147505)

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 [email protected],[email protected],[email protected] 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

...
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
Roll Flutter from d33bb8f to bf7191f (34 revisions)

flutter/flutter@d33bb8f...bf7191f

2024-05-02 [email protected] Roll Flutter Engine from b989d239e281 to 1fb36ac9d718 (2 revisions) (flutter/flutter#147713)
2024-05-02 [email protected] Roll Flutter Engine from 3c9c2ce8369e to b989d239e281 (1 revision) (flutter/flutter#147711)
2024-05-02 [email protected] Roll Flutter Engine from 58b031c096ea to 3c9c2ce8369e (2 revisions) (flutter/flutter#147703)
2024-05-02 [email protected] Roll Flutter Engine from fc28057dbd4d to 58b031c096ea (1 revision) (flutter/flutter#147701)
2024-05-02 [email protected] Roll Flutter Engine from bfc6787eedc3 to fc28057dbd4d (1 revision) (flutter/flutter#147700)
2024-05-02 [email protected] Roll Flutter Engine from 7cbef71f4f54 to bfc6787eedc3 (1 revision) (flutter/flutter#147699)
2024-05-02 [email protected] Roll Flutter Engine from 90ce9e5959fc to 7cbef71f4f54 (1 revision) (flutter/flutter#147696)
2024-05-02 [email protected] Roll Flutter Engine from 78dced50c467 to 90ce9e5959fc (1 revision) (flutter/flutter#147695)
2024-05-02 [email protected] add verbose logging to select hot reload/hot restart tests (flutter/flutter#147673)
2024-05-02 [email protected] Roll Flutter Engine from 3087ec1adddd to 78dced50c467 (3 revisions) (flutter/flutter#147693)
2024-05-02 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implement computeDryBaseline for `RenderWrap` (#146260)" (flutter/flutter#147692)
2024-05-02 [email protected] Roll Flutter Engine from f56c20c6ac67 to 3087ec1adddd (2 revisions) (flutter/flutter#147688)
2024-05-02 [email protected] Allow explicit exclusion of packages from pinned packages in `flutter update-packages --force-update` (flutter/flutter#147679)
2024-05-02 [email protected] Implement getDryBaseline for Stack and Overlay (flutter/flutter#146253)
2024-05-02 [email protected] Roll Flutter Engine from 2d73fa207927 to f56c20c6ac67 (2 revisions) (flutter/flutter#147681)
2024-05-02 [email protected] Update selectable_text_test.dart (flutter/flutter#147677)
2024-05-01 [email protected] Roll Flutter Engine from c536a14052e5 to 2d73fa207927 (2 revisions) (flutter/flutter#147678)
2024-05-01 [email protected] Implement computeDryBaseline for `RenderWrap` (flutter/flutter#146260)
2024-05-01 [email protected] Roll Flutter Engine from 842cf254ec58 to c536a14052e5 (1 revision) (flutter/flutter#147675)
2024-05-01 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.3.0 to 4.3.1 (flutter/flutter#147674)
2024-05-01 [email protected] Remove obsolete performance analysis tools. (flutter/flutter#147663)
2024-05-01 [email protected] Roll Flutter Engine from 5129b4919434 to 842cf254ec58 (3 revisions) (flutter/flutter#147670)
2024-05-01 [email protected] fix DropdownMenu overflow (flutter/flutter#147233)
2024-05-01 [email protected] [web] remove platform_messages_integration test (flutter/flutter#147654)
2024-05-01 [email protected] Fix `TextField` horizontal drag conflicts (flutter/flutter#147341)
2024-05-01 [email protected] `flutter/lib/src/`: refactoring if-chains into switch expressions (flutter/flutter#147472)
2024-05-01 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Draggable feedback positioning (#145647)" (flutter/flutter#147658)
2024-05-01 [email protected] Roll Flutter Engine from 0014e0353aa9 to 5129b4919434 (1 revision) (flutter/flutter#147655)
2024-05-01 [email protected] add lang attribute to the a11y_assessments app (flutter/flutter#147586)
2024-05-01 [email protected] Draggable feedback positioning (flutter/flutter#145647)
2024-05-01 [email protected] Roll Flutter Engine from 0ce67714ce4c to 0014e0353aa9 (13 revisions) (flutter/flutter#147649)
2024-05-01 [email protected] Add test for animated_fractionally_sized_box.0.dart API example. (flutter/flutter#146721)
2024-05-01 [email protected] Roll Packages from cc47b06 to aea93d2 (5 revisions) (flutter/flutter#147647)
2024-05-01 [email protected] Update reorderable_list.dart to use Dart 3 return switch statement for consistency (flutter/flutter#147505)

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 [email protected],[email protected],[email protected] 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

...
dkwingsmt pushed a commit that referenced this pull request Jun 28, 2024
Reopened after revert in #147658

Another test was added in the meantime to `draggable_test.dart` that
didn't call `gesture.up()`. I added this call to the test and now all
tests pass.

---
# Original Description (#145647):
We changed the coordinates used to position the `Draggable` feedback by
transforming them into the `Overlay`s coordinate space. This has no
influence on any untransformed `Overlay`, most Flutter apps should be
not affected.
This PR fixes the positioning of the feedback in transformed context
(see #145639 for before video):


https://github.com/flutter/flutter/assets/42270125/df34e198-0667-453d-a27a-a79b2e2825a1

- fixes #145639 

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] 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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes

---------

Co-authored-by: Jesper Bellenbaum <[email protected]>
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jul 8, 2024
Reopened after revert in flutter#147658

Another test was added in the meantime to `draggable_test.dart` that
didn't call `gesture.up()`. I added this call to the test and now all
tests pass.

---
# Original Description (flutter#145647):
We changed the coordinates used to position the `Draggable` feedback by
transforming them into the `Overlay`s coordinate space. This has no
influence on any untransformed `Overlay`, most Flutter apps should be
not affected.
This PR fixes the positioning of the feedback in transformed context
(see flutter#145639 for before video):


https://github.com/flutter/flutter/assets/42270125/df34e198-0667-453d-a27a-a79b2e2825a1

- fixes flutter#145639 

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] 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
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes

---------

Co-authored-by: Jesper Bellenbaum <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Draggable Feedback is positioned incorrectly when the Overlay is scaled

2 participants