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

feat(layoutProps): add ColumnLayoutProps to ControlUISchema #94

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

shiplet
Copy link
Contributor

@shiplet shiplet commented Sep 13, 2024

We need the column spacing to be a bit more flexible in horizontal layouts.

This introduces a ColumnLayoutProps and layoutProps interface that allows for the specification of column widths on individual HorizontalLayout elements.

Without layoutProps
without-layoutProps

With layoutProps
with-layoutProps

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.85%. Comparing base (6f852f8) to head (570d262).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   74.70%   74.85%   +0.15%     
==========================================
  Files          38       38              
  Lines         502      505       +3     
  Branches       94       96       +2     
==========================================
+ Hits          375      378       +3     
  Misses         90       90              
  Partials       37       37              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shiplet shiplet requested a review from DrewHoo September 13, 2024 22:19
Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

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

It's hard to wrap my mind around how this works. Can you add a story to HorizontalLayout.stories.tsx?

@shiplet shiplet force-pushed the f/_/add-layout-props branch from 5abbe66 to cee2245 Compare September 16, 2024 15:41
@shiplet
Copy link
Contributor Author

shiplet commented Sep 16, 2024

@NathanFarmer It's really more of a change to the Control definition, so I added an "empty" layoutProps to each of our Control UISchemas in the stories. I also attached screenshots to the initial PR description showing it in use as well.

@shiplet shiplet force-pushed the f/_/add-layout-props branch from cee2245 to 3ddf1f2 Compare September 16, 2024 15:52
@shiplet shiplet force-pushed the f/_/add-layout-props branch from 3ddf1f2 to 570d262 Compare September 16, 2024 16:14
Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

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

How does this work with multiple columns? That's what I wasn't quite understanding and was expecting to see in the story.

Also, is layoutProps: { columns: undefined } now required, or did you add them everywhere to make it clear that it's an available prop? If it's required, I would think that it's a breaking change.

Do you intend for this PR to trigger release? If so your PR title should follow conventional commit syntax.

package.json Show resolved Hide resolved
@shiplet shiplet changed the title add ColumnLayoutProps to ControlUISchema feat(layoutProps): add ColumnLayoutProps to ControlUISchema Sep 16, 2024
Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

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

Approved based on synchronous conversation

@shiplet shiplet merged commit ac66ef2 into main Sep 16, 2024
4 of 5 checks passed
@shiplet shiplet deleted the f/_/add-layout-props branch September 16, 2024 17:23
Copy link

🎉 This PR is included in version 1.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants