amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-ad lightbox functionality

Open coreybyrnes opened this issue 10 years ago • 7 comments

I'm trying to develop a lightbox amp ad but it doesn't seem possible because I'm hitting a security error when I try to obtain the width & height of the top window (different domains) in order to pass those dimensions to the context.requestResize function. Is there any sort of lightbox functionality planned for amp ads?

coreybyrnes avatar Mar 28 '16 21:03 coreybyrnes

@coreybyrnes Could you please describe how the lightbox would work in this case? Is it driven by user action? What kind of transitions do you envision?

Ideally we'd certainly like to support something like this as a top-level abstraction in AMP. This is because on one hand we can provide a more complete UX - for instance, we can instruct a viewer to hide it's header when lightbox is shown. On the other hand we can ensure that the lightbox is shown in the least disruptive manner to the reader, such as based on the user action.

/cc @rudygalfi @kashyapnitin

dvoytenko avatar Mar 29 '16 17:03 dvoytenko

@dvoytenko Yes the user would click on the base ad (ex 320x50) and a full-screen semi-transparent overlay would appear with an ad (ex 300x250) centered vertically and horizontally on it along with a close button in the upper right. Let me know if this is in the pipeline or if there's a way to currently accomplish this that I'm not realizing.

coreybyrnes avatar Apr 11 '16 18:04 coreybyrnes

/cc @cramforce to comment on this as he's looking into similar use cases.

dvoytenko avatar Apr 11 '16 20:04 dvoytenko

Over to @kashyapnitin

This would definitely require work on AMP. We're definitely very open to such a feature.

cramforce avatar Apr 11 '16 20:04 cramforce

Thanks. Please let me know when it's ready! If you need any help testing, I'd be happy to assist.

coreybyrnes avatar Apr 21 '16 15:04 coreybyrnes

I just found this: https://ampbyexample.com/components/amp-image-lightbox/

Seems to already be possible?

coreybyrnes avatar Aug 17 '16 17:08 coreybyrnes

We are currently tracking this for a4a initiative. Generally, there's no problem to show an Ad in lightbox, as long as we can confirm that this is due to a user action. amp-image-lightbox and amp-lightbox have existed for a long time, but they are focused on displaying the content within the page, not within the ad itself.

dvoytenko avatar Aug 17 '16 18:08 dvoytenko