Hello Prismic team
My name is Vitor and I'm one of the front-end engineers at getcircuit.com. We are using Slice Machine to manage our website UI and so far the experience has been pretty good.
However, now that we have 20+ slices with a few variations each, things are starting to get a little chaotic.
To bring back some order -- and to leverage the fact that Slice Machine is Storybook-based -- we decided to use Chromatic as a UI diff tool. That way we can know very quickly if a certain layout broke or changed in ways it shouldn't.
Here's an example where I changed a slice's padding-top, you can see that Chromatic caught that difference on our slice.
However, there's a problem with slice mocks. They get regenerated whenever a slice is edited and that triggers false-positive diffs where only the mock has changed.
To prevent that I tried manually editing the slice stories manually but they also get regenerated on slice edit.
And to add to my confusion, mocks seem to come in three different files: .slicemachine/mock-config.json
, .slicemachine/assets/slices/[MySlice]/mocks.json
and the story file.
With all the being said, my question is: is there a way to completely disable automatic mock regeneration? Otherwise, I'll have to manually edit the slice stories to the mock I want and manually dismiss the regenerated changes every time I have to edit a slice.