-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 BaseField
#32250
components: Add BaseField
#32250
Conversation
Size Change: -822 kB (-44%) 🎉 Total Size: 1.03 MB
ℹ️ View Unchanged
|
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.
Not really sure how to test it as it's mostly styles so there's a snapshot test that encodes the styles that are rendered
- What about adding more snapshot tests when individual props are passed (
error
,isFocused
,isInline
)? - Should there be a Storybook entry for this component too?
51f1140
to
665d323
Compare
2f0fb48
to
ab7d26a
Compare
Also noting that some snapshot tests are failing |
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.
Apart from this last comment, this PR looks good — especially given the fact that this component is only internal and marked as experimental.
LGTM 🚀
Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
packages/components/src/base-field/test/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
Now it LGTM and it also builds successfully :) |
Description
Adds a
BaseField
primitive internal (non-exported) component. This component, as the README says, is mostly to be used as a hook by other primitive field components (like TextInput, which will come after this one).How has this been tested?
This has been tested live in the G2 repository. Not really sure how to test it as it's mostly styles so there's a snapshot test that encodes the styles that are rendered 🤷♀️ It's pretty weak though. I think the best way to test this is as part of another component in Storybook but that's not possible until those other components exist!
Types of changes
New feature.
Checklist:
*.native.js
files for terms that need renaming or removal).