Creating chromatic baseline for fixing combobox to use useFormProps#2334
Conversation
ktabors
left a comment
There was a problem hiding this comment.
Need to review chromatic before this PR is ready.
| <Checkbox value="cats">Cats</Checkbox> | ||
| <Checkbox value="dragons">Dragons</Checkbox> | ||
| </CheckboxGroup> | ||
| <ColorField label="Primary Color" /> |
There was a problem hiding this comment.
May I refactor this to be one component of each type and in alphabetical order? Ditto the Provider update below.
There was a problem hiding this comment.
I mean, it's already mangling the chromatic story, so, i guess? Do be careful, form chromatic stories were already close to their maximum height
It falls into the same category as the other chromatic PR you have, we just need to do it in three steps very carefully
first run chromatic on main, make sure it's all green. then run it on this branch, make sure we're ok with everything. merge it, then run chromatic once more on main so we have the right baseline moving forward
There was a problem hiding this comment.
This sounds good. I was hoping that adding them at the end wouldn't cause too much chaos, but after reviewing, adding this many components makes the diff basically useless. :(
How do I tell what the max height is? Should the form stories be separated by categories like inputs and dropdowns?
| .add( | ||
| 'custom theme', | ||
| () => render({theme: THEME}) | ||
| ) |
There was a problem hiding this comment.
Should this file be refactored to use the new syntax?
There was a problem hiding this comment.
at some point yes, if it's not hard you can do it here, if it takes more than a few min, maybe do it on its own later
| } | ||
|
|
||
| function TextFieldBase(props: TextFieldBaseProps, ref: Ref<TextFieldRef>) { | ||
| props = useProviderProps(props); |
There was a problem hiding this comment.
why was useProviderProps removed here but not in SearchWithin? or should it be the other way around?
There was a problem hiding this comment.
In my exploration I found having useProviderProps here did nothing. And it was needed in SearchWithin for the props like isQuiet, isRequired, isDisabled, etc. It is needed in any components that inherit those from the Provider. I was annoyed that I couldn't move useProviderProps to Field too.
|
Build successful! 🎉 |
snowystinger
left a comment
There was a problem hiding this comment.
So it's occurred to me, we're doing code changes and chromatic changes together in this PR. They need to be split since they are modifications that will cause us to not get anything useful out of chromatic if kept together. Lets get the chromatic modifications out into their own PR, we'll merge that one, then we can merge the refactor of useFormProps
same plan as we did for the locale updates you were doing
#2351 has the code change, updating this to be chromatic and story updates |
|
Build successful! 🎉 |
LFDanLu
left a comment
There was a problem hiding this comment.
LGTM, should take special care when approving the chromatic diffs/new baseline for this however since this changes the order of the components in these stories
|
Can we keep the order of the form elements as they were before to minimize the visual diff for this? |
That was my plan, but I found that by adding components it makes keeping the order pointless. The form width is different with these other components and after the first iteration, all the variations clobber each other because the height of each form is longer. I found more value in them being alphabetical to make sure we have all the ones we want. |
|
ok sure. |
|
Build successful! 🎉 |
* main: Rename cards packages -> card Bump theme packages add rest of style props to action menu (#2374) Publish Add Autocomplete package (#2371) CardView followup patch (#2362) Creating chromatic baseline for fixing combobox to use useFormProps (#2334) Correcting Arabic translations of Loading and Loading more (#2359)
Closes #2323
Chromatic updates for #2351
Adding more from components to form and provider storybook and chromatic.
✅ Pull Request Checklist:
📝 Test Instructions:
Review the form stories
Review the provider stories
Run chromatic
🧢 Your Project:
RSP