Skip to content

Conversation

@tgucio
Copy link
Contributor

@tgucio tgucio commented Jun 20, 2023

Breaking change note for flutter/flutter#109114

Presubmit checklist

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

A few tweaks and a question.

Comment on lines 16 to 17
To date, `EditableText` has used multiple mechanisms ensuring the selection
extent or caret is scrolled into view on updates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what you mean by "on updates".

Suggested change
To date, `EditableText` has used multiple mechanisms ensuring the selection
extent or caret is scrolled into view on updates.
Previously, `EditableText` used multiple mechanisms to determine the
extent of the selection, or to ensure that the caret is scrolled into view.

Copy link
Contributor Author

@tgucio tgucio Jun 21, 2023

Choose a reason for hiding this comment

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

Thanks for the edits. Yes, this is a bit convoluted: what I meant were the mechanisms used on scrolling into view (which happens on user updates) to determine either of:

  • selection extent (non-collapsed selection)
  • caret position (collapsed selection).

Let me reword as:

Previously, upon scrolling into view to show user updates, EditableText used multiple mechanisms to determine the extent of the selection or the caret location.

Comment on lines 21 to 25
By removing the `Editable.onCaretChanged` callback, `EditableText` will always
use the most up to selection extent location when scrolling to show it.
Specifically this results in improved scroll into view behavior after
changing selection from collapsed to non-collapsed via
`userUpdateTextEditingValue()`.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "use the most up to selection extent location" mean?
I've made some tweaks, but would do more once I understand this phrase.

Suggested change
By removing the `Editable.onCaretChanged` callback, `EditableText` will always
use the most up to selection extent location when scrolling to show it.
Specifically this results in improved scroll into view behavior after
changing selection from collapsed to non-collapsed via
`userUpdateTextEditingValue()`.
By removing the `Editable.onCaretChanged` callback, `EditableText` will always
use the most up to selection extent location when scrolling to show it.
Specifically, this improves scroll into view behavior after
changing selection from collapsed to non-collapsed using
`userUpdateTextEditingValue()`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underlying issue had to do with using multiple sources of truth where one wasn't necessarily up to date (could be one frame behind).

What is clearly missing is "date" as in "up to date" :). Correcting this.

## Timeline

Landed in version: 3.12.0-4.0.pre<br>
In stable release: 3.13.0
Copy link
Contributor

Choose a reason for hiding this comment

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

The 3.13 release? It's probably best to just say "TBD" for now.

@tgucio tgucio requested a review from sfshaza2 June 21, 2023 22:19
@atsansone atsansone self-requested a review June 23, 2023 06:12
@atsansone atsansone added the review.copy Awaiting Copy Review label Jun 23, 2023
@tgucio
Copy link
Contributor Author

tgucio commented Jun 27, 2023

@sfshaza2 wondering if you could take another look so we can merge framework's PR 109114? Thanks!

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

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

lgtm. Thanks, @tgucio!

@sfshaza2 sfshaza2 merged commit b493e67 into flutter:main Jun 27, 2023
@sfshaza2 sfshaza2 removed the review.copy Awaiting Copy Review label Jun 27, 2023
@tgucio tgucio deleted the scroll-into-view branch June 27, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants