amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Design Review 2018-10-31 20:00 UTC (Google Pay, geolocation API, amp-list auto resize)

Open mrjoro opened this issue 8 years ago • 7 comments

Time: 2018-10-31 20:00 UTC (add to Google Calendar) Location: Video conference via Google Hangouts

The AMP Project holds weekly engineering design reviews. We encourage everyone in the community to participate in these design reviews.

If you are interested in bringing your design to design review, read the design review documentation and add a link to your design doc by the Monday before your design review.

When attending a design review please read through the designs before the design review starts. This allows us to spend more time on discussion of the design.

We rotate our design review between times that work better for different parts of the world as described in our design review documentation, but you are welcome to attend any design review. If you cannot make any of the design reviews but have a design to discuss please let mrjoro@ know on Slack and we will find a time that works for you.

mrjoro avatar Oct 10 '18 16:10 mrjoro

Hi can request for a design review for https://github.com/ampproject/amphtml/issues/15201? And Design doc: https://docs.google.com/document/d/1JgqKgCJvV8R4RMZDZLemb838NzUpZvESUxlQ6PlLeSU/edit#heading=h.sskhy5cgfdzc

Thanks!

zwd199032 avatar Oct 22 '18 18:10 zwd199032

Bikeshed on amp-list auto-resize attribute. #18376 (comment)

and

How to expose accurate geo-location lon/lat values: #8929 (comment)

aghassemi avatar Oct 24 '18 03:10 aghassemi

@aghassemi is this a good place to ask about i18n for amp-ima-video? https://github.com/ampproject/amphtml/issues/18533

curseagain avatar Oct 31 '18 18:10 curseagain

@curseagain yep, anything that can benefit from a discussion is a good candidate for this meeting.

aghassemi avatar Oct 31 '18 19:10 aghassemi

Google Pay in AMP

  • is it expected that the author displays the "complete purchase" button on state change? yes
  • amp-recaptcha asynchronous form inputs; instead of extending BaseElement; would make it easier--just extend one function to support async
    • why use this instead of presubmit? it keeps things more consistent
    • does merchant register for the event? no, this happens at the extension level
    • @torchh will forward the design
  • @cramforce: should we have a more generic payment component?
    • @cramforce: actually that probably doesn't make much sense since there's a lot of custom logic for each one, but should we have an interface that different payment components implement?
    • could then customize it base on where you are, e.g. in FB use FB pay, on Apple use Apple Pay, etc.
    • we should consider having a generic viewer based select funtion where you can write these function, but it's okay to have a specific component for each (Google Pay, etc.)
    • @zwd199032: working with 3P merchants, they often use other solutions like Apple Pay, Visa Checkout, etc.; normally the merchants put every button on their page and the user chooses which one they want to use
  • @kristoferbaxter: inline flow vs. button; what happens if there's an error? current plan is to throw an error, page displays an error message (e.g. "contact Google") and assume the developer will see/fix this, in the future possibly fallback to a button
    • if the merchant id is not in the allow list for the inline flow, would the AMP authored document need to understand that or does the component handle the logic internally? it's transparent to the developer
    • so the page wouldn't have knowledge that this part of the page is broken? this can be a particular problem for old pages in the AMP cache (e.g. if the privilege of the merchant to do things inline is revoked)
    • ideally the AMP doc should be able to be aware that the inline version isn't going to work, so it can fallback; @zwd199032: there's a future fallback plan to not be broken, though it may be a different experience
    • can you expose "is ready to pay" to the page? so they can redirect to a different place if needed; @zwd199032, yes we should think about it; merchants are already requesting the ability to not show the Google Pay button if the user can't use it
    • state changes: state is either ready or not, but there may be other states; shouldn't the merchant be able to handle those (exposed as events)? e.g. extension configures events based on different errors, then developer can react with things like amp-bind; will need to think about this some more
    • @aghassemi: if the widget fails and you reject the promise of building the component, AMP will automatically display a fallback the developer provides... so there's some built in handling of error cases, but this may not be enough
    • @zwd199032: this is likely not an engineering decision but a product decision; will work with the merchants to figure out what experience they need; but we should plan on falling back
  • for button case the name is "loadPaymentData" for inline "paymentReadyStatusChanged"; are these the same? no, they're different semantically; paymentReadyStatusChanged is only "is the user ready to pay" while loadPaymentData returns the full data response from the GooglePay flow
  • how customizable is the button? look and feel, i18n? no i18n support right now, interested in looking at it in the future; look and feel is controlled by Google Pay by design (product decision)

mrjoro avatar Oct 31 '18 21:10 mrjoro

geolocation API

  • who is asking for the use case of amp-geo using the exact location (or city) vs. country? no
    • it was designed to be able to be pre-rendered and fast, even when living in the cache
    • one goal for amp-geo is privacy (e.g. for GDPR), so it's particularly important to be sensitive to privacy in this case
    • would be render-blocking if you have to ask a user for permission first; even asking for it on load is an anti-pattern
  • if geolocation API is called from an iframe, who does it tell the user is requesting it and what's the scope? depends on the browser; may be confusing and we'd need to make sure the permissions don't happen at e.g. the viewer level (and extend to other pages in a carousel); need to resolve this
  • let's go with a separate extension (e.g. amp-precise-location)
  • amp-geo adds a new state to the page; should this extension act similarly (e.g. amppreciseposition.getCurrentPosition)?
    • having it in the state would make it available to amp-script
    • need to include more clarity over the data, e.g. include whether the user gave permission or not
    • need to ensure extensions can handle the case where this isn't yet available
  • permission is granted essentially forever; need to fire event at load time if the permission is already granted, but we should make this only trigger on user action
    • but there are some valid use cases where you want to change the layout based on this; if the layout doesn't jump can we support that?
  • have a fallback to make a publisher request that uses IP address; you can do that today with amp-list
  • should we let users control the granularity? that can be confusing, not clear it adds value; or you can do best effort and then ask if they are okay doing more precise
  • getCurrentPosition doesn't precisely describe what we ended up with; consider a better name for it

mrjoro avatar Oct 31 '18 21:10 mrjoro

amp-list auto-resize

  • options were wither finding a better name or making this the default (and fix a few other bugs) and bump the amp-list version to 2
  • decision folks were in favor was upping the version number and making this default. /cc @cathyxz

aghassemi avatar Oct 31 '18 22:10 aghassemi