-
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: Support for menu to display triggered by button tap #827
Comments
Rudy, wouldn't this be a viewer's function? |
@dvoytenko I could see this behavior in the viewer, but that still raises the question of how that would work. Would there be some way of being able to define the menu content and, upon seeing that, a viewer provide a button that exposes the menu? What I'm trying to reflect with this issue is some feedback I've heard from some publishers around enabling menus in some way. If you look at some mobile sites like http://mobile.nytimes.com/ or http://www.theguardian.com/mobile you can see examples, and that's the kind of pattern I have in mind here. These menus enable navigation to other areas like the Business or Sports section. |
One approach would be to leave it completely up to the viewer implementation which is currently responsible for the header itself. That could work well in the publisher sites (e.g. Publisher.com viewer would show the Publisher.com's menu), but the question will be: should the menu be shown when the same story is displayed by, e.g. Google Search or by Twitter or others. The issue here might be that those apps may have their own menus. |
There isn't always a viewer. I don't really understand the feature request, though. Whatever we do with menus must be responsive, so it does something reasonable on phone, tablets and desktop. |
Let me know how I can clarify things. One thing I can say is that in creating this request I had the standalone (i.e. non-viewer) case in mind, so you should read everything that way: assuming no viewer. (I agree that it's interesting to consider menus in the context of a viewer as well.) I also agree that whatever we have should be responsive. The current behavior we see is that publishers are providing links to other areas of their site (Sports section, Business section) through a statically defined list that's included in the page. You can't have any interactivity, so there's no way to press a button to be able to see the menu. This request captures some component that would allow this. |
+1 |
Yes this would be a very useful feature to have. I expect a user reading an article from any news site would want to have some way of navigating to other sections from the page they're in. |
I would highly urge that the HTML5 [details] and [summary] tags be supported, as these would allow for dynamic menus and accordion widgets without the need for any custom JavaScript. |
Menus on our regular site are geo-dependent. In the context of a single cached AMP article, this means the menu would have to be loaded following an interaction, which could make a call to our site and receive a geo-varied response. So our requirement for menus is: an element (eg a "burger"), that when clicked, unhides a container and executes any AMP markup within it (such as amp-list etc.) That only needs something like an Expando component, rather than anything specific to menus. Menus themselves are going to be too hard to generalise, imho. |
+1 |
What's the ETA of Milestone M2? |
@dkolba Roughly March/April. We have a lot in M2 currently, though, so some stuff may get further pushed out. We're starting to make progress on menu-like functionality currently, however. cc @ericlindley-g |
Just a few thoughts: In HTML5 there is a Hidden state:
Expanded state:
|
Hi there, I'm brand new here and to AMP-html... actually I just founded today... but I just can't understand (after hours of looking into amp-html) why there would be no menu/nav options.. can someone please shed some light on this? So is really just to build single webpages... what's the purpose if you can't jump to a new page or have a navigation menu to help discover more of the owners site? Thank you |
@gandmexpress I'm not an amp dev but i think the reason is simple. Amp is still in its imfancy. A month ago it wasn't even possible to include analytics on a page. |
@Nemo64 makes sense... thank you. |
Yes, as @Nemo64 said, AMP is still quite young. We've come a long way and we've built features in priority order based on feedback from publishers and content providers. (We also appreciate contributions to starting with an intent to implement and design overview to help solve the problems you're most interested in.) Menus are on our near-term roadmap. Another factor playing into the prioritization decision is that: |
@rudygalfi Rudy, thank you. I appreciate you taking the time to reply. I will look into alternatives mentioned in the mean time. I really like the idea/concept of what AMP is and will continue to bring the internet (specifically mobile). Thx again |
You can achieve the same results (constrained to one open section) with It's a bit tricky to get right and you need to put a CSS
html
|
@jpettitt a nice idea. If we want workarounds I might as well just add the I tried to construct something: https://jsfiddle.net/d6qr7qsh/1/ |
@jpettitt @steffenweber @Nemo64 |
Making |
@steffenweber @Nemo64 There's definitely a way to fix |
For folks interested in this issue, there's a pending pull request for an amp-sidebar component: #2461. Please take a look. /cc @sriramkrish85 @ericlindley-g |
Is #2461 tracking to land by tomorrow's release, or should we shift this into the next sprint? |
Rolling this into next milestone. |
@ericlindley-g This is ready for experimentation! and should be fully working now. There are a few validation fixes that needs to be done, then this should be fully functional (after a lot of testing!) |
Excellent! Is the plan to push to this week's canary? /cc @edlea-g to take a look at the implementation |
@ericlindley-g yes (will still be an experiment) |
Given there's additional open PRs (#827 (comment)) and assuming this is the meta-bug covering all of amp-sidebar, should we roll this over into the next milestone? |
@rudygalfi - all the PRs have been merged now. Sidebar is ready for experimenting (as mentioned above) |
@sriramkrish85 Thanks, I'll close this out then. |
Menus can help drive circulation. This request covers the ability to show a menu once the user has clicked/tapped on a button presented on the page. The most common patterns for presenting a menu seem to be:
The text was updated successfully, but these errors were encountered: