Skip to content

Convert react <Tagline> to <cfpb-tagline> web component#531

Open
anselmbradford wants to merge 6 commits intomainfrom
ans_tagline_wc
Open

Convert react <Tagline> to <cfpb-tagline> web component#531
anselmbradford wants to merge 6 commits intomainfrom
ans_tagline_wc

Conversation

@anselmbradford
Copy link
Member

This PR replaces the <Tagline> react component with <cfpb-tagline> web component. This component doesn't yet exist in the design-system, but should be moved there later. In the meantime, this PR demonstrates what converting a static react component into a web component would look like here with all the changes in this repo.

Changes

  • Conver react <Tagline> to <cfpb-tagline> web component.

How to test this PR

  1. yarn install && yarn build && yarn start and the Banner and Tagline page should visually look the same, but use a <cfpb-tagline> web component in the source.

Notes

  • vite-plugin-lit-css is how the SCSS is passed into the lit component. I'm not real happy with the dependency on this plugin, as it creates a Vite dependency to build the source code. We should investigate other ways to do this that are build-tool agnostic.

@anselmbradford anselmbradford changed the title Conver react <Tagline> to <cfpb-tagline> web component Convert react <Tagline> to <cfpb-tagline> web component Mar 18, 2026
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cfpb.github.io/design-system-react/pr-previews/pr-531/

Built to branch gh-pages at 2026-03-20 19:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@itsmedavep
Copy link
Collaborator

@anselmbradford Banner with links and banner with lang switcher have regressions. The overall height of the banner has grown because the eyebrow now stack vertically.

@anselmbradford
Copy link
Member Author

Thanks @itsmedavep !! Updated in 4bba05b and cf42ee6

Copy link
Collaborator

@billhimmelsbach billhimmelsbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heyo! Thanks for chatting with me about this Ans! Just summarizing what we talked about on Teams:

  • I think probably folks from Metro2 or Complaint Explorer should review this one so they can test it out in their projects first
  • We chatted about updating the jsdoc comment for the boolean
  • We chatted about testing generally: should we use the lit helper methods or framework agnostic methods? Do we want a helper function to standardize the common "render and test the dom use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants