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] Fuzzy Search Results in Switch Requests (⌘P) Palette #739

Closed
roblav96 opened this issue Feb 4, 2018 · 7 comments
Closed
Labels
E-good-first-issue Experience required: Beginner / New

Comments

@roblav96
Copy link

roblav96 commented Feb 4, 2018

  • Insomnia Version: Version 5.12.4 (5.12.4.1752)
  • Operating System: OSX 10.11.5

Details

The Switch Requests palette should display fuzzy search results on request names, urls, and folder names; eg. Sublime Text. I recommend fuzzy for Array<Object> inputs and bevacqua/fuzzysearch for Array<string> inputs. Both provide bare minimum use cases. I would make a PR but for efficiency's sake I'm sure you would be able to implement this far quicker than me since you built this :D

@gschier
Copy link
Contributor

gschier commented Feb 8, 2018

Hey @roblav96, thanks for the request.

The request switcher already performs a fuzzy match, but only on request name. Adding folder as a prefix to match on seems like a great idea though 😄👍

It's true that I'd be able to implement this fairly quickly but it would end up taking a while because it's not at the top of the priority list. If you wanted to submit a PR for this I'd be happy to provide guidance if needed.

image

@gschier gschier added E-good-first-issue Experience required: Beginner / New Accepted labels Feb 9, 2018
@shawnaxsom
Copy link
Contributor

I would like to take a look at this one. I can take a look at this one maybe this weekend. I love Insomnia, but I was thinking the same thing. Definitely could use URL filtering. Might need better placeholder text to show fuzzy matching is allowed.

@shawnaxsom
Copy link
Contributor

Progress update. I have basic searching working for folders, URL, querystring, and method. You can search multiple fields by space delimiting the search.

https://github.com/axs221/insomnia/tree/feature/fuzzy-match-request-parameters

Still to do includes evaluating the UI aspect. As in those 3rd party libraries @roblav96 linked, we should consider showing what text is matched, including folder path.

I might split this into two and put up a first PR for discussion with @gschier and implement any UI tweaks in another PR. What I have now is usable, just not as user friendly. But we will need to determine how the UI will need to change to accommodate showing what parts of search matched, especially for fields not currently visible on the Quick Switch window (URL, grandparent folders, querystrings).

@gschier
Copy link
Contributor

gschier commented Mar 4, 2018

That sounds great @axs221. Early PR with what you have. Then we can discuss the rest 😀

@shawnaxsom
Copy link
Contributor

@gschier Sounds like a plan. ^--- Early PR is up! Let me know your thoughts when you get time.

@shawnaxsom
Copy link
Contributor

@roblav96 With #797, @gschier and I merged in some preliminary changes that will allow you to search on request names, urls, and folder names. There was some discussion in that PR around doing a second PR with UI changes, as I am assuming you originally intended.

This UI for Switch Requests is to be decided, but it will likely involve showing two rows for results, and it may show partial matching as those libraries can do. The difficulty may be in getting as much information as we want while keeping it to two rows. The second row may be showing just the field that it is matching against.

@shawn-pe
Copy link

shawn-pe commented Apr 9, 2018

@roblav96 @gschier I opened #857 to discuss the UI changes as @gschier requested, so we can close off this issue here. I will start playing with the UI and we can discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-good-first-issue Experience required: Beginner / New
Projects
None yet
Development

No branches or pull requests

4 participants