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

Support for: click something, send data, get response, update page #3459

Closed
rudygalfi opened this issue Jun 6, 2016 · 3 comments
Closed

Comments

@rudygalfi
Copy link
Contributor

I'm hoping this isn't too generically described, though it might be.

Basically we need a way to have some element, which, upon click by the user, will be able to make a request to a server, get back some data, and modify the page in some way:

  • Click a button that says (for now, ignoring the account login pieces required here) "Add to cart", "Add to wishlist", "Read later", "Like" and the button is updated to reflect the outcome of the operation (e.g. was added to cart successfully/unsuccessfully, etc.). Note that the UI element basically stays the same, but may be styled differently or be populated with some different text.
  • Click on something (text, div) and some more content comes in, provided by the server. For instance, this could be used to populate the content piece of an amp-accordion after the user has clicked on its header. Note that this is not simply saying unhide a div that was already on the page since we need to go to the server to get the additional content.

Implementation-wise, this seems to require some mix of AMP Bind and the additional server communication introduced by the amp-list feature.

cc @ericlindley-g @dvoytenko

(Apologies if there are other issues that track this behavior. Please link and dupe this if so.)

@avimehta
Copy link
Contributor

If there are well defined actions, I would be interested in exposing those as part of analytics.

@ericlindley-g
Copy link
Contributor

Keeping this to track the feature for now, but this should be possible with Bind when released

@ericlindley-g
Copy link
Contributor

On second thought, de-duping this to #6199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants