chromaui / addon-visual-tests

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

Clear the filter when removing the sidebar toggle button #120

Closed tmeasday closed 11 months ago

tmeasday commented 11 months ago

It was possible to filter the sidebar, then change branch (or run another build) so that the button disappears but the filter remains active (so you can no longer clear it!). This change means that the filter will reset whenever the filter goes away (whenever the story book state has no warnings).

In theory there might be situations where this happens for a brief moment, but it doesn't seem to happen in my testing.

To QA

  1. Pick a branch where the latest build has changes (or make one)
  2. Turn on the filter
  3. Switch to a branch where there are no changes on the latest build (e.g. main).
  4. The filter should turn off and all stories should be visible.
linear[bot] commented 11 months ago
AP-3683 Possible to filter out all stories with no way to disable

1. Run a build with changes 2. Turn on filter 3. Run a new build without changes You'll see (no stories, but note no button to disable the filter): [image.png](https://uploads.linear.app/cfa7d1b1-ff77-4dbe-ae92-8cf23f92a7a9/b6316218-cbc5-4559-97d2-9dfa11b629f6/b8214760-2091-48f7-9a7d-ea2371936852)