ampproject / ampproject/amp.dev
Add "Add To User List" button on product page
- Dominant language
- HTML
- Stars
- 600
- Forks
- 675
- PR merge metrics
- No merged PRs in 30d
Description
## 📖 Missing Documentation for Add to List on product page
### Problem
On the [example product page](https://amp.dev/documentation/examples/e-commerce/product_page/?format=websites) there's lots of examples for how to implement different features. It would be great to have an example on how to implement a "Add To User List" button where the user needs to be logged in in order to add to the list, probably through amp-access and than it needs to check if the user has previously added it or not in order to show a different icon or text.
There is the [favorite button example](https://amp.dev/documentation/examples/interactivity-dynamic-content/favorite_button/) which is kind of similar to this but is not user account related.
### Location
Should be added to either of the following pages
- [example product page](https://amp.dev/documentation/examples/e-commerce/product_page/?format=websites)
- [example favorite button](https://amp.dev/documentation/examples/interactivity-dynamic-content/favorite_button/)
### Content type
Similar to above mentioned pages and should probably be added as a new section.
### Information architecture (optional)
In our case we've had difficulty using the amp-access from within the amp-list template, where the amp-access attributes were silently stripped away. The doc should clearly state what is possible and what is not and in which cases there's a workaround to get something like this working.
Contributor guide
Research direction
Start with the example product page and favorite button example linked in the issue, then compare their existing sections and amp-access guidance. Document an Add To User List example covering login requirements, previously added state, and the amp-access and amp-list limitation or workaround described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100