-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: Add next Button, ButtonGroup #29230
Conversation
@sarayourfriend Oh wow! You took on a big one 😍 |
20c3c9b
to
0ec6606
Compare
I fixed a merge/rebase issue with the |
Looks like there are some TS building issues with
🙈 |
@ItsJonQ we just need to update the |
Thank you @sarayourfriend ! |
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
@gziolo Yes it still needs to be refactored. |
The snapshot tests are updated (and a new note added to the PR description). However, currently |
packages/components/src/ui/button/test/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
cb32e7e
to
5866a5f
Compare
So the It almost certainly has something to do with TypeScript, right? But Adding a specific build script to be run by I was having the issue locally and Any help is appreciated! |
@sarayourfriend Maybe we can swap |
49287a5
to
2ea9c03
Compare
2ea9c03
to
1fe29b4
Compare
@ItsJonQ After our 🍐 yesterday I think our plan is the following for this PR:
Is that correct? |
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.
@sarayourfriend Yes! That plan sounds right to me :).
Approved 🚀 from me!
Description
Adds new Button, ButtonGroup components. Unfortuantely they need to be added together because they depend on one another due to shared context.
Note: I had to change the
prefix
prop to bepre
due to an issue with types. I'm not sure how to resolve it but you can replicate it here in this TS Playground. The issue has something to do with the overlap in HTMLAttribute props and the prop names of the component itself. Sometimes these work (like href) and other times they don't. Not sure what the issue is but renaming the prop was the best workaround I could find for now.This PR also includes an update to
toMatchStyleDiffSnapshot
that @ItsJonQ and I came up with together. Instead of usinggetComputedStyle
which doesn't work with CSS variables in JSDom (jsdom/jsdom#1895) we use the stylesheets themselves and diff those. For now this works, we may run into some instances where this doesn't work and we'll have to do some refactoring, but it's already more robust than our previous approach.TODO:
Button
.How has this been tested?
Storybook.
Screenshots
Types of changes
New feature
Checklist: