-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add Selector size variations and switch SelectorGroup to horizontal orientation #943
Conversation
🦋 Changeset detectedLatest commit: b9bf2f7 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 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sumup/oss-circuit-ui/DxXeL1HGQHwFSmTRoDBM7X7BaCq8 |
Hey @mykolaharmash, Thanks! |
Codecov Report
@@ Coverage Diff @@
## next #943 +/- ##
==========================================
+ Coverage 91.67% 91.71% +0.04%
==========================================
Files 165 165
Lines 3063 3091 +28
Branches 754 761 +7
==========================================
+ Hits 2808 2835 +27
- Misses 227 228 +1
Partials 28 28
|
b15db60
to
6a1f7c2
Compare
6a1f7c2
to
75877b7
Compare
75877b7
to
35dcb20
Compare
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.
Thanks for this great improvement to the Selector/SelectorGroup! 🙌
My main concern here is with versioning: as I mentioned in some of my comments, this looks like a major. If you need this earlier than Circuit V3, I think it could still be possible but we would need to avoid any breaking changes. I'd also love input from @connor-baer here 🙂
(Also, sorry I missed the issue at #931, we could have talked about the versioning questions earlier. Generally though, this is definitely the direction we're going into since there are design specs for it, so thanks for opening this PR! Let's figure out how to best release this.)
13068cb
to
858dd20
Compare
277080c
to
cf31e8e
Compare
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.
Thank you so much for addressing the changes! Just a few extra comments here, let's also go through them on our call and wrap this up today 🎉
packages/circuit-ui/components/SelectorGroup/SelectorGroup.spec.tsx
Outdated
Show resolved
Hide resolved
81ac19f
to
6a396ce
Compare
6a396ce
to
fb73570
Compare
fb73570
to
7083652
Compare
As agreed, we're going to make it a breaking change and release it with the next major version. Latest changes:
@robinmetral please have a look one more time. |
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.
Just a few last things, it looks great 🎉 Thanks a lot for your work on this
Please give it another look, I've addressed the latest comments. |
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.
Amazing! 🚀
You simply have outdated snapshots, the rest looks great. Thanks a lot for this!
Thank you for the contribution @mykolaharmash and the thorough review @robinmetral. I'll take a quick look later today :) |
// +1px is to match the height of other form components | ||
// like Input or Select that also have +1px for vertical padding | ||
padding: `calc(${theme.spacings.byte} + 1px) ${theme.spacings.giga}`, |
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.
We will be able to remove this as part of DS-18.
ae2f4b3
to
edea690
Compare
I've addressed the latest comments. Could you guys please merge current |
@mykolaharmash The names for the border-radius values have been shifted, |
Fixed |
Addresses #931.
Purpose
Extending
Selector
andSelectorGroup
features to support most common usecases.Approach and changes
size
prop toSelector
Selector
to make sure its height matches other controls likeInput
andSelect
SelectorGroup
to a horizontal orientation on a big screen and vertical on mobileorientation
prop toSelectorGroup
to choose between horizontal and vertical layout.size
prop toSelectorGroup
which changes size of aSelector
within the groupgapSize
prop toSelectorGroup
to control the spacing betweenSelectors
stretch
prop toSelectorGroup
to make it fill all available widthDefinition of done
Unit and integration testsOnly updated snapshots as it's only styling changes, let me know if you think we need some new tests