Skip to content
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

Shopping: Support custom CTA text #11309

Closed
7 tasks
swissspidy opened this issue Apr 19, 2022 · 7 comments · Fixed by #11345
Closed
7 tasks

Shopping: Support custom CTA text #11309

swissspidy opened this issue Apr 19, 2022 · 7 comments · Fixed by #11345
Assignees
Labels
Group: Shopping Shop-able products in stories P2 Should do soon Type: Enhancement New feature or improvement of an existing feature

Comments

@swissspidy
Copy link
Collaborator

Feature Description

As of very recently, the default CTA text for the shopping attachment ("Shop now") can be customized, just like for regular page attachments / outlinks.

See ampproject/amphtml#38080

We now want to add support for this in the editor as well in the PageAttachmentPanel.

To-do:

  • Add cta-text attribute to amp-story-shopping-attachment allowlist in KSES
    • Add test for it
  • Add CTA text input field to PageAttachmentPanel
    • Maybe refactor this component to split it into two, as it is quite large already
    • Good time to add some JS unit tests for it as well
  • Update ProductOutput component to add cta-text attribute
    • Add test for it

Alternatives Considered

Additional Context

Existing CTA text input field for regular page attachments:

Screenshot 2022-04-19 at 16 58 06

@swissspidy swissspidy added Type: Enhancement New feature or improvement of an existing feature P2 Should do soon Pod: WP Group: Shopping Shop-able products in stories labels Apr 19, 2022
@spacedmonkey spacedmonkey self-assigned this Apr 25, 2022
@spacedmonkey
Copy link
Contributor

spacedmonkey commented Apr 25, 2022

It seems like cta-text attributes has not been updated in the amp plugin. See.

@swissspidy Who do I speak to get this updated.

@swissspidy
Copy link
Collaborator Author

It's @westonruter who regularly updates the spec in the AMP plugin.

@spacedmonkey
Copy link
Contributor

Seems like the last update was nearly 2 months ago. ampproject/amp-wp@4076e7c

@westonruter
Copy link
Collaborator

Yeah, it was last updated in ampproject/amp-wp#6956 on March 3. How urgently is this needed?

@swissspidy
Copy link
Collaborator Author

Not urgent. We can patch this ourselves in the meantime. Would be nice to resolve this in May or so though.

@westonruter
Copy link
Collaborator

Great. That should align with a 2.3 release and if not a 2.2.5 release with just the spec update.

@westonruter
Copy link
Collaborator

I've opened a PR with the update: ampproject/amp-wp#7078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Shopping Shop-able products in stories P2 Should do soon Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants