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
fix(inline-control-group): remove bottom spacing from last child control #974
Conversation
This pull request is being automatically deployed with Vercel (learn more). paste – ./🔍 Inspect: https://vercel.com/twilio-dsys/paste/JCsNbA6CXeQJEkJkFfDsQK9c5AiM paste-theme-designer – ./🔍 Inspect: https://vercel.com/twilio-dsys/paste-theme-designer/F9jcX6RTDtHJCe411VnLPHYKYQzZ |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 658c408:
|
Size Change: -97 B (0%) Total Size: 515 kB
ℹ️ View Unchanged
|
This is not as easy as first thought. The reason for the bottom margin is for when a group is orientated in a horizontal row and the number of items exceeds the row width space. We can't remove the bottom margin in horizontal layouts entirely as the second row would remove the desired space between rows. We can't only remove the bottom margin on the last child, because as you can see in the screen shot, there might be more than one dangling options which will introduce the gap along the bottom of the groups. I'll think about this some more. Maybe, because a group must have a legend all the spacing is top only? |
I kind of like a rule of marginTop only on our components, with the option to unset the margin. Mixing the two leads to scenarios where the margins collapse sometimes. We also can't predict what comes after an element, but we may have an opinion on what should come before. |
032de42
to
5ecc5e2
Compare
🦋 Changeset detectedLatest commit: 658c408 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
5ecc5e2
to
5d2d3f0
Compare
5d2d3f0
to
91efe4b
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.
Really nice changes and improvements. Mostly nits.
74c4fff
to
f374024
Compare
f374024
to
04f0181
Compare
- Adjust the vertical spacing on inline control group items, so that we don't leave space below last child item - Remove the unused value prop and it's prop types
Radio Group was inheriting the interface from inline control group which doesn't actually use value. So explicitly declare value just for Radio Group
04f0181
to
658c408
Compare
Taking over from #941
Using stack to create the spacing and general tidy up. Also adding stories to verify no regressions.