Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Searching by example name + Sorting examples by alphabetical name in sidebar #13

Closed
afomera opened this issue Jul 30, 2021 · 3 comments

Comments

@afomera
Copy link
Contributor

afomera commented Jul 30, 2021

Hi!

So I haven't pulled down the latest version and gotten it to boot yet, but... one thing that would be nice, is the ability to sort the examples within the sidebar folders by alphabetical name, I've found the names to end up going all over the place.

Another feature request we have is extending the sidebar search to support by example name as well.

For some more context, here's how we're thinking of setting up our examples:

CleanShot 2021-07-30 at 10 14 06@2x

and search has been mostly limited to the titles.

If y'all have a lot of components, how do you think of organizing the Lookbook examples? We have hundreds of components at @podia 😅, and are hoping to use Lookbook to help surface them to our team.

Additionally.... this is more of a bug, but I'm a little befuddled why the first item in my namespace Podia::UI:: always gets added to its own list. 😭 (We have a custom inflector to make Ui -> UI with Zeitwerk, but even renaming it, it tended to push it into a new list for the first item.

@allmarkedup
Copy link
Collaborator

Thanks for this @afomera - the navigation and search is definitely high up on the list of things to improve. There is another issue open with some rough thoughts on nav/search improvements, and including example titles in the filter is definitely one of them.

Looking at your example, It would also be nice to be able to specify where in the namespace to start the nav tree from (i.e. skip the Podia::UI part altogether). I'll add that to the list.

However quite why the first item ends up in its own list is an odd one - definitely a bug. I'll try to figure out why that might happen.

@allmarkedup
Copy link
Collaborator

Out of interest, would you want the examples for each preview sorted alphabetically too? My preference is to match the order I've defined them in the preview class, but that could quite easily be a configuration option.

@afomera
Copy link
Contributor Author

afomera commented Jul 30, 2021

Thanks @allmarkedup , sorry I missed that other issue. I'm sorta mixed, if it respected the order it was defined in the preview class that'd work (I may be wrong, but it doesn't seem to do this now), otherwise falling back to alphabetical order by example would be great imo, we can classify stuff ourselves that way.

TBH, we have a ton of namespaces (IE so Podia::UI is not the only one in the Podia tree), so I'm not sure if we'd want to use it, as our team has decided things in Podia::UI are 'dumb' base components we one day when we're a larger team may extract to a new gem, but have other folders and namespaces inside of them.

@allmarkedup allmarkedup modified the milestones: v0.2, v0.x Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants