amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

[Master feature] Allow custom sidebar content in stories

Open newmuis opened this issue 8 years ago • 20 comments

We should allow publishers to specify arbitrary custom content to be shown in a sidebar. The API and documentation should make it clear that every platform has the ability to display or not display this content. The sidebar can contain both runtime-specified content (configurable by viewer) and publisher-specified content.

Some examples:

screen shot 2018-07-11 at 12 26 38 pm

We can automatically show an affordance in the system layer:

42192455-1236da60-7e37-11e8-90fd-153c39209f26

newmuis avatar Jul 02 '18 22:07 newmuis

I would love it if we could find a way to use <amp-sidebar>'s API (with some restrictions on validation when used within <amp-story>) to make this happen.

I think it may also make sense to introduce some concept like an <amp-story-system-layer> element that encapsulates custom system components like this, with the understanding that all custom system components are subject to be removed by the platform that is embedding the story.

newmuis avatar Jul 03 '18 01:07 newmuis

I'm hoping @addieachan might have some bandwidth to take this on after her work on #15562.

newmuis avatar Jul 03 '18 01:07 newmuis

This is a high priority issue but it hasn't been updated in awhile. @newmuis Do you have any updates?

erwinmombay avatar Aug 21 '18 01:08 erwinmombay

@addieachan will be taking this on, and is currently in the process of designing this feature.

newmuis avatar Aug 21 '18 16:08 newmuis

This is a high priority issue but it hasn't been updated in awhile. @addieachan Do you have any updates?

ampprojectbot avatar Sep 11 '18 06:09 ampprojectbot

Hey @newmuis ,

How is this sidebar feature coming ? Really excited to see this.

ghelapratik avatar Sep 19 '18 09:09 ghelapratik

Hi @psdtomanythings, #17836 has the implementation, but there are still some outstanding API decisions to be made. Due to the AMP contributor summit next week, this might not be decided until the following week, then the changes will take ~two weeks to roll out.

newmuis avatar Sep 19 '18 22:09 newmuis

@newmuis - What are the plans for the AMP Sidebar's look and feel in desktop ?

ghelapratik avatar Oct 05 '18 13:10 ghelapratik

@psdtomanythings on desktop, the plan is to place this next to the share pill in the top right corner:

Screenshot of the sidebar while closed

Screenshot of the sidebar while open

newmuis avatar Oct 05 '18 16:10 newmuis

Looks pretty cool.

ghelapratik avatar Oct 05 '18 18:10 ghelapratik

Hey @newmuis ,

Can we just write the code for complete amp sidebar (i.e. HTML) or is there gonna be an API that automatically create a sidebar using some kind of JSON object ?

ghelapratik avatar Oct 19 '18 06:10 ghelapratik

The plan is currently to allow amp-sidebar usage as it exists in AMP generally, with the exceptions that:

  1. Instead of being a direct child of <body>, it will be somewhere within the <amp-story>
  2. Actions generally are not allowed in <amp-story>, so the only way to open the sidebar is the menu icon added automatically by the system.

newmuis avatar Oct 19 '18 14:10 newmuis

This is a high priority issue but it hasn't been updated in awhile. @addieachan Do you have any updates?

ampprojectbot avatar Nov 08 '18 03:11 ampprojectbot

This is a high priority issue but it hasn't been updated in awhile. @addieachan Do you have any updates?

ampprojectbot avatar Nov 28 '18 04:11 ampprojectbot

This is a high priority issue but it hasn't been updated in awhile. @addieachan Do you have any updates?

ampprojectbot avatar Jan 09 '19 10:01 ampprojectbot

This is a high priority issue but it hasn't been updated in awhile. @addieachan Do you have any updates?

ampprojectbot avatar Feb 13 '19 04:02 ampprojectbot

This went live with @bramanudom's #19540.

newmuis avatar Feb 13 '19 15:02 newmuis

In AMP-story you are allowed to ad a SideBar but in doing so it appears there is no control over the i-amphtml-story-opacity-mask if you use an on="tap:sidebar-right.close" . the mask stays in place when the sidebar closes and the user has to tap again on the mask to remove it. The only option I found was to use [class*="i-amphtml-story-opacity-mask"] {display:none!important;} but the AMP does not like the !important so it does not pass verification.

Are there any parameters I am missing?

JohnAJarboe avatar Feb 27 '19 13:02 JohnAJarboe

@JohnAJarboe this is a bug: #21050

Until that fix lands, your can still use sidebar without an explicit close control, and users can tap outside of the sidebar to close it

newmuis avatar Feb 27 '19 14:02 newmuis

Yes, however the clientele we solicit are more in the 34-65 age bracket and prefer the obvious and tapping anywhere is not obvious. Users are more comfortable with explicit instructions. I have clients that are not aware that the three pancake stack is the icon for the menu.... anyway thanks and look forward to an options to "turn the mask off"

JohnAJarboe avatar Feb 27 '19 18:02 JohnAJarboe