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

Created on 23 Sep 2019  路  4Comments  路  Source: ampproject/amphtml

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.

amp-autocomplete Developer Soon DevX Feature Request components good first issue

Most helpful comment

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

All 4 comments

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 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!

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

Was this page helpful?
0 / 5 - 0 ratings