Skip to content

Update Link component story, update unit tests, refactor Link constructor#464

Merged
flacoman91 merged 17 commits intomainfrom
439-link-documentation
Feb 5, 2026
Merged

Update Link component story, update unit tests, refactor Link constructor#464
flacoman91 merged 17 commits intomainfrom
439-link-documentation

Conversation

@flacoman91
Copy link
Copy Markdown
Collaborator

@flacoman91 flacoman91 commented Feb 4, 2026

This PR updates a bunch of linting warnings and updates the storybook story for the Link component

Changes

  • adds unit tests for Breadcrumb component
  • fix some eslint nag warnings
  • Updated unit tests
  • updated Link storybook stories to match DS documentation
  • Update link markup to match current ds

Breaking changes

  • removed LinkText component in favor of label property on the Link component
  • removed DestructiveLink component since it was just an alias
  • consolidates initialization of Link component to make it similar to the Button component

How to test this PR

Screenshots

Notes

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 4, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-02-05 19:24 UTC

@natalia-fitzgerald
Copy link
Copy Markdown
Collaborator

natalia-fitzgerald commented Feb 4, 2026

@flacoman91

For the inline links, the dotted underline is missing in the example.

Current DSR page PR Preview
Screenshot 2026-02-04 at 8 21 01 AM Screenshot 2026-02-04 at 8 12 54 AM

The link text is missing in the list example:

Current DSR page PR Preview
Screenshot 2026-02-04 at 8 22 34 AM Screenshot 2026-02-04 at 8 13 13 AM

The link shown here is going to a 404 page: Do we need to include this on the documentation page?
Screenshot 2026-02-04 at 8 13 23 AM

@flacoman91 flacoman91 changed the title updating docs for Link component to match ds Update Link component story, update unit tests, refactor Link constructor Feb 4, 2026
@natalia-fitzgerald
Copy link
Copy Markdown
Collaborator

@flacoman91

For the links stories file can you remove the documentation text for each of the stories? In the DSR we generally include just the component name, the intro from the DS page and a link to the DS page (Source: Link to component page). Other than that, we don't bring in any of the DS documentation content so as to not have to manage it in two places and to keep the CFPB Design System as the source of truth (and the authority on usage guidelines).

  • Component name
  • Intro from DS
  • Source: Link to DS component
  • Stories (Ordered like they are in the DS)

Also, can you remove the link on "buttons" in the intro text since we don't want to send users away from the DSR unless they are following that source link directly

Copy link
Copy Markdown
Collaborator

@natalia-fitzgerald natalia-fitzgerald left a comment

Choose a reason for hiding this comment

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

@flacoman91 - Looks great!

I know we removed the link from "buttons" in the intro text. I thought about it some more and wondered if you think it would be helpful to add it back BUT have the link go to the buttons story within the DSR itself: https://cfpb.github.io/design-system-react/?path=/docs/components-verified-buttons--overview?

@flacoman91
Copy link
Copy Markdown
Collaborator Author

flacoman91 commented Feb 5, 2026 via email

@natalia-fitzgerald
Copy link
Copy Markdown
Collaborator

@flacoman91
Let's just leave the buttons link out for now. That will be more consistent with the other DSR component stories pages. I agree that there is a risk that it will return with a future update but a person would probably copy and paste so it would happen either way.

Is the "Link using React Router Link" needed? Asking for my own understanding. What is the use case?

@flacoman91
Copy link
Copy Markdown
Collaborator Author

Is the "Link using React Router Link" needed? Asking for my own understanding. What is the use case?

That example is to let devs know that the DSR Link component is compatible with React Router and we can use our version of the Link component instead of the React Router version

We use React Router to define the specific paths for different pages in CCDB and Complaint Explorer such as the data guides and advanced search tips.

Copy link
Copy Markdown
Collaborator

@natalia-fitzgerald natalia-fitzgerald left a comment

Choose a reason for hiding this comment

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

@flacoman91 - Looks good!

@flacoman91 flacoman91 merged commit 28ab7da into main Feb 5, 2026
4 checks passed
@flacoman91 flacoman91 deleted the 439-link-documentation branch February 5, 2026 19:23
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.

2 participants