amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Document placeholder more prominently on elements like amp-embed

Open ryanlombardo opened this issue 10 years ago • 4 comments

As fast as AMP pages are, some content may take a long time to appear. Specifically, images and embeds. (Especially embeds!) It would improve user experience if there was a well-defined and customizable way to define a placeholder for embeds and images that would be shown until the actual asset loads.

Related: https://medium.com/ux-for-india/facilitating-better-interactions-using-skeleton-screens-a034a51120a5#.anadmfc82

ryanlombardo avatar Mar 17 '16 20:03 ryanlombardo

Hey @ryanlombardo thanks for filing the issue. Have you checked out placeholder attribute?

This should be supported by most amp embeds and extensions. Some even build their own placeholder - see amp-youtube and amp-instagram

mkhatib avatar Mar 17 '16 21:03 mkhatib

@mkhatib Thanks for the info! That looks like it should work. It would help others if a note was added to the amp-embed documentation at https://www.ampproject.org/docs/reference/amp-embed.html

ryanlombardo avatar Mar 21 '16 17:03 ryanlombardo

@Meggin: Can you see if there's a better way to promote the placeholder attribute across our docs?

https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md#placeholder

rudygalfi avatar Mar 21 '16 21:03 rudygalfi

I'm going to close this one. If you disagree, please reopen. The amp-ad reference docs include a section on "Placeholder". As well, any components that utilize common attributes references the "Common Attributes" doc, which has placeholder documented.

ghost avatar Feb 07 '17 16:02 ghost