amp-social-share causes layout shift when viewed on platforms that do not support system sharing
Add an amp-social-share component with type="system" . If system sharing is not supported, the element hides itself, causing layout shift
Example:
https://www.terra.com.br/amp/noticias/brasil/politica/janaina-diz-que-ve-risco-de-bolsonaro-nao-terminar-mandato,c75584c59cf271f728458dfc04cc2caemjijutop.html
Browsers that do not support system sharing
2003031842100 , but believe this has always been an issue
/cc @ampproject/wg-ui-and-a11y
Discussed in design review #27073 with the following resolutions:
Discussed further with @ampproject/wg-bento with the following additional resolution points:
amp-social-share[type=system] instance, it hides itself.amp-social-share[type=system] instance, redirect endpoint from navigator: to mailto:. This means it will essentially behave as type=[email] with its data-param-text attribute forwarded to the email's data-param-subject attribute.attemptCollapse strategy discussed in design review may become viable as an intermediary step before falling back to the mailto: endpoint. data-mode=replace behavior requires further work:data-mode=replace (low usage as of today) because it is fundamentally not in the spirit of core web vitalsamp-social-share instances.cc @krdwan @wassgha @ampproject/wg-ui-and-a11y
I'm all for removing the data-mode=replace functionality.
Most helpful comment
Discussed in design review #27073 with the following resolutions:
Discussed further with @ampproject/wg-bento with the following additional resolution points:
amp-social-share[type=system]instance, it hides itself.amp-social-share[type=system]instance, redirect endpoint fromnavigator:tomailto:. This means it will essentially behave astype=[email]with itsdata-param-textattribute forwarded to the email'sdata-param-subjectattribute.attemptCollapsestrategy discussed in design review may become viable as an intermediary step before falling back to themailto:endpoint.data-mode=replacebehavior requires further work:data-mode=replace(low usage as of today) because it is fundamentally not in the spirit of core web vitalsamp-social-shareinstances.cc @krdwan @wassgha @ampproject/wg-ui-and-a11y