Open sebastianbenz opened 5 years ago
I think it makes the most sense to place it under Documentation > Guides & Tutorials > Learn > AMP HTML Specification > auto-lightbox specification
Should we consider renaming "AMP HTMP Specification" to "AMP Specifications" or "AMP Framework Specifications"?
Also, QQ - while reading over it, I was confused about the lightbox behavior with carousel. From my understanding, importing the amp-lightbox script into an AMP page will not apply the lightbox effect to any images on the page unless they are given the lighbox
attribute.
So, if I want my images inside my amp-carousel to have the lightbox effect, I need to import the amp-lightbox script and then add the lightbox
attribute to my carousel images AND everything else I want to have the lightbox effect on that page?
CC: @fstanis @alanorozco
From my understanding, importing the amp-lightbox script into an AMP page will not apply the lightbox effect to any images on the page unless they are given the
lighbox
attribute.
If I understand correctly, the lightbox
attribute is only used if you use the amp-lightbox-gallery
extension. amp-auto-lightbox
is a different "secret" component (doesn't need to be imported explicitly) that tries to guess what could have been a lightbox - and it only works if you aren't already using amp-lightbox-gallery
.
I'm not sure if we should put this under the same level as the other specifications because it's a much "lower level" spec (it explains one component / behavior rather than a whole format, like email or the boilerplate). That said, I'd love to move the current "spec" documents (AMPHTML, AMP for Email et al) into a separate category since they're quite different from the other documents under "LEARN" and doesn't follow the same format.
For this issue in particular... we now have (at least?) 4 different ways to make a lightbox:
amp-lightbox
amp-image-lightbox
amp-lightbox-gallery
amp-auto-lightbox
Maybe it would make sense to have a guide that explains the differences between them ("Adding a lightbox to your AMP page")?
//cc @CrystalOnScript for suggestions on where to put it.
https://github.com/ampproject/amphtml/blob/master/spec/auto-lightbox.md