132 Commits

Author SHA1 Message Date
Polina Cherkasova
ad05949971
Fix flakiness: finalize dropped gestures in tests to release resources, and update doc-comment. (#136136) 2023-10-10 18:11:23 -07:00
Kostia Sokolovskyi
5064f782c1
Cover more test/material tests with leak tracking. (#136093) 2023-10-10 10:05:51 -07:00
Polina Cherkasova
a7dbec31f1
Cover more tests with leak tracking. (#133958) 2023-09-05 13:45:12 -07:00
Polina Cherkasova
a7b69b069f
Unpin leak_tracker and handle breaking changes in API. (#132352) 2023-08-14 10:05:20 -07:00
Zachary Anderson
f4c25bbb35
Revert "Handle breaking changes in leak_tracker." (#132223)
Reverts flutter/flutter#131998

Reverting for https://github.com/flutter/flutter/issues/132222
2023-08-09 08:14:39 -07:00
Polina Cherkasova
acd636f7ba
Handle breaking changes in leak_tracker. (#131998) 2023-08-08 09:39:19 -07:00
Kate Lovett
f054f5aa09
Move mock canvas to flutter_test (#131631)
Fixes https://github.com/flutter/flutter/issues/59413

This relocates `mock_canvas.dart` and `recording_canvas.dart` from `flutter/test/rendering` to `flutter_test`. 

The testing functionality afforded by mock_canvas should be available to everyone, not just the framework. :)

mock_canvas.dart needed a bit of cleanup - things like formatting and super parameters.
2023-08-07 23:43:03 +00:00
Polina Cherkasova
e8b397caca
Setup leak tracking regression for material. (#130169) 2023-07-22 06:45:27 -07:00
LongCatIsLooong
2da353a59a
Exclude Tooltip's overlay child from SelectableRegion (#130181)
Fixes https://github.com/flutter/flutter/issues/129969 by making tooltip text unselectable (for now). 
Also fixes some other issues uncovered when I was writing the tests.

Currently `getTransformTo` only works on ancestors. I'll try to add a new method that computes the transform from 2 arbitrary render objects in the same render tree in a follow-up PR and make `Selectable` use that method instead.
2023-07-13 00:35:57 +00:00
LongCatIsLooong
04ff86f020
Relax OverlayPortal asserts (#129053)
Fixes https://github.com/flutter/flutter/issues/129025

Also 
- simplifies OverlayPortal code a bit and adds an assert.
-  `Tooltip` shouldn't rebuild when hiding/showing the tooltip
2023-06-21 02:40:48 +00:00
Michael Goderbauer
5ab5d82a39
Remove AbstractNode from RenderObject and deprecate it (#128973)
It's time to say good bye to an old friend. 
It has outlived its usefulness.
Farewell, AbstractNode! 🫡
2023-06-16 16:16:36 +00:00
Qun Cheng
a5f8b64ef9
Update unit tests in material library for Material 3 (#128725)
Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.

All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.

related to #127064
2023-06-13 21:21:13 +00:00
LongCatIsLooong
e1fdb1aa74
migrate Tooltip to use OverlayPortal (#127728)
https://github.com/flutter/flutter/issues/7151 isn't a problem with OverlayPortal so the test is removed.
Also removed some `mounted` checks since they're no longer needed.
2023-06-10 20:54:37 +00:00
LongCatIsLooong
56808b486d
Remove a bad assert from tooltip implementation (#127629)
Fixes https://github.com/flutter/flutter/issues/127575

The `_handleMouseEnter` and `_handleMouseExit` calls are balanced, but the tooltip could be dismissed by an external `PointerDown` event interacting with a different UI component so the ` assert(_activeHoveringPointerDevices.isNotEmpty);` does not really make sense.
2023-05-26 00:29:27 +00:00
LongCatIsLooong
1b800fd496
Remove Tooltip mouse tracker listener & update hovering/MouseRegion logic & animation (#119199)
Fixes https://github.com/flutter/flutter/issues/117627

### Behavior changes:
1. If fade in/fade out animation is already in progress, hiding/showing the tooltip will immediately take effect without waiting for `waitDuration`.
2. A PointerDownEvent that doesn't become a part of a "trigger" gesture dismisses the tooltip, even for hovered ones.
3. The OverlayEntry is now updated only when the previous tooltip was completely dismissed. This can be fixed by OverlayPortal but I'm not sure what the correct behavior is.
2023-05-25 07:24:45 +00:00
Mahdi Bagheri
434b81f1a5
Fixing richMessage gesture recognizer in tooltip widget (#126207)
Fixing #126206 and #113388 issues

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

*Solves #126206 and #113388*
2023-05-18 18:32:22 +00:00
Polina Cherkasova
5a80f8d637
Define testWidgetsWithLeakTracking. (#125063) 2023-05-04 12:09:41 -07:00
Polina Cherkasova
e0b2138ba7
Dispose OverlayEntry in TooltipState. (#117291) 2023-02-03 06:31:47 -08:00
Michael Goderbauer
b0f1714b7b
Make Flex,Row,Column const for real (#119673)
* Make Flex,Row,Column const for real

* dart fix --apply

* fix snippets

* fix integration test

* add comment
2023-02-02 19:33:57 +00:00
Eilidh Southren
1ee87990dc
Revert "[Re-land] Exposed tooltip longPress (#118796)" (#119832)
This reverts commit d27880801435109432dcada4a2245193af4ae1f2.
2023-02-02 17:11:19 +00:00
Michael Goderbauer
7a926dcb03
Deprecate MediaQuery[Data].fromWindow (#119647)
* Deprecate MediaQuery[Data].fromWindow

* ++

* dart fix
2023-02-01 22:44:00 +00:00
Eilidh Southren
d278808014
[Re-land] Exposed tooltip longPress (#118796)
* Check whether slider is mounted before interaction, no-op if unmounted (#113556)

* Check whether slider is unmounted before interaction

* Update slider.dart

* Update Slider

* Add test

* Update slider_test.dart

* Update packages/flutter/test/material/slider_test.dart

Co-authored-by: Taha Tesser <tessertaha@gmail.com>

Co-authored-by: Taha Tesser <tessertaha@gmail.com>

* exposed tooltip longPress action when available

* updated tooltip test

* updated date picker test

---------

Co-authored-by: Mingyu <lyming90@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Harper Liu <harperl0818@gmail.com>
2023-02-01 15:53:41 +00:00
Michael Goderbauer
bb73121cb4
Remove unnecessary null checks in flutter/test (#118905) 2023-01-20 22:09:06 +00:00
Xilai Zhang
4b4783d1f0
[flutter roll] Revert both #117338 and #117547 (#117557)
* Revert "Exposed tooltip longPress action when available (#117338)"

This reverts commit 38e3930f39d8efca0a27f9663129d27a9093cca8.

* Revert "fixes android_semantics_integration_test to expect long press for tootip"
2022-12-23 22:46:45 +00:00
Michael Goderbauer
fa3777bd3e
Enable sized_box_shrink_expand lint (#117371)
* Enable  lint

* note about discarded_futures

* note about use_decorated_box

* update note on require_trailing_commas
2022-12-20 19:07:15 +00:00
harperl-lgtm
38e3930f39
Exposed tooltip longPress action when available (#117338)
* Exposed tooltip longPress action when available (Trigger mode is long press)
2022-12-20 10:03:31 -05:00
Bernardo Ferrari
01f3fca3f5
Improve ShapeDecoration performance. (#108648) 2022-08-17 19:25:06 +00:00
Bruno Leroux
399a649eae
Fix TooltipState null check error (#106330) 2022-06-22 05:19:05 +00:00
Pierre-Louis
cb9a1d623c
Use curly_braces_in_flow_control_structures for material (#104499)
* Use `curly_braces_in_flow_control_structures` for `material`

* include test/material

* add back removed comments
2022-05-25 13:17:06 +02:00
Casey Hillers
da105b2b24
Revert "[framework] inline AbstractNode into RenderObject" (#104257) 2022-05-20 11:43:11 -07:00
Bruno Leroux
afdfc56bbb
Fix tooltips don't dismiss when using TooltipTriggerMode.tap (#103960) 2022-05-20 04:58:06 -07:00
Bruno Leroux
5c6f65ee99
Add Tooltip onTriggered callback (#104237)
Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2022-05-20 11:23:32 +02:00
Jonah Williams
24bd28f696
[framework] inline AbstractNode into RenderObject (#103832) 2022-05-19 14:28:09 -07:00
Bruno Leroux
4b67827169
Add Tooltip default vertical padding (#103395) 2022-05-18 17:42:15 -07:00
Bruno Leroux
190d77627d
Add Tooltip textAlign property (#103475) 2022-05-12 16:09:15 -07:00
Bruno Leroux
ff136cba7f
Fix Tooltip obscured by keyboard (#103339) 2022-05-09 13:39:07 -07:00
Bruno Leroux
cfc5dc2a21
Increase Tooltip font size on Desktop (#103189) 2022-05-06 12:54:09 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
chunhtai
2ebc7bee9c
Adds tooltip to semantics node (#87684) 2022-04-21 12:14:09 -07:00
Taha Tesser
a24246029a
Make Tooltip state class public (#100553) 2022-03-22 12:10:22 -07:00
xubaolin
839bd6317f
Do not crash if dispatch the mouse events before the tooltip overlay detached (#97268) 2022-02-25 03:21:19 -08:00
Michael Goderbauer
5684b9f69e
Enable no_leading_underscores_for_local_identifiers (#96422) 2022-01-21 14:43:59 -08:00
Rami
1aabe314a9
[Material 3] Update TextTheme to have M3 names for styles (#93725) 2021-12-06 08:04:04 -08:00
Kenzie (Schmoll) Davisson
15967669b2
Add richMessage parameter to the Tooltip widget. (#88539) 2021-09-29 15:31:54 -07:00
Greg Spencer
bac1af32ee
Reland: "Fix tooltip so only one shows at a time when hovering (#90457)" (#90917)
This reverts commit ab51a02 and fixes the test that broke the first time it landed.
2021-09-29 08:56:52 -07:00
Greg Spencer
ab51a0260d
Revert "Fix tooltip so only one shows at a time when hovering (#90457)" (#90909)
This reverts commit 885b2f56e180faac645c7ec9b60b3809131dc628 to green up the build.

Submitting on red to fix the build.
2021-09-28 15:18:53 -07:00
Greg Spencer
885b2f56e1
Fix tooltip so only one shows at a time when hovering (#90457)
In the process of fixing #90044, I realized that it's also possible for hovered tooltips to show more than one at a time if the widgets are nested, so this PR is a fix that prevents more than one tooltip from showing at a time with hovered tooltips.
2021-09-28 14:20:01 -07:00
BambinoUA
7736b9eef0
Don't display empty tooltips (Tooltips with empty message property) (#87638) 2021-09-10 10:12:03 -07:00
Matan Shukry
93de096e64
Add TooltipTriggerMode and provideTriggerFeedback to allow users to c… (#84434) 2021-07-27 13:39:04 -07:00
Greg Spencer
1ac209c222
Turn on avoid_dynamic_calls lint, make appropriate changes. (#84478) 2021-06-23 16:36:03 -07:00