Skip to content

Conversation

@ValentinVignal
Copy link
Contributor

Contributes to #130459

It adds a test for

  • examples/api/lib/material/text_form_field/text_form_field.1.dart

Pre-launch Checklist

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

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels Jun 19, 2024
Comment on lines +20 to +24
List<bool> getFocuses() {
return editableText.evaluate()
.map((Element finderResult) => (finderResult.widget as EditableText).focusNode.hasFocus)
.toList();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a better way to get the focuses?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing simpler in mind, I think this utility function is readable as-is 👍

@justinmc justinmc requested review from TahaTesser and bleroux June 20, 2024 21:45
Copy link
Contributor

@bleroux bleroux left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +20 to +24
List<bool> getFocuses() {
return editableText.evaluate()
.map((Element finderResult) => (finderResult.widget as EditableText).focusNode.hasFocus)
.toList();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing simpler in mind, I think this utility function is readable as-is 👍


expect(getFocuses(), const <bool>[true, false, false, false, false]);
});

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider removing this extra line

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 24, 2024
@auto-submit auto-submit bot merged commit 27b9616 into flutter:master Jun 24, 2024
@cbracken cbracken added the revert Autorevert PR (with "Reason for revert:" comment) label Jun 24, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 24, 2024

A reason for requesting a revert of flutter/flutter/150481 could
not be found or the reason was not properly formatted. Begin a comment with 'Reason for revert:' to tell the bot why
this issue is being reverted.

@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Jun 24, 2024
@cbracken
Copy link
Member

Reason for revert: Surprisingly, the following test seems to be consistently failing on Windows after the addition of this test:

flutter/packages/flutter/test/widgets/sliver_tree_test.dart: .toggleNodeWith, onNodeToggle

@cbracken cbracken added the revert Autorevert PR (with "Reason for revert:" comment) label Jun 24, 2024
auto-submit bot pushed a commit that referenced this pull request Jun 24, 2024
@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Jun 24, 2024
auto-submit bot added a commit that referenced this pull request Jun 24, 2024
Reverts: #150481
Initiated by: cbracken
Reason for reverting: Surprisingly, the following test seems to be consistently failing on Windows after the addition of this test:
```
flutter/packages/flutter/test/widgets/sliver_tree_test.dart: .toggleNodeWith, onNodeToggle
```
Original PR Author: ValentinVignal

Reviewed By: {TahaTesser, bleroux}

This change reverts the following previous change:
Contributes to #130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
@cbracken
Copy link
Member

Reverted this since the above-mentioned test was failing consistently starting at this patch. The main possibility I was envisioning was some sort of non-hermetic crossover between the tests, but even after the revert, the above-mentioned test is consistently failing. It seems there's some other non-hermetic component of our tests.

@ValentinVignal apologies for the noise here. Please re-send out this patch and we'll get it re-landed.

@ValentinVignal
Copy link
Contributor Author

Sure @cbracken , no problem, I re-created the PR here: #150750

auto-submit bot pushed a commit that referenced this pull request Jun 25, 2024
)

This reverts commit 70e9b41.

Relands #150481

Contributes to #130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 25, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 25, 2024
Roll Flutter from 6c06abb to e726eb4 (51 revisions)

flutter/flutter@6c06abb...e726eb4

2024-06-25 [email protected] Roll Packages from 711b4ac to 03f5f6d (21 revisions) (flutter/flutter#150779)
2024-06-25 [email protected] Roll Flutter Engine from afa7ce19bca8 to fbd92055f3a6 (1 revision) (flutter/flutter#150777)
2024-06-25 [email protected] Reland Add tests for form_text_field.1.dart (#150481) (#150696) (flutter/flutter#150750)
2024-06-25 [email protected] Add an example for CupertinoPopupSurface (flutter/flutter#150357)
2024-06-25 [email protected] [flutter_tools/dap] Handle app.stop errors when launching/attaching (flutter/flutter#149734)
2024-06-25 [email protected] Roll Flutter Engine from be7db94196fe to afa7ce19bca8 (18 revisions) (flutter/flutter#150762)
2024-06-25 [email protected] Remove dubious comment (flutter/flutter#150608)
2024-06-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Manual engine roll to 6884e83 (#150733)" (flutter/flutter#150746)
2024-06-25 [email protected] Manual engine roll to 6884e83 (flutter/flutter#150733)
2024-06-24 [email protected] Linkify 'see also' sections (flutter/flutter#150734)
2024-06-24 [email protected] Roll pub packages (flutter/flutter#150712)
2024-06-24 [email protected] Update flutter.dev links from framework to more permanent destinations (flutter/flutter#150531)
2024-06-24 [email protected] Manual engine roll to be7db94196fe (flutter/flutter#150714)
2024-06-24 [email protected] allow adb to set canfail then use canFail=true for clearing logs (flutter/flutter#150517)
2024-06-24 [email protected] Update android_device.dart to have clearLogs not print to standard error (flutter/flutter#150197)
2024-06-24 [email protected] Update issue link in analysis_options.yaml (flutter/flutter#150395)
2024-06-24 [email protected] Fix a number of broken doc comment references (flutter/flutter#150540)
2024-06-24 [email protected] Fix flaky sliver tree test (flutter/flutter#150707)
2024-06-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add tests for form_text_field.1.dart (#150481)" (flutter/flutter#150696)
2024-06-24 [email protected] Add tests for form_text_field.1.dart (flutter/flutter#150481)
2024-06-22 [email protected] Fix: Memory leak in UndoHistory widget because it never de-registered itself as global UndoManager client (Resolves #148291) (flutter/flutter#150661)
2024-06-22 [email protected] [CupertinoActionSheet] Fix the layout (part 1) (flutter/flutter#149636)
2024-06-21 [email protected] Remove discontinued `device_info` and `connectivity` plugins from `flutter_gallery`, roll pub packages (flutter/flutter#150585)
2024-06-21 [email protected] [a11y] Update semantics in bottom_navigation_bar.dart (flutter/flutter#150576)
2024-06-21 [email protected] Roll Flutter Engine from dda82d905f37 to 33415c6ee7c2 (7 revisions) (flutter/flutter#150637)
2024-06-21 [email protected] Reland 4: [CupertinoActionSheet] Match colors to native (flutter/flutter#150442)
2024-06-21 [email protected] Enable SelectionArea double tap/triple tap gesture support for mobile platforms (flutter/flutter#149295)
2024-06-21 [email protected] made SelectionArea alignment consistent between web and other platform (flutter/flutter#150037)
2024-06-21 [email protected] Fix link hook typo (flutter/flutter#150194)
2024-06-21 [email protected] Stop looking for .packages when analyzing (flutter/flutter#150349)
2024-06-20 [email protected] Update flutter.dev links from misc packages to more permanent destinations (flutter/flutter#150532)
2024-06-20 [email protected] Roll Flutter Engine from dd37cefd4a94 to dda82d905f37 (9 revisions) (flutter/flutter#150582)
2024-06-20 [email protected] Update Material token to the latest 4.1.0 (flutter/flutter#150382)
2024-06-20 [email protected] Let the lockfile script generate lockfiles for kotlin gradle files as well (flutter/flutter#150471)
2024-06-20 [email protected] Make popup menu hardcoded padding configurable (flutter/flutter#150506)
2024-06-20 [email protected] [flutter_tools] un-hide the --dds flag (flutter/flutter#150280)
2024-06-20 [email protected] [material/menu_anchor.dart] Remove _MenuAnchorState from parent when disposed. (flutter/flutter#149586)
2024-06-20 [email protected] Add test for inherited_notifier.0.dart (flutter/flutter#150344)
2024-06-20 [email protected] [CLI tool] in `flutter test`, consider `--flavor` when validating the cached asset bundle (flutter/flutter#150461)
2024-06-20 [email protected] Test InputDecoration API examples (flutter/flutter#148560)
2024-06-20 [email protected] Clean leaky tests. (flutter/flutter#150335)
2024-06-20 [email protected] Roll Flutter Engine from f9c497f178d3 to dd37cefd4a94 (2 revisions) (flutter/flutter#150537)
2024-06-20 [email protected] Roll Flutter Engine from a31279381b40 to f9c497f178d3 (9 revisions) (flutter/flutter#150528)
2024-06-19 [email protected] Add tests for about_list_tile.0.dart (flutter/flutter#150181)
2024-06-19 [email protected] Roll Flutter Engine from 0ad18fe4c0b5 to a31279381b40 (7 revisions) (flutter/flutter#150473)
2024-06-18 [email protected] Revert "[a11y] Add semantics: button to bottom navigation bar items and dropdown menu items" (flutter/flutter#150445)
...
hello-coder-xu added a commit to hello-coder-xu/flutter that referenced this pull request Jun 26, 2024
* master: (23 commits)
  Roll pub packages (flutter#150810)
  Remove reference to `MaterialApp` and `showCupertinoModalPopup` from `CupertinoAlertDialog` (flutter#150725)
  Read `AndroidManifest.xml` and emit `manifest-impeller-(enabled|disabled)` analytics (flutter#150791)
  [flutter_tools] Shut down Chromium cleanly using a command sent through the debug protocol (flutter#150645)
  Reland fix inputDecorator hint color on M3 (flutter#150278)
  Roll Flutter Engine from 62e0b5f9c340 to 94023d711db3 (7 revisions) (flutter#150797)
  Fix collapsed InputDecorator minimum height (flutter#150770)
  Add more warm up frame docs (flutter#150464)
  Roll pub packages (flutter#150739)
  Add `focusNode`, `focusColor`, `onFocusChange`, `autofocus` to `CupertinoButton` (flutter#150721)
  Document RenderObject._relayoutBoundary and its invariant; small refactors (flutter#150527)
  Roll Flutter Engine from 6313b1e5afd7 to 62e0b5f9c340 (1 revision) (flutter#150790)
  fix a typo (flutter#150682)
  Fix link in RenderObjectWidget doc comment (flutter#150600)
  Roll Flutter Engine from fbd92055f3a6 to 6313b1e5afd7 (1 revision) (flutter#150781)
  [tool] make `ErrorHandlingFileSystem.deleteIfExists` catch error code 3 (`ERROR_PATH_NOT_FOUND` on Windows) (flutter#150741)
  Roll Packages from 711b4ac to 03f5f6d (21 revisions) (flutter#150779)
  Roll Flutter Engine from afa7ce19bca8 to fbd92055f3a6 (1 revision) (flutter#150777)
  Reland Add tests for form_text_field.1.dart (flutter#150481) (flutter#150696) (flutter#150750)
  Add an example for CupertinoPopupSurface (flutter#150357)
  ...
@cbracken
Copy link
Member

Thank @ValentinVignal and apologies again for the churn!

sigurdm pushed a commit to sigurdm/flutter that referenced this pull request Jun 26, 2024
Contributes to flutter#130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
sigurdm pushed a commit to sigurdm/flutter that referenced this pull request Jun 26, 2024
…ter#150696)

Reverts: flutter#150481
Initiated by: cbracken
Reason for reverting: Surprisingly, the following test seems to be consistently failing on Windows after the addition of this test:
```
flutter/packages/flutter/test/widgets/sliver_tree_test.dart: .toggleNodeWith, onNodeToggle
```
Original PR Author: ValentinVignal

Reviewed By: {TahaTesser, bleroux}

This change reverts the following previous change:
Contributes to flutter#130459

It adds a test for
- `examples/api/lib/material/text_form_field/text_form_field.1.dart`
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

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants