cfpb/design-system

New page: Tags

natalia-fitzgerald opened this issue · 7 comments

Recently my team updated the CSS styling for the Tag component. In the past this component has only appeared as a part of the Multiselect in the Selects section. We would like create a separate page for the Tag component and add this to the CFPB Design System.

What is the standard you're documenting?
Tags

What section will it live in?
Components

When you're ready to share a draft of the page, or want to raise questions, use this issue to track the discussion.

@sonnakim for awareness

Audit

As a first step, I did an audit of tag components on our website. I identified the use case for each and where on the website the specific tag type is used.

Filter tag (or display tag)

  • Use case: Display tags are used to display quick and useful category labels to the user. They are often used to display categories or active filters. Filter tags have 5 possible interactive states — default, hover, focus, hover/focus, and active.
  • Website implementation: Used throughout the website in filterable list multiselects, like the blog (example: https://www.consumerfinance.gov/about-us/blog/)
Contextual view Component view
Screenshot 2023-11-14 at 2 30 32 PM Screenshot 2023-11-14 at 2 07 58 PM

Toggle tag

Contextual view Component view
Screenshot 2023-11-14 at 2 30 11 PM Screenshot 2023-11-14 at 2 07 36 PM

Status tag (or tag label)

Contextual view Component view
Screenshot 2023-11-14 at 2 29 42 PM Screenshot 2023-11-14 at 2 08 23 PM

Results

  • As a first step I think it would be best to document the "Filter tag" in the CFPB Design System. This component is already built in the DS and is also in the DSR.
  • The "Toggle tag" would be good to document but it is currently part of a Highcharts implementation and would therefore need to be rebuilt outside of Highcharts in order to be added to the DS. Perhaps this can be added to the DS backlog?
  • The "Status tag" label has such a limited usage on the site that I question whether this should even be a DS component?

@sonnakim
Does this sound like a good next step? If so I can start building out this shell page that I started: https://deploy-preview-1829--cfpb-design-system.netlify.app/design-system/components/tags

@sonnakim
Can I move forward with this update?
Screenshot 2023-11-21 at 11 19 48 AM

We want to document our topic tag in the DS and think adding it to this Tags page draft would work well.

I updated the draft. For some reason, the preview link isn’t working for me. If you follow the draft link and click to edit the page, you’ll be able to see the changes in edit mode. And here’s a screenshot.

Screenshot 2024-08-16 at 2 36 44 PM

@anselmbradford feel free to add the topic tag code when you’re ready.

Any feedback? @sonnakim @natalia-fitzgerald @anselmbradford

Side note: I’m not sure what’s going on with the “undefined” jump link at the top...

feel free to add the topic tag code when you’re ready.

Let's do that in a separate PR.

Side note: I’m not sure what’s going on with the “undefined” jump link at the top...

Yea :\ there's an open issue for that #1496

Looks good to me 👍 thanks @jenn-franklin !

Thanks! I've published the page and added it to the side nav: https://cfpb.github.io/design-system/components/tags

@anselmbradford Ready for you to add the topic tag code. Also, would you mind checking out the filter tag code? It's looking funky.
Screenshot 2024-08-21 at 9 43 12 AM