-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Feature request: Expando #1017
Comments
+1 This would be a great feature to have. I've seen this on HuffPo, QZ, NYT, and we're currently implementing it on our site. Typically there are related links served below a "Read More" button. Giving users who are on the fence about reading an article a chance to "bail" into related content seems to be a good way to drive recirculation on mobile. |
👍 This would be great to have parity with our current NYT mobile web implementation. |
One thing to consider is that this might also allow for pulldown/drawer menus as they are common in the mobile web. What I would also wish for is the capability to toggle 2 elements at the same time to switch between 2 content areas.... like before/after images. It might also be needed to jump to the expanded element after the toggle is activated. Another thing this element might need to cover is an accordion. Basically that every expanded element in a group collapses when another one opens, roughly similar to the Bootstrap accordion. Also: when will resources inside the collapsed content be loaded? They might be placed far apart (not sure why anyone would do that but depending on the implementation it might be possible and someone will do it). I suggest when the toggle link/element itself is inside the view but after ever other visible resource is loaded. It might be even more complicated than that but it might also be not worth optimizing (don't know). |
👍 to this proposal. For reasons detailed here, this seems to provide a missing building block for expandable menus. (Which in our case need to make an async request for their content.) |
+1 |
I would say this is partially addressed by #1849 (amp-accordion). Obviously there are many directions to go with enhancements, but I'll call out two things already mentioned in this thread to figure out if we should open separate tracking issues for them:
|
On the second question, the behavior is already possible with the current implementation, by using CSS attribute selectors to style the accordion header when it is expanded (has the In another approach, which does not have the issue of the additional space, you can keep the heading but change the text in expanded/collapsed state. To do this, you toggle For example: In the CSS:
In the HMTL:
I'll work with @sebastianbenz to see what we can do in the way of an amp-by-example example for both of these |
@ericlindley-g owns the next follow up here. Maybe it makes the most sense to close this and open up the ABE issues stated above? |
Never followed up on this, but ABE has that example at the link below, so we should be all set: https://ampbyexample.com/components/amp-accordion/ |
A way to click/tap on a button and expose some content that's hidden from view by default. Also, can this trigger an async request to fetch the content that would be populated, including sizing information?
The text was updated successfully, but these errors were encountered: