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

cleanup: remove deprecated underline attribute #5581

Open
wants to merge 5 commits into from

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Jan 21, 2025

Small change to clean up deprecated underline attributes!

I was getting bothered in storybook files that this underline attribute is deprecated, but it's used in many examples.

Let's clean this up so developers don't add undesirable usage in their code when copying examples from Primer's storybook.

Changelog

New

Changed

Removed

  • Removed undesirable underline attribute usage in stories.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@khiga8 khiga8 added the skip changeset This change does not need a changelog label Jan 21, 2025
@khiga8 khiga8 requested a review from a team as a code owner January 21, 2025 20:47
@khiga8 khiga8 requested a review from langermank January 21, 2025 20:47
Copy link

changeset-bot bot commented Jan 21, 2025

⚠️ No Changeset found

Latest commit: cb06c3b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot temporarily deployed to storybook-preview-5581 January 21, 2025 20:49 Inactive
Copy link
Contributor

github-actions bot commented Jan 21, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 104.39 KB (0%)
packages/react/dist/browser.umd.js 104.91 KB (0%)

@primer primer bot requested a review from a team as a code owner January 21, 2025 21:25
@primer primer bot temporarily deployed to github-pages January 21, 2025 21:26 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5581 January 21, 2025 21:27 Inactive
Copy link
Contributor

@TylerJDev TylerJDev left a comment

Choose a reason for hiding this comment

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

Since we're using inline, do we need to add data-a11y-link-underlines="true" to the containers of the links so that the underlines will show? I did something similar in another PR, but now I'm wondering if there's some sort of base Storybook component we could add this to 🤔

Edit: We might be able to add the data-* attribute to the <div> in preview.jsx, if we did go that route!

@khiga8 khiga8 force-pushed the kh-remove-deprecated-underline-attirbute branch from 0acefdf to 8b8c9ae Compare January 28, 2025 15:00
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 28, 2025
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@khiga8
Copy link
Contributor Author

khiga8 commented Jan 28, 2025

Edit: We might be able to add the data-* attribute to the

in preview.jsx, if we did go that route!

@TylerJDev I think this route makes sense! We have something similar in dotcom!

@github-actions github-actions bot temporarily deployed to storybook-preview-5581 January 28, 2025 15:06 Inactive
@khiga8 khiga8 force-pushed the kh-remove-deprecated-underline-attirbute branch from a7c946c to c65126d Compare January 28, 2025 18:21
@github-actions github-actions bot temporarily deployed to storybook-preview-5581 January 28, 2025 18:30 Inactive
@khiga8 khiga8 enabled auto-merge January 28, 2025 19:54
@github-actions github-actions bot temporarily deployed to storybook-preview-5581 January 28, 2025 20:02 Inactive
@khiga8 khiga8 disabled auto-merge January 28, 2025 20:03
@github-actions github-actions bot requested a deployment to storybook-preview-5581 January 28, 2025 20:13 Abandoned
@khiga8 khiga8 force-pushed the kh-remove-deprecated-underline-attirbute branch from 5a1f66f to 033ced5 Compare January 28, 2025 20:20
@@ -271,6 +270,14 @@ export const decorators = [
document.body.setAttribute('data-dark-theme', darkTheme)
}, [colorScheme])

// Set data-a11y-link-underlines=true to enable underlines in all stories except the Link DevOnly Inline Story.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Link Devonly inline story has examples to show what impact this underline data attribute has.

Adding this conditional to avoid ending up with this markup on that particular story, because it results in all links being underlined.=:

<div data-a11y-link-underlines="true">
  ... 
  ...
  <div data-a11y-link-underlines="false">
     Learn more <Link href="#">about GitHub</Link>
  </div>

@khiga8 khiga8 requested a review from TylerJDev January 28, 2025 22:40
Copy link
Contributor

@TylerJDev TylerJDev left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for all the work on this ✨

@khiga8 khiga8 added this pull request to the merge queue Jan 28, 2025
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants