ampproject / ampproject/amphtml
AMP-LIST AMP-SELECTOR LIMITATIONS
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
Seems like there is a limit to how many selectors/togglers you can have in an amp list. In the examples below I have roughly 40 buttons on the page as options and sub options. On number 36 click (chicken quesadilla -> Rice -> Roasted Corn) the data does load but only partially and then any of the the options > 36 don't select at all.
See fiddles and dev site below.
Any ideas on why this is happening. I have a couple products that a lot of sub options. This type of behavior is happening on both instances and starts on the same count number of selectors.
## How do we reproduce the issue?
Link 1: Full build out with errors being produced https://jsfiddle.net/3cge0d5a/
Link 2: Bugged data from link 1 isolated and working. Including to show that its not a data issue. https://jsfiddle.net/9vkyztb3/
Link 3: Directly on website click quesadilla nutritional info link https://dev.bajafresh.com/mexican-food-menu/kids
## What browsers are affected?
All
## Which AMP version is affected?
https://cdn.ampproject.org/v0.js
https://cdn.ampproject.org/v0/amp-list-0.1.js
https://cdn.ampproject.org/v0/amp-selector-0.1.js
https://cdn.ampproject.org/v0/amp-mustache-0.2.js
- I also tried reverting back to 0.1.js on amp-mustache and still got the same issue.
Contributor guide
Research direction
Start by reproducing the selector limit using the three linked JSFiddle and website examples, focusing on the 36th option and the listed amp-list, amp-selector, and amp-mustache versions. Then trace the relevant AMP component entry points and tests to identify the expected behavior and document a passing regression case for options beyond that count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100