lookbook-hq / lookbook

A UI development environment for Ruby on Rails apps ✨
https://lookbook.build
MIT License
889 stars 91 forks source link

Ability to search within pages section #547

Closed cody-clio closed 10 months ago

cody-clio commented 10 months ago

Describe the solution you'd like

There is the ability to filter previews by name and would like to see the same behaviour for the pages section. Screenshot 2023-11-07 at 3 10 45 PM

allmarkedup commented 10 months ago

@cody-clio yes, this makes total sense. Also shouldn't be too difficult to implement unless I'm overlooking something. When I have a chance I'll have a bit of play and see if I can put something together.

allmarkedup commented 10 months ago

Just a note that I've added this functionality as part of this PR: https://github.com/ViewComponent/lookbook/pull/556 (See messages in #546 for more context.)

allmarkedup commented 10 months ago

Hey @cody-clio just a heads up that I've just released version 2.2.0 that has this functionality in it.

However I have changed the names of the config variables to enable/disable page and preview filters. The are now page_nav_filter and preview_nav_filter respectively (instead of page_search and preview_search.

I made the change because 'search' feels like too loaded a term - I didn't want people confused that this is a text search of some type. And if Lookbook has that one day then it could get confusing, so I felt the new config names were more descriptive.

Thanks again for the suggestions, I'm going to go ahead and close these issues down now but if you have any problems with the latest release just let me know.