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

Create LinkButton component #5298

Merged
merged 22 commits into from
Dec 19, 2024
Merged

Create LinkButton component #5298

merged 22 commits into from
Dec 19, 2024

Conversation

mcwinter07
Copy link
Contributor

Why

This is the counterpart to the Button v3 component and closes the cap on feature parity for the original v1 button.

What

  • Adds a LinkButton component
  • Adds docs, tests, and stickersheets for visual regression
  • Updates Button docs references to Links

Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: 2538c7a

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

This PR includes changesets to release 1 package
Name Type
@kaizen/components 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

@mcwinter07
Copy link
Contributor Author

Moving this to ready for review and back into draft for the branch preview - no need to review just yet

@mcwinter07 mcwinter07 marked this pull request as ready for review November 21, 2024 04:26
@mcwinter07 mcwinter07 requested a review from a team as a code owner November 21, 2024 04:26
Copy link
Contributor

github-actions bot commented Nov 21, 2024

✨ Here is your branch preview! ✨

Last updated for commit 2538c7a: Merge branch 'main' into KZN-2594/build-link-button

@mcwinter07 mcwinter07 marked this pull request as draft November 21, 2024 04:39
@mcwinter07 mcwinter07 force-pushed the KZN-2594/build-link-button branch 2 times, most recently from 32cc077 to fcfc107 Compare November 26, 2024 05:51
@mcwinter07 mcwinter07 marked this pull request as ready for review November 26, 2024 05:51
@mcwinter07
Copy link
Contributor Author

Posing a question / addition to the API for anyone reviewing this. A common pattern I observed when I was looking at Next.js repos that consumed the Next.JS Link was that folks would pass in a Node urlObject. Currently this implementation only accepts string as a href, so wondering whether folks think it should also accept that as a type?

@mcwinter07 mcwinter07 force-pushed the KZN-2594/build-link-button branch 2 times, most recently from 6fce372 to 0a0f190 Compare December 10, 2024 22:50
play: async ({ canvasElement }) => {
const canvas = within(canvasElement.parentElement!)
const linkButton = canvas.getByRole("link")
await linkButton.focus()
Copy link
Contributor

Choose a reason for hiding this comment

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

It's actually exactly what you're expecting though right? The alternative is to just delete the story. You're right that you're essentially testing RAC functionality, which shouldn't be necessary.

@mcwinter07 mcwinter07 force-pushed the KZN-2594/build-link-button branch from c2c751c to d788a4f Compare December 17, 2024 23:22
@mcwinter07 mcwinter07 force-pushed the KZN-2594/build-link-button branch from d788a4f to adf956e Compare December 18, 2024 04:39
Comment on lines 64 to 65
export * from './Menu'
export * from './Button'
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops omg I didn't realise this auto-added itself when I moved things around. Could I trouble you to remove this for me? Since we're currently double exporting 😅 🙏🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

heheh nice, will axe it :)

@mcwinter07 mcwinter07 force-pushed the KZN-2594/build-link-button branch from 17b5304 to 1470490 Compare December 19, 2024 01:23
Copy link
Contributor

@HeartSquared HeartSquared left a comment

Choose a reason for hiding this comment

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

🚀

@mcwinter07 mcwinter07 merged commit 1f9edc2 into main Dec 19, 2024
19 checks passed
@mcwinter07 mcwinter07 deleted the KZN-2594/build-link-button branch December 19, 2024 04:06
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.

2 participants