-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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 FormSection component #34348
Add FormSection component #34348
Conversation
title="My form section" | ||
description="Some text to describe what this section covers" | ||
> | ||
<Card> |
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.
@louwie17 I removed the Card
styles and rely directly on the Card
component since some sections contain multiple cards within the content area, but let me know if you have any issue with this.
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, I always forget about the Card
component, relying on that makes much more sense.
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.
Nice work @joshuatf, simple and straight forward.
I think this is good to merge as is, with maybe a few iterations to come, referring to Slack and the possible addition of a link underneath the description and allowing for other items in the title as this screenshot shows:
Maybe we do want to follow the same format WCpay was using to accommodate for this by just passing a title
component in ( https://github.com/Automattic/woocommerce-payments/blob/cc6fa05c83cf38833c2e79bb8ee9af7be6c75659/client/settings/settings-section.js#L14 )
Otherwise I was thinking we could create a wrapper FormSectionTitle
component and pass that into the children, then filtering that out into the header section.
Similar to what Jacob did with the Split button approach.
title="My form section" | ||
description="Some text to describe what this section covers" | ||
> | ||
<Card> |
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, I always forget about the Card
component, relying on that makes much more sense.
Btw I think a rebase should fix the |
f7c86e6
to
887e349
Compare
@louwie17 Rebased and also updated the description/title to allow JSX elements and make this a bit more flexible. |
Test Results SummaryCommit SHA: 4a991d6
To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
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.
Rebased and also updated the description/title to allow JSX elements and make this a bit more flexible.
Awesome, thanks @joshuatf, this looks great!! LGTM 🚀
* trunk: Feature/review table list (#34393) Update Information Notice for No Products Found (#34362) Add product link field (#34313) Link backfilling to migration process (#34167) Restore 'Contributing to WooCommerce' guidance (#34380) Add FormSection component (#34348) Add SearchControl component (#34159) Update in-app marketplace to display localized strings (#34356) Update "Refund Returns" note to display localized strings (#34352) Added new command to set up the local environment with COT enabled. (#34321) Exclude asterisk from Country / Region translation string (#34368) add: store address tour tracks (#34337) Update inbox notes to display localized strings when locale changed (#34038) 6.8 changelog: Copy from release branch into trunk (#34365) add tests for shipping zone regions (#34339)
All Submissions:
Changes proposed in this Pull Request:
Adds a FormSection component for use in the product management layouts.
How to test the changes in this Pull Request:
npm run storybook
FormSection
componentOther information:
pnpm changelog add --filter=<project>
?FOR PR REVIEWER ONLY: