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

[CTA] v2 discovery #10432

Closed
2 tasks done
Tracked by #10715
oliviaflory opened this issue May 8, 2023 · 0 comments
Closed
2 tasks done
Tracked by #10715

[CTA] v2 discovery #10432

oliviaflory opened this issue May 8, 2023 · 0 comments
Assignees
Labels
dev Needs some dev work package: web components Work necessary for the IBM.com Library web components package v2

Comments

@oliviaflory
Copy link
Contributor

oliviaflory commented May 8, 2023

User story

After reviewing the CTA component we've discussed two different approaches for how CTA could transition to Carbon for IBM.com v2.

Things to consider

  • The CTA component allows us to control / guide users to utilize specific components as the call to action within other components.
    • link
    • link with icon
    • button
    • button group
    • card
    • card link
    • feature card
  • We also have a number of icons to designate CTA "types" which would need to be documented somewhere else (the website / patterns)
  • Examples of components where CTA is used
    • Content block
    • Content section
    • Content group
    • Content item horizontal
    • Card group

Option 1: Sunset CTA

Benefit: Removed duplicate code and CTA has been extended so many times, removing it would help reduce the amount of code we are maintaining(?)
Cons: Breaking change

  • CTA is redundant or duplicative, it extends other components that exist within our system
  • We should guide users to utilize the stand alone components for CTAs
    • link
    • link with icon
    • button
    • button group
    • card
    • card link
  • In WC, it spits out something like HTML – technically an adopter can put whatever they want in the “CTA” slot in Content block. ie CTA doesn't really limit what adopters could put into CTA slot.
  • The “CTA” component still needs to mirror the programmatic shape. You would just need to rename the component in code. This is a breaking change.
  • Current CTA component is inflexible, every time an adopter needs a new CTA "type" we have to add more icons to the component
  • Maybe there’s a way to automate the conversion from “CTA” to the other components.
    • The only thing we couldn’t automate would be changing the whole Card component, for example.

References

4/18

5/4

Tasks

  • Replace CTA with whatever components that exist already (link, link with icon, card, etc)
  • Methodically replace all the places where CTA is being used

Option 2: Keep CTA

Benefit: Helps control the spacing between CTA and other components or text.
Cons: Keeping duplicative code?

  • If we keep CTA, it may be beneficial to help control spacing. But we can still control spacing between, even if we bring it in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Needs some dev work package: web components Work necessary for the IBM.com Library web components package v2
Projects
Archived in project
Development

No branches or pull requests

3 participants