289 Commits

Author SHA1 Message Date
Mehmet Fidanboylu
0786f29ff2
Revert "Bring back paste button hide behavior (#56689)" (#56806)
This reverts commit d56349822d1087acc7d3f2f4cb0c037abdeb93d9.
2020-05-09 20:22:17 -07:00
Justin McCandless
d56349822d
Bring back paste button hide behavior (#56689)
Unreverts #54902 with fixes for a failing integration test.
2020-05-08 13:41:22 -07:00
Justin McCandless
cd67da260e
Revert "Paste shows only when content on clipboard (#54902)" (#56614)
This reverts commit 053c38818f8ae89ea2fa441f4055c3bd939798ef.
2020-05-07 17:28:37 -07:00
Justin McCandless
053c38818f
Paste shows only when content on clipboard (#54902) 2020-05-07 15:22:03 -07:00
Justin McCandless
43ce3fd988
TextField enabled fix (#55775) 2020-04-28 10:49:02 -07:00
Kate Lovett
e74fedcb90
Fix InputDecorator intrinsic height reporting (#55408) 2020-04-22 16:38:02 -07:00
Kate Lovett
5d5175b0b3
Skip Audit - Material Library (#54322) 2020-04-21 19:13:02 -07:00
Justin McCandless
f646e26e90
iOS Text Selection Menu Overflow (#54140)
Adds the ability for the iOS text selection menu to handle items that are too wide for the screen.
2020-04-14 09:49:16 -07:00
Alexandre Ardhuin
7ceed97302
replace simple empty Container with w & h with SizedBox (#54394)
* replace simple Container(w & h) with SizedBox

* address review comments

* address review comments
2020-04-10 22:32:40 +02:00
Justin McCandless
a811bce4b0
TextField behavior when at maxLength (#52130)
TextFields now disallow adding characters in the center of the text at maxLength.
2020-03-18 08:02:22 -07:00
Justin McCandless
4841a7ed6f
Text Selection Overflow (Android) (#49391)
Adds an overflow menu to the text selection menu on Android when the items overflow.
2020-03-11 13:36:10 -07:00
Per Classon
88852731a5
Validate text selection before updating it inside of EditableText (#51410) 2020-03-06 01:26:01 -08:00
Flutter GitHub Bot
b0381df11f
Unlooping Golden File Tests (#51883) 2020-03-04 15:21:01 -08:00
Greg Spencer
1ba4f1f509
Add Linux and Windows target platforms (#51519)
This PR adds the linux and windows target platform enum values, along with automatically setting the defaultTargetPlatform to the appropriate value on those platforms.

Fixes #31366
2020-03-03 04:38:04 -08:00
Jason Simmons
ae027c194f
Use strut box heights to calculate selection rectangles in order to ensure that they remain within visible bounds (#50354) 2020-02-28 09:36:03 -08:00
Shi-Hao Hong
6d4121c075
Fix tests that rely on FadeTransition incorrectly and depend on implementation details of FadeUpwardsTransitionBuilder (#51150) 2020-02-22 16:54:02 -08:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Gary Qian
3e1a124e0e
Expose selectionHeightStyle and selectionWidthStyle on TextFields (#48917) 2020-02-05 17:38:03 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Hans Muller
bc5c46438a Migrate TextTheme to 2018 APIs (#48547) 2020-01-24 19:03:01 -08:00
shihchanghsiungsonos
379c3f4652 Fix the issue of TextSelection could misbehave inside a Nested Overlay (#49257) 2020-01-22 10:54:22 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Justin McCandless
c61e55ad6b Selection menu not showing when selection is 0,0 (#49000) 2020-01-17 10:58:01 -08:00
Greg Spencer
3dbe90e1fd
Add TargetPlatform.macOS tests to the material library (#48996)
This contains the test changes for adding TargetPlatform.macOS, which was done in #43457.

The main goal of this PR is to enable tests in the material library that are currently running only on iOS to also run on macOS, but only for the tests where that makes sense. For instance, we don't run any of the haptic feedback tests on macOS.
2020-01-17 10:51:11 -08:00
Josh Burton
6852605c4f Adds floatLabelBehavior to InputDecoration (#46115) 2020-01-15 18:53:01 -08:00
Lau Ching Jun
ef398d9e87 Disable most screenshot tests for web until we understand the flakes. (#47554) 2019-12-20 18:43:01 -08:00
Dan Field
4ad8271bf5 Reland text state (#47464) 2019-12-19 13:43:02 -08:00
Lau Ching Jun
d51956a9ea
Revert "Call setEditingState when text changes. (#47177)" (#47397)
This reverts commit d4b49ce9fc47885b1f634aad6b124a48917a81dc.
2019-12-18 18:03:24 -08:00
Alex Vincent
f546aa7def Fix buildCounter returns a widget when set to return null. (#45749)
When buildCounter returns null it no longer produces a widget that takes up space.
2019-12-18 10:45:28 -08:00
Dan Field
d4b49ce9fc
Call setEditingState when text changes. (#47177) 2019-12-17 14:03:04 -08:00
Alexandre Ardhuin
dfbd585668 implicit-casts:false in flutter/test (#46245) 2019-12-16 15:03:02 -08:00
Justin McCandless
c06bf6503a
iOS smart quote/dash configuration (#44923)
smartDashesType and smartQuotesType params for text fields to control iOS's smart punctuation feature.
2019-12-13 17:42:35 -05:00
Lau Ching Jun
535526b03c
Enable web for some of the golden tests (#46820)
* Make golden test timeout longer, some tests are flaky if the timeout is too short

* Enable some golden tests for web
2019-12-12 10:36:41 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Alexandre Ardhuin
fcb40a05bb
make some BuildContext methods generics (#44189)
* make BuildContext.{ancestorStateOfType,ancestorRenderObjectOfType,rootAncestorStateOfType} generic

* make BuildContext.inheritFromWidgetOfExactType generic

* make BuildContext.ancestorInheritedElementForWidgetOfExactType generic

* make BuildContext.ancestorWidgetOfExactType generic

* fix snippet

* bump scoped_model on temp version

* update names

* Revert "bump scoped_model on temp version"

This reverts commit d1fcbba028cdb07f44738d1652391692d1ea5ec0.

* address review comments

* fix ci

* address review comments

* repeat the deprecation notice

* fix uppercase

* use of recommanded deprecation syntax

* address review comment
2019-11-22 17:35:20 +01:00
Bartosz Wiśniewski
5c15b270b3 Remove duplicated expect from text field test (#45081) 2019-11-18 09:51:16 -08:00
Justin McCandless
924e48eeb9
Increase TextField's minimum height from 40 to 48 (#42449)
This is being done to match the Material spec. It will likely break many visual diff tests.
2019-11-01 12:36:15 -04:00
Albertus Angga Raharja
b31ca1aaca
Add more structure to errors (continuation of #34684) (#42640)
* Add structured errors in Animations, TabView, ChangeNotifier

* Add structured error on MaterialPageRoute, BoxBorder, DecorationImagePainter, TextSpan

* Add structured errors in Debug

* Fix test errors

* Add structured errors in Scaffold and Stepper

* Add structured errors in part of Rendering Layer

* Fix failing test due to FloatingPoint precision

* Fix failing tests due to precision error and not using final

* Fix failing test due to floating precision error with RegEx instead

* Add structured error in CustomLayout and increase test coverage

* Add structured error & its test in ListBody

* Add structured error in ProxyBox and increase test coverage

* Add structured error message in Viewport

* Fix styles and add more assertions on ErrorHint and DiagnosticProperty

* Add structured error in scheduler/binding and scheduler/ticker

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in AssetBundle and TextInput

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured errors in several widgets #1

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove unused import

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add assertions on hint messages

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix catch spacing

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in several widgets part 2 and increase code coverage

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in flutter_test/widget_tester

* Fix floating precision accuracy by using RegExp

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove todo to add tests in Scaffold showBottomSheet

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix reviews by indenting lines and fixing the assertion orders

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix failing tests due to renaming class

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Try skipping the NetworkBundleTest

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove leading space in material/debug error hint

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>
2019-10-28 11:00:49 -07:00
Justin McCandless
109f25588d
No multiline password fields (#42470)
Use assertions to prevent multiline password fields from being created
2019-10-28 10:59:26 -07:00
Kate Lovett
7bc02037e3
Re-land Local & Pre-Submit Support for Skia Gold (#43371) 2019-10-25 15:05:21 -07:00
Kate Lovett
3a3939a7fa
Revert "Skia Gold Support for Local & PreSubmit Testing in package:flutter (#40710)" (#43227)
This reverts commit 8df0d6556dd5ce5931fe79c8b177d7930d188c1f.
2019-10-21 17:31:54 -07:00
Kate Lovett
8df0d6556d
Skia Gold Support for Local & PreSubmit Testing in package:flutter (#40710) 2019-10-21 16:45:56 -07:00
Greg Spencer
a7aa66164e
Re-implement hardware keyboard text selection. (#42879)
This re-implements keyboard text selection so that it will work on platforms other than Android (e.g. macOS, Linux, etc.).

Also, fixed a number of bugs in editing selection via a hardware keyboard (unable to select backwards, incorrect conversion to ASCII when cutting to clipboard, lack of support for CTRL-SHIFT-ARROW word selection, etc.).

Did not address the keyboard locale issues that remain, or add platform specific switches for the bindings. All that will need some more design work before implementing them.

Related Issues
Fixes #31951
2019-10-17 15:11:44 -07:00
Greg Spencer
6b2cc85546
Disable arrow key focus navigation for text fields (#42533)
This disables the arrow key focus navigation for text fields. This was non-standard behavior for text fields, although it remains useful for other kinds of controls.

Fixes #42259
2019-10-14 18:50:05 -07:00
Rody Davis
b730a993c1 Fix CupertinoTextField and TextField ToolbarOptions not changing (#40665) 2019-10-04 11:22:57 -07:00
Alexandre Ardhuin
f0553ba58e
Missing trailing commas (#41473)
* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
2019-09-30 18:48:23 +02:00
Alexandre Ardhuin
b873162194
fix some bad indentations (#41172) 2019-09-24 21:03:37 +02:00
Greg Spencer
0e6cb28dbe
Add fake keyboard key generation to the testing framework (#40706)
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.

This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
2019-09-24 08:14:38 -07:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter (#41076) 2019-09-24 08:05:41 +02:00
Michael Goderbauer
4373a31971
Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767) 2019-09-18 14:55:37 -07:00