Skip to content

Conversation

joshblack
Copy link
Member

This is a follow-up to the latest release which included support for underline preference in the Link component: #3720

I noticed when trying to update code upstream that underline={false} does not work with this preference enabled. This PR changes this behavior so that underline={false} is respected regardless of if the preference is enabled.

I'm curious what folks feel about this change 🤔 I couldn't think of an alternative if someone wanted to disable underlines in a specific area (like for cards in a project).

Changelog

New

Changed

  • Update underline={false} branch in Link to set text-decoration to 'none' if the value is false
  • Add No Underline Link story
  • Add e2e tests for No underline Link story

Removed

Rollout strategy

  • Patch release

@joshblack joshblack requested review from a team and pksjce October 17, 2023 20:41
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2023

🦋 Changeset detected

Latest commit: 4963ae7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.78 KB (+0.01% 🔺)
dist/browser.umd.js 105.36 KB (+0.01% 🔺)

@joshblack joshblack temporarily deployed to github-pages October 17, 2023 20:46 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3838 October 17, 2023 20:47 Inactive
@mperrotti
Copy link
Contributor

I'm curious what folks feel about this change 🤔 I couldn't think of an alternative if someone wanted to disable underlines in a specific area (like for cards in a project).

I really like this approach. The only thing that feels a little strange is that we don't usually differentiate between an undefined (or falsey) prop value and an explicit false prop value.

@mperrotti
Copy link
Contributor

I pushed a commit to update src/Link/Link.docs.json. Feel free to drop it or push new changes.

@joshblack
Copy link
Member Author

Superseded by: #3946

@joshblack joshblack closed this Nov 30, 2023
@joshblack joshblack deleted the fix/update-link-underline-false branch November 30, 2023 22:19
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