214 Commits

Author SHA1 Message Date
Kostia Sokolovskyi
c0b21b16ef
SemanticsHandle should dispatch creation and disposal events. (#137960) 2023-11-06 14:14:42 -08:00
Dan Field
d843863c4a
reset state of CustomSemanticsAction before running tests (#137697)
Fixes https://github.com/flutter/flutter/issues/137696

This will get the tree green again.

The problem is that `CustomSemanticsAction` has static state in it, and todays test seed order makes things unhappy.
2023-11-01 20:09:41 +00:00
LongCatIsLooong
7a3135b9c1
Make SemanticsNode.isMergedIntoParent Readonly (#137304)
Fixes https://github.com/flutter/flutter/issues/54665
2023-10-27 17:22:13 +00:00
cui fliter
c5e71b3e59
fix some typos (#137144)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

fix some typos

*List which issues are fixed by this PR. You must list at least one issue.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-10-24 15:27:07 +00:00
Greg Spencer
8cda3bea23
Remove 'must not be null' comments from various libraries. (#134984)
## Description

This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.

This PR removes them from the animation, cupertino, foundation, gestures, semantics, and services libraries.  Each of them only had a few, so I lumped them together.

This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.

In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.

This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).

## Related PRs
- https://github.com/flutter/flutter/pull/134991
- https://github.com/flutter/flutter/pull/134992
- https://github.com/flutter/flutter/pull/134993
- https://github.com/flutter/flutter/pull/134994

## Tests
 - Documentation only change.
2023-09-20 15:44:49 +00:00
chrisdlangham
15b00bf6a7
removed unused variable in the example code of semantic event (#134551)
removes unused variable in the example code of semantic events

https://api.flutter.dev/flutter/semantics/FocusSemanticEvent-class.html
2023-09-13 02:52:25 +00:00
Qun Cheng
71d96ddf9c
Add Expanded/Collapsed State for Semantics (#131233) 2023-07-31 12:09:27 -07:00
Greg Price
1937ae6539
Make AbstractNode-derived docs more specific on RenderObject et al. (#130689)
These methods and/or their docs were recently copied (in #128467 and #128973) from their classes' former shared base class AbstractNode. Their wording was fittingly abstract there, but that abstraction is a bit puzzling for a reader finding them on these more concrete classes and not aware of the AbstractNode history.  So make them more concrete, in similar terms to the other methods around them.

Also copy some useful points between corresponding methods on different classes (like that the parent of the root is null), and try to clean up the prose on [RenderObject.depth].

We focus on the more outward-facing parts of the API, letting methods like `redepthChildren` continue to talk generically about "nodes".
2023-07-17 18:20:27 +00:00
Michael Goderbauer
5654bfe89a
Remove duplicated dart:ui imports (#130606)
Small clean up. A file probably doesn't need multiple way to refer to dart:ui concepts.
2023-07-14 22:47:12 +00:00
Michael Goderbauer
16e6be8b39
Inline AbstractNode into SemanticsNode and Layer (#128467) 2023-06-14 09:36:41 -07:00
chunhtai
cc6f86e6e1
Clarifies semantics long press and semantics on tap documentation (#128599)
fixes https://github.com/flutter/flutter/issues/35112
2023-06-09 19:49:02 +00:00
Michael Goderbauer
17f86df8bd
Migrate SemanticsBinding to onSemanticsActionEvent (#128254)
Follow-up to https://github.com/flutter/engine/pull/42493.
2023-06-05 18:16:06 +00:00
hangyu
a829b579d6
Add a FocusSemanticEvent (#126171)
issue: #94523
engine pr: https://github.com/flutter/engine/pull/41777
2023-05-31 20:15:52 +00:00
Bernardo Ferrari
2e4d976bde
SemanticsFlag/SemanticsAction cleanup (part 4) (#123329)
`SemanticsFlag`/`SemanticsAction` cleanup (part 4)
2023-04-12 19:07:08 +00:00
chunhtai
9884b5f55e
Fixes IgnorePointer and AbsorbPointer to only block user interactions… (#120619)
Fixes IgnorePointer and AbsorbPointer to only block user interactions…
2023-04-07 15:51:05 +00:00
Bernardo Ferrari
f5415a42d3
SemanticsFlag/SemanticsAction enum migration (part 2) (#123817)
`SemanticsFlag`/`SemanticsAction` enum migration (part 2)
2023-03-31 16:19:22 +00:00
Michael Goderbauer
31798757e7
replace some ._() constructors with class modifiers (#122765) 2023-03-23 12:29:18 -07:00
Jacob MacDonald
b212e7b32b
implement Iterator and Comparable instead of extending them (#123282)
implement Iterator and Comparable instead of extending them
2023-03-23 17:10:31 +00:00
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
chunhtai
978d9b5514
Issues/111931 reland (#121576)
* Revert "Revert "Fix text.rich to merge widget span (#113461)" (#121562)"

This reverts commit c8d80163b03f76e0cfde15567d065b6d1903cf8d.

* Fixes tag to not pollute cached semantics configuration in rendering object
2023-03-01 08:33:03 -08:00
Michael Goderbauer
6de42a70f1
Fix how tests count open SemanticsHandles (#121571)
Fix how tests count open SemanticsHandles
2023-02-28 23:55:58 +00:00
Michael Goderbauer
df66fecdcf
showOnScreen does not crash if target node doesn't exist anymore (#121575)
showOnScreen does not crash if target node doesn't exist anymore
2023-02-28 03:06:28 +00:00
chunhtai
c8d80163b0
Revert "Fix text.rich to merge widget span (#113461)" (#121562)
This reverts commit 660992a161ba04de706cd3931c32d3123e6e1228.
2023-02-27 15:38:43 -08:00
Michael Goderbauer
b1b7284a72
Move semantic-related bindings to SemanticsBinding (#121289)
Move semantic-related bindings to SemanticsBinding
2023-02-24 19:30:57 +00:00
chunhtai
660992a161
Fix text.rich to merge widget span (#113461)
* Fix text.rich to merge widget span

* migrate to new API

* update

* addressing comment

* addressing comments

* update

* addressing comment

* Update
2023-02-23 17:38:52 +00:00
Michael Goderbauer
7272c809ea
Remove unnecessary null checks in flutter/{animation,semantics,scheduler} (#118922)
* Remove unnecessary null checks in flutter/animation

* Remove unnecessary null checks in flutter/semantics

* Remove unnecessary null checks in flutter/scheduler
2023-01-21 02:20:24 +00:00
chunhtai
23a2fa31d2
Reland "Adds API in semanticsconfiguration to decide how to merge chi… (#116895)
* Reland "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)"

This reverts commit 7549925c8c44dea92c7bc75be676c17b7613f87f.

* makes markNeedsSemanticsUpdate more robust

* address comment
2022-12-16 17:20:20 +00:00
Ian Hickson
9fdb64b7e7
Taboo the word "simply" from our API documentation. (#116061) 2022-12-11 22:43:22 +00:00
Casey Hillers
7549925c8c
Revert "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)" (#116839)
This reverts commit 352ad3a9efccc8c54deb72eb0d7164bfb42b2a49.
2022-12-11 02:23:40 +00:00
chunhtai
352ad3a9ef
Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)
* Adds semantics merger API and fix input decorator

* addressing comments

* abstractnode to object

* feature complete

* addressing comments

* fix comments

* conditionally add sort order

* fix bool

* fix test

* more fix

* fix tests
2022-12-07 16:59:16 +00:00
Ahmed Ashour
59f389db78
Remove unneeded comparison to double.nan (#115470)
Fixes #115468
2022-11-17 03:53:05 +00:00
Alex Wallen
23d258df57
Remove deprecated updateSemantics API usage. (#113382) 2022-10-26 20:20:41 +00:00
Jonah Williams
4be0cfcb3f
[framework] add ignores for platformDispatcher deprecation (#113238) 2022-10-10 22:38:06 +00:00
yaakovschectman
4d3c122434
Use tristate checkbox engine changes (#111032)
* Introduce tests for tristate checkboxes

* Initial

* Use tristate changes in engine

* Flutter_test matchers test update

* Comments, tests

* Update packages/flutter/lib/src/semantics/semantics.dart

Co-authored-by: Chris Bracken <chris@bracken.jp>

* Assert mutual exclusivity

* Assert valid state before updating state

* Update packages/flutter/lib/src/semantics/semantics.dart

Typo fix in comment

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>

Co-authored-by: Chris Bracken <chris@bracken.jp>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2022-09-08 17:41:54 -04:00
pdblasi-google
e499530152
Create containsSemantics to allow for partial matching of semantics in tests. (#108573) 2022-08-01 22:08:06 +00:00
nbayati
b5a36f03c6
Modify dataMap to include assertiveness only if it's not set to polite (#108396)
* Modify dataMap to include assertiveness only if it's not set to polite to prevent google3 tests from breaking

* small code style enhancement
2022-07-26 17:12:45 -07:00
Casey Hillers
178e444730
Revert "Add optional flag to determine assertiveness level in aria announcement for flutter web" (#108262) 2022-07-25 17:01:05 +00:00
nbayati
74ea7132be
Add optional flag to determine assertiveness level in aria announcement for flutter web (#107568) 2022-07-23 00:49:04 +00:00
Alexandre Ardhuin
ccd33631e3
enable combinators_ordering (#107847) 2022-07-18 22:04:07 +00:00
Alexandre Ardhuin
526ca0d498
Export public API types from foundation/scheduler/gestures/semantics (#106409) 2022-06-24 21:21:05 +00:00
J-P Nurmi
512e090dfd
Fix confusing typo: extent vs. extend selection (#106002) 2022-06-15 16:58:05 -07:00
Alexandre Ardhuin
56c4e3cdd8
add some exports of public API in foundation/serialization.dart (#104231) 2022-06-08 13:33:12 -07:00
Pierre-Louis
a0248ebdf2
Use curly_braces_in_flow_control_structures for services, scheduler, semantics (#104616) 2022-05-25 19:58:22 +02:00
Michael Goderbauer
8bec125aaf
Avoid analyzing API example code twice, clean-up (#103548) 2022-05-11 21:27:45 -07:00
chunhtai
2ebc7bee9c
Adds tooltip to semantics node (#87684) 2022-04-21 12:14:09 -07:00
Michael Goderbauer
51bcdb9407
super parameters for framework (#100905) 2022-04-13 22:38:40 -07:00
Jonathan Joelson
f2646b1589
Update semantics live region documentation (#99987) 2022-03-14 11:45:16 -07:00
Michael Goderbauer
852bfe2a73
Use BindingBase.platformDispatcher over BindingBase.window where possible (#99443) 2022-03-04 11:11:07 -08:00
Viren Khatri
078deb9230
Migrates packages/flutter to from hashValues to Object.hash (#96109)
* migrates lib/foundation and lib/widgets

* migrates lib/painting and lib/material

* migrates lib/cupertino, lib/gestures, lib/services, lib/semantics and lib/rendering

* fixes failing tests

* migrates test/

* improves hashing of lists
2022-03-01 23:54:11 +05:30
Tomasz Gucio
e4351ff053
Enable use_if_null_to_convert_nulls_to_bools lint (#98753) 2022-02-22 14:39:20 -08:00