Skip to content

Conversation

@hussam-i-am
Copy link
Contributor

Fixes error in integration tests:

      If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
  
      Warning: React does not recognize the `hoverColor` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `hovercolor` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Changelog

New

Changed

  • Converts the hoverColor prop to a data-hover-color attribute in the Link component.

Removed

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

@hussam-i-am hussam-i-am self-assigned this Nov 20, 2024
@hussam-i-am hussam-i-am requested a review from a team as a code owner November 20, 2024 17:04
@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2024

🦋 Changeset detected

Latest commit: a9ae333

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 Minor

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 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 Nov 20, 2024
@github-actions
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!

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 100.55 KB (-0.14% 🔽)
packages/react/dist/browser.umd.js 101.07 KB (+0.07% 🔺)

@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/351950

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 20, 2024
data-muted={props.muted}
data-inline={inline}
data-underline={underline}
data-hover-color={hoverColor}
Copy link
Member

Choose a reason for hiding this comment

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

does this need a css counterpart or does it just work? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe it's actually being used any longer since it is deperecated, this just ensures that we don't pass in an invalid attribute into the dom

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks for explaining that!
Do we gain anything by adding the data-hover-holor then? could we just ignore the prop?

@hussam-i-am hussam-i-am requested a review from jonrohan November 20, 2024 18:05
@hussam-i-am hussam-i-am added this pull request to the merge queue Nov 20, 2024
Merged via the queue into main with commit 37c4e97 Nov 20, 2024
47 checks passed
@hussam-i-am hussam-i-am deleted the hussam-i-am/fix-link-hover-color branch November 20, 2024 20:05
@primer primer bot mentioned this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: failing Changes in this PR cause breaking changes in gh/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants