Skip to content
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

Overrides accessibilityScrollToVisible #42047

Merged
merged 4 commits into from May 19, 2023
Merged

Conversation

chunhtai
Copy link
Contributor

@chunhtai chunhtai commented May 15, 2023

fixes flutter/flutter#61624

Observed behavior is that this method is called when an item is swipe-to-focusd in VoiceOver.

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@chinmaygarde
Copy link
Member

I don't think we can rely on private APIs for fixes. That may cause us to run into trouble with App Store policies. Is there no other way to do this?

cc @stuartmorgan (who I'm told I should forward to in @jmagman s absence).

@chunhtai
Copy link
Contributor Author

chunhtai commented May 15, 2023

I am attempting to test with apple store submission to see if we will run into any trouble or not.

@stuartmorgan
Copy link
Contributor

I don't think we can rely on private APIs for fixes.

That's true, but the description in the PR and the method comments is incorrect; methods that we are defining on our own objects, without any special prefixing, by definition cannot be private API. I don't see any private API usage in this PR.

@stuartmorgan
Copy link
Contributor

I am attempting to test with apple store submission to see if we will run into any trouble or not.

This is largely irrelevant for a framework, because "currently passes submission" is not at all the same thing is "follows app store policy" and "will continue to work, rather than suddenly preventing every single person who uses Flutter from submitting their app".

If this were calling private API and didn't happen to be picked up by the current app store checks, I would still veto landing it for that reason. But this isn't using any private API AFAICT, so the only issue I see here is the incorrect description in the code.

@stuartmorgan
Copy link
Contributor

methods that we are defining on our own objects, without any special prefixing, by definition cannot be private API. I don't see any private API usage in this PR.

These two methods are likely defined in UIKit source code but are not exposed through UIKit's public header.

I understand what the code is doing. I'm saying that there is a very important distinction between how you are describing this code and what is actually happening. This PR is just defining API on our own objects, with perfectly reasonable names.

It happens that if we define such API, UIKit will apparently call it, which is convenient for us. But that's UIKit's doing, not ours.

There are more obscure way to overriding this API to possibly avoid detection

We would not want to attempt to hide use of private APIs; we just wouldn't use them.

but the fact still stand that we are using private APIs

That's definitely not a fact. We're benefiting from UIKit calling an API on our own object, which does not involve us using any APIs. We should change the description accordingly, to say something like "Observed behavior is that this method is called when an item is swipe-to-focusd in VoiceOver."

@chunhtai
Copy link
Contributor Author

I see the distinction now, and I agree with your point. I will update this pr

@chunhtai chunhtai marked this pull request as ready for review May 16, 2023 17:12
Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label May 19, 2023
@auto-submit auto-submit bot merged commit aac0919 into flutter:main May 19, 2023
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 20, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 20, 2023
…127241)

flutter/engine@482c99a...aac0919

2023-05-19 47866232+chunhtai@users.noreply.github.com Overrides accessibilityScrollToVisible (flutter/engine#42047)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
…lutter#127241)

flutter/engine@482c99a...aac0919

2023-05-19 47866232+chunhtai@users.noreply.github.com Overrides accessibilityScrollToVisible (flutter/engine#42047)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
4 participants