You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The provided serializer currently allows us to define two options:
whether or not we want to add styling
a formatter function to transform SC classnames into something more readable
For the projects in our organisation, we would like to be able to fully strip the classNames in snapshots/storyshots. The c0 c1 don't have any added value to us and result into bloating our merge requests with meaningless changes; at worst causing unnecessary merge conflicts.
We could provide a classNameFormatter that returns null, this however leaves us with 1 whitespace per styled component class. I would like to open a PR to add a third option stripClasses which if set to true will call stripUnreferencedClassNames instead of replaceClassNames/replaceHashes. Nothing more nothing less.
For now we're using a custom package which is basically a dumbed down version of the jest-styled-components/serializerwith this feature added; but we would prefer to stick to the official tooling. Hence this feature request.
The text was updated successfully, but these errors were encountered:
Hi there,
The provided serializer currently allows us to define two options:
For the projects in our organisation, we would like to be able to fully strip the classNames in snapshots/storyshots. The
c0 c1
don't have any added value to us and result into bloating our merge requests with meaningless changes; at worst causing unnecessary merge conflicts.We could provide a classNameFormatter that returns null, this however leaves us with 1 whitespace per styled component class. I would like to open a PR to add a third option
stripClasses
which if set totrue
will callstripUnreferencedClassNames
instead ofreplaceClassNames/replaceHashes
. Nothing more nothing less.For now we're using a custom package which is basically a dumbed down version of the
jest-styled-components/serializer
with this feature added; but we would prefer to stick to the official tooling. Hence this feature request.The text was updated successfully, but these errors were encountered: