Comments (8)
Maybe we can investigate using lunr (or equivalent) and index pre-building to have a performant fuzzy search
from histoire.
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.
Storybook integrates the search UX inside the sidebar:
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:
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.
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.
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.
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.
When opening the search modal (search is empty), we can also offer to filter specific things, for example Stories or Variants.
from histoire.
Ok, let's keep the modal based one then 🙂 !
from histoire.
First version ready on main
. We will open new issues for further iterations.
from histoire.
Related Issues (20)
- Suspense regression: Story now accept only one child HOT 2
- Tailwind config gets ignored HOT 1
- When using storyMatch in histoire.config, Sibling markdown are not imported
- `setupApp` in `VueStoryProps` interface is not equal to `Vue3StorySetupHandler` interface
- Can't render multiple controls without wrapping them in a container HOT 2
- ERR_PACKAGE_IMPORT_NOT_DEFINED Package import specifier "#build/paths.mjs" is not defined HOT 3
- Boolean breaks interface HOT 2
- histoire-plugin-nuxt: server api endpoints not working
- Releases are not published to npm HOT 2
- have the ability for histoire to work with nuxt content query content HOT 1
- have an ability to specify "base directory" HOT 2
- make nuxt module that allows it to run and build along side the main project
- Error [ERR_UNSUPPORTED_DIR_IMPORT] when trying to use `@heroicons/vue` with `histoire` HOT 6
- Bad character escape sequence, expected 4 hex characters
- Logo is not displaying HOT 1
- Nuxt3 + Vuetify nuxt module : Could not find defaults instance HOT 1
- Nuxt UI <ULink> generates an error HOT 1
- Bug with i18n and translation in component HOT 7
- Changes in `0.17.15` and `responsiveDisabled=true` lead to unexpected behavior HOT 1
- Vuetify button cannot be mounted on story with grid layout HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from histoire.