amphtml: amp-story-social-share doesn't quite render the correct amp-social-share

Description

the sharedProviders that’s being passed trough amp-story-social-share won’t be translated quite expectedly in case if we have a non-configured providers in it with data-share-endpoint defined.

Reproduction Steps

{ "bookendVersion":"v1.0", "shareProviders":[ "twitter", "pinterest", "linkedin", "tumblr", "email", "sms", { "provider": "test", "data-share-endpoint": "https://www.google.com", "image": "https://amp.dev/static/samples/img/story_dog2_portrait.jpg", "data-param-text": "test" } ] } the json below will translate into this image

i took a look at the respective line of code, i think the logic doesn’t cover the requirement quite well. like if i had a data-share-endpoint with a non-configured providers passed from amp-story-social-share. it will translate to data-param-data-share-endpoint attribute for the respective amp-social-share element.

extensions/amp-story/1.0/amp-story-share.js image

Relevant Logs

No response

Browser(s) Affected

Chrome

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments