amp-autocomplete: Support prefetching remote data via an attribute to improve responsiveness for users
Issue to track followup effort for #23772 (comment) and #24645 (comment)
Add an amp-autocomplete attribute to support prefetching remote data since the default is to fetch on touchstart or input focus, whichever occurs first.
Un-assigning myself as this is a GFI :) Happy to work with anyone who wants to take this on!
Hi Caroline! Could I work on this feature? :)
@Asadius Absolutely! Thank you for contributing! Feature work includes:
- Reading the proposed attribute in the
layoutCallbackto fetch data and flipthis.interacted_to avoid repeat fetches fromcheckFirstInteractionAndMaybeFetchData_ - Consider renaming
this.interacted_withthis.hasInitialFetch_or similar for clarity of usage - Adding unit tests for the new attribute
- Updating
amp-autocomplete.mdwith description of the new attribute
Feel free to send PRs my way and let me know how else I can help!
Reassigning to me since this issue has been inactive for a while.