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 nested amp-selector elements #7806

Closed
sebastianbenz opened this issue Feb 27, 2017 · 8 comments
Closed

Support nested amp-selector elements #7806

sebastianbenz opened this issue Feb 27, 2017 · 8 comments

Comments

@sebastianbenz
Copy link
Contributor

Currently amp-selector doesn't support nested selectors. This means if an AMP uses amp-selector to implement a tabbed UI, it's no longer possible to use amp-selector for an image gallery inside a tab.

@aghassemi
Copy link
Contributor

@ericlindley-g Can we prioritize for the completeness of amp-selector feature set?

@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @camelburrito Do you have any updates?

@durr04
Copy link

durr04 commented Jun 25, 2018

Any updates on this guys?

@aghassemi
Copy link
Contributor

@durr04, this is currently not prioritized. You should be bale to use amp-bind to cover use-cases that a nested amp-selector would. If you find that amp-bind is not sufficient in your case, please let us know.

@durr04
Copy link

durr04 commented Jun 26, 2018

@aghassemi In my case i have 2 tabs & each tab have 5 sub tabs. Basically, I want to implement nested tabs using nested amp-selector. Using amp-bind it might get bit complicated structure to implement.

Is it feasible to implement using amp-bind. Please let me know your thoughts on this.

@aghassemi
Copy link
Contributor

@durr04 yeah, it would be fairly simple to implement with amp-bind, you can have one variable to track which of the two top level tabs are selected and 2 variables to track what subtab is selected. amp-bind can simply change the CSS class when value of these variables changes and on="tap" of each tab, you set the variables to the selected value.

@durr04
Copy link

durr04 commented Jul 18, 2018

Thanks @aghassemi for your inputs. It worked with the variables & classes.

@aghassemi
Copy link
Contributor

dedup with #8090

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

6 participants