brand icon indicating copy to clipboard operation
brand copied to clipboard

Remove the hover text-decoration transition in `InlineLink`, `Accordion`, `Timeline` and align `Prose` with the updated `InlineLink` styles

Open stamat opened this issue 11 months ago • 6 comments

Summary

We can't animate the text-decoration-thickness, we can animate a border, but since this is 1px transition, transitioning it is practically useless. Tested it on dotcom.

List of notable changes:

  • *removed transition: var(--brand-InlineLink-transition-timing) text-decoration; from InlineLink styles.
  • *removed transition: var(--brand-InlineLink-transition-timing) text-decoration; from Accordion styles.
  • *removed transition: var(--brand-InlineLink-transition-timing) text-decoration; from Timeline styles.
  • Aligned Prose inline link styles with the rest, since the animation didn't work anyways.

What should reviewers focus on?

  • Hover effect on InlineLink

Steps to test:

Supporting resources (related issues, external links, etc):

  • https://github.com/github/github/pull/359872

Contributor checklist:

  • [ ] All new and existing CI checks pass
  • [ ] Tests prove that the feature works and covers both happy and unhappy paths
  • [ ] Any drop in coverage, breaking changes or regressions have been documented above
  • [ ] UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • [ ] All developer debugging and non-functional logging has been removed
  • [ ] Related issues have been referenced in the PR description

Reviewer checklist:

  • [ ] Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • [ ] Check that tests prove the feature works and covers both happy and unhappy paths
  • [ ] Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before After

stamat avatar Jan 29 '25 16:01 stamat

🦋 Changeset detected

Latest commit: fa028d211ec3b613962e0ad756cef89464149acf

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

This PR includes changesets to release 6 packages
Name Type
@primer/brand-primitives Patch
@primer/react-brand Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook 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

changeset-bot[bot] avatar Jan 29 '25 16:01 changeset-bot[bot]

🟢 No design token changes found

github-actions[bot] avatar Jan 29 '25 16:01 github-actions[bot]

⚠️ Visual differences found

Our visual comparison tests found UI differences.

Please review the differences by using the test artifacts to ensure that the changes were intentional.

Artifacts can be downloaded and reviewed locally.

Download links are available at the bottom of the workflow summary screen.

Example:

artifacts section of workflow run

If the changes are expected, please run npm run test:visual:update-snapshots to replace the previous fixtures.

Review visual differences

github-actions[bot] avatar Jan 29 '25 16:01 github-actions[bot]

Thanks for tidying up the InlineLink component @stamat ✨ 🧹

Before we merge this, a few things to add...

  • We'll need a changeset
  • We should remove the base.json token file which declares the underlying token
  • Optional (but better to do it in this single PR): We should also remove the same CSS rules from the other components that use this InlineLink style, which are Accordion, Prose and Timeline

rezrah avatar Feb 03 '25 10:02 rezrah

@rezrah yo, I don't know what does this mean: We should remove the base.json token file which declares the underlying token 🤷

stamat avatar Feb 03 '25 13:02 stamat

@rezrah ah I see I see, the design token for the variable right?

stamat avatar Feb 03 '25 13:02 stamat