storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Filter and search components by tag

Open kharrop opened this issue 4 years ago • 12 comments

Is your feature request related to a problem? Please describe. Right now, there isn't a way to filter or search through filtered items in the left navigation. While searching is available to find a specific component, it searches through all available components.

Describe the solution you'd like I would like the ability to filter AND search filtered options based on tag.

For example, the tag could be used to filter components by platform. I imagine by default, it would be set to show all components - but if I want to see just components that support Android, I could select that filter to only show me Android components. For a design system that supports different platforms, this means it's not possible to just see components that are Android, iOS, or web.

When selecting an Android-only component, the viewport should show me a view corresponding to Android. When selecting a component that only supports a web component, I should not be able to toggle my view to a mobile view.

Basically, at a glance, I should be able to see what components are supported based on platform.

Describe alternatives you've considered

  • A separate Storybook per tag (messy, duplicate documentation)
  • Using the default SB hierarchy and duplicate components based on tag (makes left nav very long, hard to read)

Are you able to assist bring the feature to reality? Yes

Additional context I would love to be able to filter the left nav like this: https://backpack.github.io/components/accordion/?platform=web

kharrop avatar Aug 07 '19 19:08 kharrop

I wonder if this could be made slightly more generic and filter by tag rather than an explicit platform, but I'd really like to see an expansion of the search/filter capabilities!

adierkens avatar Aug 07 '19 19:08 adierkens

Agreed, being able to filter in some sort of generic pattern would be helpful.

tylerkrupicka avatar Aug 07 '19 20:08 tylerkrupicka

Related: https://github.com/storybookjs/storybook/issues/6483

I could have sworn there was already an issue for this, but I can't find it. I'd love to add this kind of UI to Storybook! cc @domyen

shilman avatar Aug 08 '19 01:08 shilman

@shilman I notice that searching by parameters.notes (as mentioned in #6483 ) has been removed in storybook@next. This is actually quite a useful workaround but I appreciate is a bit of a hack. So any progress on filtering/searching by tags is a thumbs up from me.

tgreyuk avatar Oct 21 '20 10:10 tgreyuk

Cc @ghengeveld

shilman avatar Oct 21 '20 10:10 shilman

Снимок экрана 2021-01-15 в 3 47 21

It's a very important issue for non-english speaking users.
For example: I want to find the Icon component by typing Icon, but it's not possible now, because my title is Иконка.

monolithed avatar Jan 15 '21 00:01 monolithed

Currently, it looks like the fields that are indexed for search (name and path) are hard-coded here. I'd love to see that become configurable.

TrevorBurnham avatar Aug 04 '21 13:08 TrevorBurnham

I don't think it'll become configurable, but we're definitely keen to improve on it with well-defined features such as tags. Configurable things are a huge pain in the long term because of unknown potential conflicts down the road.

ghengeveld avatar Aug 04 '21 17:08 ghengeveld

+1 this is going to be super useful for discovery

sysofwan avatar Nov 16 '21 22:11 sysofwan

+1 It is a crucial feature for large storybooks with a lot of content.

anjulgarg avatar Nov 29 '21 19:11 anjulgarg

+1 we need this

jigz avatar Jan 27 '22 16:01 jigz

+1 Really in need of this.

sohamnandi77 avatar Sep 14 '22 12:09 sohamnandi77