amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-autocomplete: Support prefetching remote data via an attribute to improve responsiveness for users

Open caroqliu opened this issue 7 years ago • 4 comments

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.

caroqliu avatar Sep 23 '19 16:09 caroqliu

Un-assigning myself as this is a GFI :) Happy to work with anyone who wants to take this on!

caroqliu avatar Oct 15 '19 21:10 caroqliu

Hi Caroline! Could I work on this feature? :)

Asadius avatar Nov 17 '19 04:11 Asadius

@Asadius Absolutely! Thank you for contributing! Feature work includes:

  • Reading the proposed attribute in the layoutCallback to fetch data and flip this.interacted_ to avoid repeat fetches from checkFirstInteractionAndMaybeFetchData_
  • Consider renaming this.interacted_ with this.hasInitialFetch_ or similar for clarity of usage
  • Adding unit tests for the new attribute
  • Updating amp-autocomplete.md with description of the new attribute

Feel free to send PRs my way and let me know how else I can help!

caroqliu avatar Nov 18 '19 15:11 caroqliu

Reassigning to me since this issue has been inactive for a while.

dmanek avatar Nov 04 '20 23:11 dmanek