Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Dec 4, 2024

Also closes #159515

Looking at the google testing failures cl/703169955

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. f: material design flutter/packages/flutter/material repository. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. labels Dec 4, 2024
@github-actions github-actions bot added the a: tests "flutter test", flutter_test, or one of our tests label Dec 4, 2024
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review December 5, 2024 00:27
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

///
/// The callback, if not `null`, should typically set the scroll offset of
/// the associated scrollable container to the given `targetOffset` without
/// animation as it is already animated by the caller: the iOS focus engine
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't the animation controlled by flutter? how does the caller (I assume iOS) animate the scrollable?

Copy link
Contributor Author

@LongCatIsLooong LongCatIsLooong Dec 9, 2024

Choose a reason for hiding this comment

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

UIKit would create a display link that calls setContentOffset every frame with different scroll offsets. So the animation / curve is determined by UIKIt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(should I rephrase somehow to make this clear?)

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, some rephrasing can help

Do we translate all the setContentOffset to scrollToOffset call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Made some minor adjustments to the last sentence.

Comment on lines +615 to +616
_physics = _configuration.getScrollPhysics(context);
_physics = physicsFromWidget?.applyTo(_physics) ?? _physics;
Copy link
Contributor

@chunhtai chunhtai Dec 9, 2024

Choose a reason for hiding this comment

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

nvm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm if I apply the suggested change, is _physics going to be up to date for the expression before ??

Copy link
Contributor

@chunhtai chunhtai Dec 9, 2024

Choose a reason for hiding this comment

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

oh I didn't realize the applyTo uses _physics, in that case no, the suggestion is wrong, the original code is fine


void _onScrollToOffset(Offset targetOffset) {
final double offset = switch (axis) {
Axis.horizontal => targetOffset.dx,
Copy link
Contributor

Choose a reason for hiding this comment

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

will there be cases where dx and dy both none zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not currently. In the iOS implementation, every semantics node is only scrollable in one axis I think, so iOS won't issue commands that would scroll both axes. If it does then I think we can't do anything other than just ignoring the unscrollable axis?

Copy link
Contributor

Choose a reason for hiding this comment

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

oh ok, just want to double check there isn't any surprise.

@LongCatIsLooong LongCatIsLooong added this pull request to the merge queue Dec 9, 2024
Merged via the queue into flutter:master with commit 9ff7238 Dec 9, 2024
79 checks passed
@LongCatIsLooong LongCatIsLooong deleted the full-keyboard-access-scroll branch December 9, 2024 21:49
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
@reidbaker reidbaker mentioned this pull request Dec 13, 2024
11 tasks
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up SemanticsAction.scrollToOffset TODOs

2 participants