-
Notifications
You must be signed in to change notification settings - Fork 26
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
Consider removing prop spreading from VRT output #875
Comments
I think it would be nice if we could just display the props we wanted in the VRT, instead of all of them or none of them. For instance, on this simple Toggled example, just pass the |
Yeah that would make sense as well. 👍 |
@jonnybel what should we do about this? |
Feels to me, out of the blue, like we could add a |
Currently, we can either omit all props with I'm not sure if it's worth to go through all VRTs and make them to use the filter. I guess we should try to use the filter when we refactor components and their VRT that show a diff in the props list, and also to newly added VRTs. And would it be worth to also have a |
Summary
Right now, we show all of the props of the direct child of a
Spec
in our visual regression tests.This leads to visual output like this.
Problems with this
While this was useful at the start for reviewing the initial baseline VRTs, it causes problems when we refactor our components. If you check this PR, you will see that we didn't make any changes to the props accepted by the component. All we did was remove a surrounding HOC around the component. However, the following visual diff showed up
Suggestion approach
Remove display of props, and use the
Spec label
to properly display the component state.The text was updated successfully, but these errors were encountered: