Giter Site home page Giter Site logo

Comments (4)

allmarkedup avatar allmarkedup commented on May 25, 2024 1

Hey @fredboyle @Spone, sorry for the ridiculously slow progress on this, life has been a bit mad recently.

I've had a bit of a play with adding in the full path lookup to the filter matching and testing it in a few projects. Even in really big nested directory structures it doesn't feel like it adds a lot of noise to the results at all. In fact it just feels a lot more intuitive - it should probably just have been like this all along!

So I've made the change and will get it out in the next release, hopefully today. I am not going to go down the route of adding a checkbox or config setting because honestly I think it's just better this way. @fredboyle thank you for prompting me to take another look at it :)

I'm wondering if we could try replicating the fuzzy-matching behavior of Github "go to file" feature or VS Code's Ctrl+P / "search file by name" feature. Maybe as a separate UI that opens a floating search bar at the top of the screen:

@Spone yeah that would be a nice addition, although would be more of a 'search' rather than a 'filter' (i.e. for finding one very specific item rather than just filtering out surrounding items) so I don't think it would be a direct replacement. But some sort of command/search box thing would be great in the future.

from lookbook.

allmarkedup avatar allmarkedup commented on May 25, 2024 1

This change has just been released in v2.1.0 so I'm going to go ahead and close this issue down. But if you run into any issues with it just let me know.

from lookbook.

allmarkedup avatar allmarkedup commented on May 25, 2024

Hey @fredboyle 👋

So, this is actually the intended behaviour :) The filter matches against scenario and preview labels (only), and then displays the tree of folders/modules down to those the matched previews/scenarios. The placeholder text "Filter previews by name..." is supposed to hint at that behaviour although I'm not sure it really helps much!

The idea behind this was to reduce the number of matches and so be able to filter quickly down to specific previews without lots of noise from matching path segments. This obviously works well if you have a specific preview/scenario name in mind, but if you are looking for a folder of previews then it doesn't work at all, which is clearly not great - and actually something I've personally been getting caught out with a lot recently too.

So whilst this isn't really a bug (from my point of view anyway) it's definitely something that could and should be improved. So there are a few options:

  1. Replace the existing filter behaviour with one that matches against path segments as well as preview/scenario names
  2. Provide a config setting to optionally include path segments in the filter
  3. Add a checkbox (or some other control) in the UI somewhere close to the filter box to allow users to toggle on/off the path matching behaviour

Options 2) and 3) would require deciding what should be the default setting.

I'm probably most in favour of option 3 personally (with the default to include path segments) but I'm going to do a bit of testing on a few of my projects to see how much additional 'noise' is actually generated with the path matching enabled - it was an assumption I made when first implementing the search without much evidence so it may well be that just keeping it simple and going with option 1 is actually fine.

I think some highlighting of the matched letters in the sidebar labels would also be nice although when I last had a stab at implementing that it proved to be a bit of a headache...

I'll have a bit of a play to see how best to improve the experience and let you know as/when I have something to test out. And if you have any other suggestions in the meantime just let me know :)

from lookbook.

Spone avatar Spone commented on May 25, 2024

I'm wondering if we could try replicating the fuzzy-matching behavior of Github "go to file" feature or VS Code's Ctrl+P / "search file by name" feature. Maybe as a separate UI that opens a floating search bar at the top of the screen:

image

I quite like being able to launch a search from a keyboard shortcut instead of having to click in a search box.

from lookbook.

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.