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

Re-examine platform-specific AutoFill API #16

Open
Firehed opened this issue May 24, 2024 · 0 comments
Open

Re-examine platform-specific AutoFill API #16

Firehed opened this issue May 24, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Firehed
Copy link
Contributor

Firehed commented May 24, 2024

Currently the AutoFill API in the SDK is #if-defined on the supporting platforms, which a) led to #15 and b) makes the SDK a bit more complex to use.

I think it would be a better experience for developers to be able to always call the AF APIs in our SDK, and no-op the internals (or immediately return an error) on the platforms with no support.

@Firehed Firehed added the enhancement New feature or request label May 24, 2024
Firehed added a commit that referenced this issue Jul 28, 2024
As noted in #29, the initial design of the autofill interactions used a
delegate-based system, rather than async/await like the modal APIs. This
was based on an incorrect assumption (carried over from web, where it
may also be flawed) on how promises resolve. Upon further
experimentation, it seems perfectly fine and non-problematic to have a
promise that might take minutes to resolve and not have it block other
interactions.

This (breaking) change adjusts the autofill API to also use async/await
instead of delegates. Client code is a lot more straightforward, and the
internals become more reliable since a bunch of conditional paths are
eliminated.

In the same vein, I've also added a new `.unsupportedOnPlatform` error
code so that clients can have fewer availability checks, part of #30.
The API as a whole is still `#if`'d to iOS+visionOS, but that will get
lifted eventually in a separate PR (see #16).
@Firehed Firehed added this to the 1.0 milestone Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant