Skip to content

Conversation

@mhbdev
Copy link
Contributor

@mhbdev mhbdev commented May 6, 2023

Fixing #126206 and #113388 issues

The IgnorePointer is preventing the richMessage touch events being recognized. Just removing that from

Solves #126206 and #113388

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.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels May 6, 2023
@flutter-dashboard
Copy link

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 (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

Adding a test to check if the tooltip accepts user's gestures on richMessage parameter.
@goderbauer
Copy link
Member

Looks like this is failing our checks. Can you please take another look at those? Thanks!

@mhbdev
Copy link
Contributor Author

mhbdev commented May 8, 2023

Looks like this is failing our checks. Can you please take another look at those? Thanks!

I haven't changed anything big and I can't understand what checks are telling and how to pass them.

@goderbauer
Copy link
Member

If you click through the checks, you will see that one test is failing:

02:18 +2024 ~2: /b/s/w/ir/x/w/flutter/packages/flutter/test/material/tooltip_test.dart: Tooltip should not ignore users tap on richMessage                                                             
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
Finder specifies a widget that would not receive pointer events.
A call to tap() with finder "exactly one widget with type "GestureDetector" (ignoring offstage
widgets): GestureDetector(startBehavior: start, dependencies: [MediaQuery])" derived an Offset
(Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot
receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#a6f62(creator: _GestureSemantics ← RawGestureDetector ← GestureDetector ← Semantics ← Builder ← RepaintBoundary-[GlobalKey#b817f] ← IgnorePointer ← AnimatedBuilder ← SnapshotWidget ← _ZoomExitTransition ← SnapshotWidget ← _ZoomEnterTransition ← ⋯, parentData: <none> (can use size), constraints: BoxConstraints(w=800.0, h=600.0), semantics node: SemanticsNode#4, size: Size(800.0, 600.0), behavior: deferToChild, gestures: [tap])
The hit test result at that offset is: HitTestResult(RenderMouseRegion#9b34a@Offset(400.0, 300.0),
RenderSemanticsAnnotations#57df0@Offset(400.0, 300.0), RenderPointerListener#5eb56@Offset(400.0,
300.0), RenderSemanticsGestureHandler#6d0ae@Offset(400.0, 300.0),
RenderExcludeSemantics#403f1@Offset(400.0, 300.0), RenderBlockSemantics#ba5ca@Offset(400.0, 300.0),
RenderIgnorePointer#49206@Offset(400.0, 300.0), _RenderTheater#901e9@Offset(400.0, 300.0),
RenderAbsorbPointer#d4913@Offset(400.0, 300.0), RenderPointerListener#f23fc@Offset(400.0, 300.0),
RenderSemanticsAnnotations#8db40@Offset(400.0, 300.0), RenderCustomPaint#cffb7@Offset(400.0, 300.0),
RenderSemanticsAnnotations#58104@Offset(400.0, 300.0),
RenderSemanticsAnnotations#7f5c8@Offset(400.0, 300.0), RenderTapRegionSurface#b2f34@Offset(400.0,
300.0), RenderSemanticsAnnotations#68ef4@Offset(400.0, 300.0),
RenderSemanticsAnnotations#fc829@Offset(400.0, 300.0),
RenderSemanticsAnnotations#400a9@Offset(400.0, 300.0),
HitTestEntry<HitTestTarget>#db214(RenderView#eb58b),
HitTestEntry<HitTestTarget>#7f279(<AutomatedTestWidgetsFlutterBinding>))
If you expected this target not to be able to receive pointer events, pass "warnIfMissed: false" to
"tap()".
To make this error into a non-fatal warning, set WidgetController.hitTestWarningShouldBeFatal to
false.

When the exception was thrown, this was the stack:
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:1328:11)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:1232:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:554:18)
#3      main.<anonymous closure> (file:///b/s/w/ir/x/w/flutter/packages/flutter/test/material/tooltip_test.dart:1929:18)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

The test description was:
  Tooltip should not ignore users tap on richMessage
════════════════════════════════════════════════════════════════════════════════════════════════════

02:18 +2024 ~2 -1: /b/s/w/ir/x/w/flutter/packages/flutter/test/material/tooltip_test.dart: Tooltip should not ignore users tap on richMessage [E]                                                      
  Test failed. See exception logs above.
  The test description was: Tooltip should not ignore users tap on richMessage

There is also a formatting issue:

▌07:49:13▐ Trailing spaces...
╔═╡ERROR╞═══════════════════════════════════════════════════════════════════════
║ /b/s/w/ir/x/w/Á flutter sdk/packages/flutter/test/material/tooltip_test.dart:1909: trailing U+0020 space character
╚═══════════════════════════════════════════════════════════════════════════════

@mhbdev mhbdev changed the title Update tooltip.dart Fixing richMessage gesture recognizer in tooltip widget May 8, 2023
@mhbdev
Copy link
Contributor Author

mhbdev commented May 9, 2023

Looks like this is failing our checks. Can you please take another look at those? Thanks!

All checks have passed.

@HansMuller HansMuller requested a review from goderbauer May 12, 2023 18:16
@mhbdev
Copy link
Contributor Author

mhbdev commented May 17, 2023

Good day @goderbauer. Would it be possible for you to spare some time to review my pull request? I would greatly appreciate your valuable feedback. Thank you very much for your kind assistance.

@goderbauer
Copy link
Member

I did some digging and wasn't able to find a reason why we wrapped the Tooltip with an IgnorePointer in the first place. Also looks like all tests are still passing, so I guess removing it is ok.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@goderbauer goderbauer requested a review from chunhtai May 18, 2023 17:33
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label May 18, 2023
@auto-submit auto-submit bot merged commit 434b81f into flutter:master May 18, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 19, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 19, 2023
flutter/flutter@5ae6438...077d644

2023-05-19 [email protected] Roll Flutter Engine from 2e6b1e6c3458 to a0ea4d2d9ea5 (1 revision) (flutter/flutter#127203)
2023-05-19 [email protected] Roll Flutter Engine from e9178e115f14 to 2e6b1e6c3458 (1 revision) (flutter/flutter#127196)
2023-05-19 [email protected] fix(flutter_tools): `findBundleFile` w/multiple flavor dimensions (flutter/flutter#127133)
2023-05-19 [email protected] Roll Flutter Engine from 2e8875870f52 to e9178e115f14 (1 revision) (flutter/flutter#127188)
2023-05-19 [email protected] Roll Flutter Engine from c7a209cc40c1 to 2e8875870f52 (1 revision) (flutter/flutter#127185)
2023-05-19 [email protected] Roll Flutter Engine from 5a57ff52f0f7 to c7a209cc40c1 (2 revisions) (flutter/flutter#127175)
2023-05-19 [email protected] Roll Flutter Engine from bfbd2e1dafb0 to 5a57ff52f0f7 (1 revision) (flutter/flutter#127172)
2023-05-19 [email protected] Roll Flutter Engine from e64084596182 to bfbd2e1dafb0 (2 revisions) (flutter/flutter#127167)
2023-05-19 [email protected] Roll Flutter Engine from 6bc60c8a9877 to e64084596182 (2 revisions) (flutter/flutter#127163)
2023-05-19 [email protected] Roll Flutter Engine from bca11a423f9c to 6bc60c8a9877 (1 revision) (flutter/flutter#127162)
2023-05-19 [email protected] Roll Flutter Engine from 9039c2dfb74c to bca11a423f9c (2 revisions) (flutter/flutter#127156)
2023-05-19 [email protected] Roll Flutter Engine from 3c23ddae1d2a to 9039c2dfb74c (2 revisions) (flutter/flutter#127154)
2023-05-19 [email protected] Properly cleans up routes (flutter/flutter#126453)
2023-05-19 [email protected] Remove deprecated `primaryVariant` and `secondaryVariant` from `ColorScheme` (flutter/flutter#127124)
2023-05-19 [email protected] Roll Flutter Engine from 17227c16ca58 to 3c23ddae1d2a (2 revisions) (flutter/flutter#127147)
2023-05-18 [email protected] Update `useMaterial3` api doc (flutter/flutter#127142)
2023-05-18 [email protected] Roll Flutter Engine from c7c679d6d411 to 17227c16ca58 (1 revision) (flutter/flutter#127143)
2023-05-18 [email protected] Roll Flutter Engine from 2c77c8011d45 to c7c679d6d411 (1 revision) (flutter/flutter#127139)
2023-05-18 [email protected] Roll Flutter Engine from 5fb3179a19c3 to 2c77c8011d45 (2 revisions) (flutter/flutter#127131)
2023-05-18 [email protected] Migrate benchmarks to package:web (flutter/flutter#126848)
2023-05-18 [email protected] Roll Flutter Engine from 237c60185ace to 5fb3179a19c3 (3 revisions) (flutter/flutter#127126)
2023-05-18 [email protected] Fixing richMessage gesture recognizer in tooltip widget (flutter/flutter#126207)
2023-05-18 [email protected] Roll Flutter Engine from 843ce0bba356 to 237c60185ace (2 revisions) (flutter/flutter#127122)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
Fixing flutter#126206 and flutter#113388 issues

*The IgnorePointer is preventing the richMessage touch events being recognized. Just removing that from*

*Solves flutter#126206 and flutter#113388*
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
flutter/flutter@5ae6438...077d644

2023-05-19 [email protected] Roll Flutter Engine from 2e6b1e6c3458 to a0ea4d2d9ea5 (1 revision) (flutter/flutter#127203)
2023-05-19 [email protected] Roll Flutter Engine from e9178e115f14 to 2e6b1e6c3458 (1 revision) (flutter/flutter#127196)
2023-05-19 [email protected] fix(flutter_tools): `findBundleFile` w/multiple flavor dimensions (flutter/flutter#127133)
2023-05-19 [email protected] Roll Flutter Engine from 2e8875870f52 to e9178e115f14 (1 revision) (flutter/flutter#127188)
2023-05-19 [email protected] Roll Flutter Engine from c7a209cc40c1 to 2e8875870f52 (1 revision) (flutter/flutter#127185)
2023-05-19 [email protected] Roll Flutter Engine from 5a57ff52f0f7 to c7a209cc40c1 (2 revisions) (flutter/flutter#127175)
2023-05-19 [email protected] Roll Flutter Engine from bfbd2e1dafb0 to 5a57ff52f0f7 (1 revision) (flutter/flutter#127172)
2023-05-19 [email protected] Roll Flutter Engine from e64084596182 to bfbd2e1dafb0 (2 revisions) (flutter/flutter#127167)
2023-05-19 [email protected] Roll Flutter Engine from 6bc60c8a9877 to e64084596182 (2 revisions) (flutter/flutter#127163)
2023-05-19 [email protected] Roll Flutter Engine from bca11a423f9c to 6bc60c8a9877 (1 revision) (flutter/flutter#127162)
2023-05-19 [email protected] Roll Flutter Engine from 9039c2dfb74c to bca11a423f9c (2 revisions) (flutter/flutter#127156)
2023-05-19 [email protected] Roll Flutter Engine from 3c23ddae1d2a to 9039c2dfb74c (2 revisions) (flutter/flutter#127154)
2023-05-19 [email protected] Properly cleans up routes (flutter/flutter#126453)
2023-05-19 [email protected] Remove deprecated `primaryVariant` and `secondaryVariant` from `ColorScheme` (flutter/flutter#127124)
2023-05-19 [email protected] Roll Flutter Engine from 17227c16ca58 to 3c23ddae1d2a (2 revisions) (flutter/flutter#127147)
2023-05-18 [email protected] Update `useMaterial3` api doc (flutter/flutter#127142)
2023-05-18 [email protected] Roll Flutter Engine from c7c679d6d411 to 17227c16ca58 (1 revision) (flutter/flutter#127143)
2023-05-18 [email protected] Roll Flutter Engine from 2c77c8011d45 to c7c679d6d411 (1 revision) (flutter/flutter#127139)
2023-05-18 [email protected] Roll Flutter Engine from 5fb3179a19c3 to 2c77c8011d45 (2 revisions) (flutter/flutter#127131)
2023-05-18 [email protected] Migrate benchmarks to package:web (flutter/flutter#126848)
2023-05-18 [email protected] Roll Flutter Engine from 237c60185ace to 5fb3179a19c3 (3 revisions) (flutter/flutter#127126)
2023-05-18 [email protected] Fixing richMessage gesture recognizer in tooltip widget (flutter/flutter#126207)
2023-05-18 [email protected] Roll Flutter Engine from 843ce0bba356 to 237c60185ace (2 revisions) (flutter/flutter#127122)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants