-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add EditableText scroll into view breaking change note #8916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
93900ef
6845d89
0f9c466
7b0efb1
7159780
8c79c6a
653d669
e841f7e
ea563ef
f678c76
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| title: Updated EditableText scroll into view behavior | ||||||||||||||||||||||
| description: > | ||||||||||||||||||||||
| Improve EditableText selection scroll into view behavior to always | ||||||||||||||||||||||
| use the current selection extent. | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Summary | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| `Editable.onCaretChanged` callback is removed and with this change, | ||||||||||||||||||||||
| `EditableText` behavior with regard to scrolling the selection into view | ||||||||||||||||||||||
| changes. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Context | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| To date, `EditableText` has used multiple mechanisms ensuring the selection | ||||||||||||||||||||||
| extent or caret is scrolled into view on updates. | ||||||||||||||||||||||
|
||||||||||||||||||||||
| 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. |
There was a problem hiding this comment.
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,
EditableTextused multiple mechanisms to determine the extent of the selection or the caret location.
There was a problem hiding this comment.
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.
| 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()`. |
There was a problem hiding this comment.
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.
Outdated
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.