Giter VIP home page Giter VIP logo

Comments (8)

Akryum avatar Akryum commented on August 11, 2024 1

Maybe we can investigate using lunr (or equivalent) and index pre-building to have a performant fuzzy search

from histoire.

Akryum avatar Akryum commented on August 11, 2024

I'm thinking it would be better to design a fully fledged search UX that we can iterate on.
My current idea is to have a search overlay similar to the VS Code or GitHub (ctrl+K) command palette.
image

Storybook integrates the search UX inside the sidebar:
image

But I don't think it would be a good solution for us as we have a two-columns layout for the variants by default:
image

Thinks we should make sure to do in the initial implementation:

  • We should restore the state of the search when bringing it up again
  • It should have a keyboard shortcut
  • It should be very fast
  • Selecting a search result (a story or a variant) or hitting [Enter] key should close the search and navigate to the corresponding page

from histoire.

hugoattal avatar hugoattal commented on August 11, 2024

I think both solution serves different purposes:

  • The modal based one allow quick access to a particular story
  • The filter based one allow quick access to a range of stories

The use-case I was thinking for the filter based one was if was working on some section of my web app and needed to focus on a few particular stories without being polluted by all the other ones.

I wasn't thinking of the Storybook implementation, but more like keeping the tree "as it" and hide unmatching stories.

Maybe doing both would be a good solution, wdyt?

from histoire.

Akryum avatar Akryum commented on August 11, 2024

I don't think having two different kinds of search is good. The search would effectively already filter the stories, and can work on the design to group results, for example:

  • Top result
  • Stories
  • Variants
  • Actions

If we think about the search/filtering use case, imo the user wants to open a specific variant, so imo it's better to focus on one UX for that and make it as good as possible.

from histoire.

Akryum avatar Akryum commented on August 11, 2024

I feel that if we have a very good search modal, an additional filtering field on the stories tree would be confusing and redundant.

from histoire.

Akryum avatar Akryum commented on August 11, 2024

When opening the search modal (search is empty), we can also offer to filter specific things, for example Stories or Variants.

from histoire.

hugoattal avatar hugoattal commented on August 11, 2024

Ok, let's keep the modal based one then 🙂 !

from histoire.

Akryum avatar Akryum commented on August 11, 2024

First version ready on main. We will open new issues for further iterations.

from histoire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.