Storybook: Story search not working as expected in SB5

Created on 7 Mar 2019  路  6Comments  路  Source: storybookjs/storybook

Describe the bug
As in previous versions, only those stories showed up which contained a part of the input text. Along with the text highlighted. Right now, I am not sure how the filtering is done as completely unrelated text still makes stories pass the filter, as shown in the screenshot:

To Reproduce

  1. Go to https://next--storybooks-official.netlify.com
  2. Click on 'Search input'
  3. Type trump or any unrelated string
  4. Stories whose titles don't match the string are showing up.
  5. Also text highlight from SB4 and less for matching text is missing.

Expected behavior

  • To see only those stories whose title match the string input.
  • To see the matching text highlighted.

Screenshots
image

System:

  • OS: Linux
  • Browser: Chrome
  • Framework: React
  • Version: 5.0.0
bug high priority ui

All 6 comments

@mohsinulhaq Hilarious example 馃槀

@ndelangen This is what we discussed around searching random fields that are not the story name/kind. I seriously propose we remove those extra fields until we have UI to show them.

I agree with @shilman that searching on random fields that do not show up is a bit confusing.. But, exactly what is going on here? Is this the fuzzy search being extra fuzzy? I can search for tistrumpisrr and still get those two. But not any random string.

We're currently using:
https://www.npmjs.com/package/fuzzy-search

Perhaps we need to switch to:
https://fusejs.io/

which seems to have more options for tweaking the desired fuzzyness

any update here?

@mohsinulhaq Any interest in taking this on?

ZOMG!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.14 containing PR #6244 that references this issue. Upgrade today to try it out!

Because it's a pre-release you can find it on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZigGreen picture ZigGreen  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

sakulstra picture sakulstra  路  3Comments

levithomason picture levithomason  路  3Comments

MrOrz picture MrOrz  路  3Comments