amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Lightbox: add runtime validation to Lightbox 2.0

Open cathyxz opened this issue 8 years ago • 4 comments

For now we support:

  • amp-img
  • amp-carousel as lightboxable elements.

Throw a user().assert error if a lightboxed carousel contains anything that isn't an amp-img or a figure containing an amp-img. We're only supporting lightboxing amp-imgs for now. This should be extensible in such a way that we can add components to be valid as we support them.

cathyxz avatar Jan 24 '18 00:01 cathyxz

I have a idea by using amp-carousel for mocking swipe on phone. Ex: when swiping left -> right will open the filter sidebar and right -> left will open the menu sidebar. I wonder this one will affect mine?

buihoanghai avatar Jan 24 '18 15:01 buihoanghai

@buihoanghai This only applies to the <amp-lightbox-viewer> component, which is currently experimental, so it won't affect any current sidebar behavior. I've edited the title and issue description to reflect that.

cathyxz avatar Jan 24 '18 17:01 cathyxz

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

ampprojectbot avatar Feb 19 '18 21:02 ampprojectbot

Actually this was done in https://github.com/ampproject/amphtml/pull/12961.

cathyxz avatar Feb 21 '18 01:02 cathyxz