amp-ad lightbox functionality
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 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 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.
/cc @cramforce to comment on this as he's looking into similar use cases.
Over to @kashyapnitin
This would definitely require work on AMP. We're definitely very open to such a feature.
Thanks. Please let me know when it's ready! If you need any help testing, I'd be happy to assist.
I just found this: https://ampbyexample.com/components/amp-image-lightbox/
Seems to already be possible?
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.