amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

noContentAvailable should always close amp-ad if no fallback provided

Open RonanDrouglazet opened this issue 10 years ago • 1 comments

Hi AMP Team !

Currently, if we call noContentAvailable from amp-ad context, if we have a fallback in it, AMP Framework display it, and if not, close the amp-ad component BUT ONLY if this one is away from user's visibility (from the amp resizing rules)

We have a lot of publisher who don't want to display any fallback image with some self-promotion or other So a lot of amp-ad component without fallback.

Because the AMP Framework manage amp-ad component's loading to load it just before seeing it, most of time when we called noContentAvailable, our amp-ad component is on user's visibility and so the amp-ad component does not resize, we just have a big white square.. and it's not pretty for the publisher AND the user who have to scroll "more"

Should it be possible to ALWAYS close amp-ad component if no fallback provided ..? Maybe with the publisher's agreement (ask to the publisher to allow this feature with a special property on amp-ad component or special className)

RonanDrouglazet avatar May 11 '16 10:05 RonanDrouglazet

/cc @cramforce

@RonanDrouglazet Thanks for report. Not automatically collapsing ads (or resizing any elements) currently in the viewport is actually a conscious trade-off. This is to avoid content flashing and disrupting the user's point of reading. When an ad is outside of the current viewport the resize can be done safely and we allow it.

(I'll close this bug for now, but feel free to re-open it with additional questions/suggestions)

dvoytenko avatar May 11 '16 15:05 dvoytenko