chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
31 stars 2 forks source link

Implement snapshot zooming and panning, sliding diff and blend-mode for diff overlay #151

Closed ghengeveld closed 5 months ago

ghengeveld commented 9 months ago

https://github.com/chromaui/addon-visual-tests/assets/321738/1b1249d1-ba1a-4061-89ed-536e9509d428

📦 Published PR as canary version: 0.0.123--canary.151.7ff0e88.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.123--canary.151.7ff0e88.0 # or yarn add @chromaui/addon-visual-tests@0.0.123--canary.151.7ff0e88.0 ```
domyen commented 8 months ago

I think this is really rad Gert.

General feedback It was tough to tell whether I was looking at the latest snapshot or the baseline snapshot on hover. It's made clear when you zoom in, but on the surface I wasn't sure what I was looking at.

Suggestion:

Feedback on line It was tough to tell what's happening on hover with the line because it seems to use the background color of the ground (white and dark respectively). This was confusing because I thought it may have been an UX artifact or bug.

Suggestion:

Feedback on diff blend mode I was confused by what the difference is between dark green and light green. So when I was moving my cursor left and right to reveal more UI, I couldn't tell what was different.

Suggestion:

MichaelArestad commented 8 months ago

@domyen I tried a higher contrast line in a prototype I worked up last week. Here's a quick video of it.

https://github.com/chromaui/addon-visual-tests/assets/1123119/4bd95fb0-8a81-4a44-82b9-9a27f706549b

@ghengeveld I agree with Dom that the line is hard to see. I would do something like this when the user clicks on the drag line:

image
domyen commented 8 months ago

That higher contrast grey line looks good to me @MichaelArestad

In Gert's demo, the interaction is on hover not drag (clicking zoom) so we wouldn't be able to see the blue like you have above. I suspect this is OK and you already know about that, but wanted to call it.

MichaelArestad commented 8 months ago

@domyen Yeah. Since we started talking about hover interactions like these (and the zooming), I got to thinking about them a bit more. Something about them doesn't sit quite right with me. It almost feels like I don't have full control over what I want to see. For example, when my cursor enters from one side or the other, the bar goes to where my cursor is, which isn't super useful or intentional. Also, I may want to leave it split a certain way which requires I exit the cursor area from the top or bottom. I know I prefer to click to drag because it feels like I'm in control of what I'm looking at. That said, I'm not overly opinionated on this quite yet and would like to see how others like it.

domyen commented 8 months ago

Yea that's fair re:not feeling in control over what I see. I think you articulated what I was responding to here:

It was tough to tell whether I was looking at the latest snapshot or the baseline snapshot on hover. It's made clear when you zoom in, but on the surface I wasn't sure what I was looking at.

I suspect it'd make sense behind a click like our other diff tools.