Skip to content

Conversation

LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Apr 1, 2021

Fixes #79494. Running TGP to see how breaking this is. result(internal link).

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 feature I am adding, or Hixie said the 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 a: tests "flutter test", flutter_test, or one of our tests f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 1, 2021
@google-cla google-cla bot added the cla: yes label Apr 1, 2021
@LongCatIsLooong
Copy link
Contributor Author

Dependent on #79489

@skia-gold
Copy link

Gold has detected about 3 untriaged digest(s) on patchset 3.
View them at https://flutter-gold.skia.org/cl/github/79506

@LongCatIsLooong LongCatIsLooong changed the title enterText to have trailing caret enterText to move the caret to the end Apr 1, 2021
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review April 1, 2021 07:55
@@ -848,18 +848,24 @@ void main() {
);

testWidgets('cursor layout has correct width', (WidgetTester tester) async {
final TextEditingController controller = TextEditingController.fromValue(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These golden tests were drawing the caret for position -1.

@Hixie
Copy link
Contributor

Hixie commented Apr 1, 2021

If you can land this without breaking the world then I am supportive, LGTM. Amusingly it'll conflict with two separate PRs I'm writing right now but luckily it won't do so in a complicated way and those two PRs are already conflicting with each other so whatever. ;-)

Copy link
Contributor

@Hixie Hixie left a comment

Choose a reason for hiding this comment

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

If this requires google3 changes then we should do a migration guide.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I feel like I have run into this before, good call.

/// Give the text input widget specified by [finder] the focus and
/// enter [text] as if it been provided by the onscreen keyboard.
/// Give the text input widget specified by [finder] the focus, replace its
/// content with [text], as if it been provided by the onscreen keyboard.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

- focus, replace its content with [text], as if it been
+ focus and replace its content with [text], as if it had been

@fluttergithubbot fluttergithubbot merged commit 67d8556 into flutter:master Apr 2, 2021
@LongCatIsLooong LongCatIsLooong deleted the enter-text-to-have-trailing-caret branch April 2, 2021 03:36
LongCatIsLooong added a commit that referenced this pull request Apr 2, 2021
LongCatIsLooong added a commit that referenced this pull request Apr 2, 2021
LongCatIsLooong added a commit to LongCatIsLooong/flutter that referenced this pull request Apr 2, 2021
@Hixie Hixie mentioned this pull request Apr 2, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests 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.

TestTextInput.enterText should put the caret at the end of the text
5 participants