New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [amp-image-slider] Conservative loading with tweak over hints #17477
🐛 [amp-image-slider] Conservative loading with tweak over hints #17477
Conversation
/cc @nainar to verify behavior matches specs. |
@@ -312,7 +312,7 @@ export class AmpImageSlider extends AMP.BaseElement { | |||
const rightAmpImage = dev().assertElement(this.rightAmpImage_); | |||
leftAmpImage.signals().whenSignal(CommonSignals.LOAD_END).then(() => { | |||
if (leftAmpImage.childElementCount > 0) { | |||
const img = leftAmpImage.firstChild; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch.
@kevinkassimo looks good to me as per the spec in the issue. (Could you link the issue here please?) However want to allow discussion on the main issue to conclude. Give me a bit to loop back on this? |
@nainar Sure |
Let's land this. The product is experimental we can always revert. |
…roject#17477) * Use visibility trick on container to hide before images complete loading * Fix false DOM order assumption .firstChild causes issues for SSR * Hide hint until amp-img finished loading * Add fallback example
Per #17446
1st slider below loads correctly.
2nd fails and toggles
amp-img
s' own fallbacks.Caveat:
layer
is not enabled, three dots would not showlayer
is not enabled, if amp-imgs' fallback are also amp-imgs or other amp components, they would not show (due to slider taking the ownership)