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

Proposal to allow multiple links on Call to Action Card #1267

Open
3 of 4 tasks
bgilhome-now opened this issue Jul 19, 2024 · 2 comments
Open
3 of 4 tasks

Proposal to allow multiple links on Call to Action Card #1267

bgilhome-now opened this issue Jul 19, 2024 · 2 comments
Assignees
Labels
Proposal - wont implement Proposal has been decided not to implement

Comments

@bgilhome-now
Copy link
Contributor

bgilhome-now commented Jul 19, 2024

Describe the feature

Currently the Call to Action Card has a property for a single link (url and ctaText), and links the card to it as well as rendering a primary filled button.

There may be a use case for multiple links (no more than say 3) for a card which groups together related calls to action - e.g. links related to a permit application - "Am I eligible?", "Permitted activities", "Apply online".

Motivation

The EPA project is asking for a card with 2-3 related actions like the below:
Screenshot 2024-07-19 at 10 34 24 AM

Structurally and conceptually it's a Call to Action Card, but with multiple links and different visual treatment on the links.

It's possible to achieve this with a data-driven component and some custom code to extract an image & list from the rich text 'Description' field passed from the backend - but gives cause to consider whether this feature might be useful to other projects.

Proposal

To add an extraLinks or secondaryLinks property to the RplCallToActionCard component - an array of objects of type RplLink. Design input would be needed on how to style extra links if set - they could be given less visual weight than what might now be called the 'primary link' passed via url and ctaText (for example, outline buttons, or a inline list of plain links with an arrow or other icon).

Update Tide's 'Call to Action' paragraph type to add a field_extra_links multiple-cardinality Link field, and handle it in ripple-tide-landing-page's component mapping and TideLandingPageCallToAction template.

Benefits

Can be used on 'section landing pages' to direct users to related child pages within a given sub-section, and/or related actions relevant to a given aspect of the site.

Drawbacks

Potential cluttering on the card - needs consideration from content design and visual design perspectives.

Adoption strategy

If implemented via an extra property/field, there should be no breaking changes. Documentation for Ripple & Tide would need to be updated, and a story added to the Ripple storybook.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be created outside of Ripple-framework as a layer?

Final checks

@bgilhome-now bgilhome-now added the Proposal - Draft New feature proposal label Jul 19, 2024
@waitingallday
Copy link
Member

There's an added caveat on the component itself, it uses the accessible container pattern to capture all clicks on the card and trigger a click to the link - it wouldn't work if there is more than one link.

Visually, I think the design could be reused to accommodate this but it would need to be implemented in a separate component (one that doesn't use the accessible container).

@bgilhome-now
Copy link
Contributor Author

Thanks @waitingallday - if the feature request review team decide this is a useful enough component to include, I'm happy to work on a PR for review.

@dylankelly dylankelly added Proposal - wont implement Proposal has been decided not to implement and removed Proposal - Draft New feature proposal labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal - wont implement Proposal has been decided not to implement
Projects
None yet
Development

No branches or pull requests

3 participants