-
Notifications
You must be signed in to change notification settings - Fork 622
fix(Token): Render <a/> tag as interactive element #6429
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7f78bef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
👋 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! |
size-limit report 📦
|
Tried following this but could not find the canary version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the TokenBase
component where the as
prop was not being passed to the isTokenInteractive
function, causing anchor elements to be incorrectly treated as non-interactive. This affected the cursor styling, where anchor tokens showed cursor:auto
instead of the expected cursor:pointer
.
- Fixed
isTokenInteractive
function call to include theas
prop - Added comprehensive test coverage for interactive behavior across different element types
- Added changeset for patch release
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/Token/TokenBase.tsx |
Fixed function call to pass as prop to isTokenInteractive |
packages/react/src/Token/__tests__/Token.test.tsx |
Added tests for interactive behavior validation |
.changeset/wet-crews-drum.md |
Added changeset documenting the fix |
Closes #
Changelog
New
Changed
isTokenInteractive
function call inTokenBase.tsx
to include theas
prop:isTokenInteractive({as, ...rest})
Removed
Rollout strategy
Testing & Reviewing
The fix ensures that:
data-cursor-is-interactive="true"
data-cursor-is-interactive="false"
All existing tests continue to pass, and new tests verify both the utility function behaviour and the integration with rendered components.
To compare, Storybook link before the change (
cursor:auto
on Link) vs after the change (cursor:pointer
on Link).Merge checklist