Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Filter requests by folder, URI, method, query string #797
#739 - This fulfills at least some part of the issue. We may want to update the UI to display either what parts of text are matched, and/or show missing fields (e.g. add URL to the Quick Switch modal).
What does this PR do?
What is left to do or discuss on the relevant issues?
Example screenshots, gifs, or videos?
What code can others reuse?
Previously only Request Name was searched for in Quick Switch window. This adds support for searching Request URL and Method as well. A fuzzyMatchAll function has been added to be able to search different fields in any order, space delimited.
Responding to your comments in the PR description:
I agree, it's probably best to show as much as possible. Perhaps we could hide most things by default and only show them if they were part of the match?
I agree that the fuzzy search right now is probably too loose, specifically for the sidebar filter. For the request switcher, the current solution would probably be fine if results were sorted by best match like in Atom/Sublime/etc.
Oh, that's interesting. Like GitHub does with issues. I think labels are a great idea either way because we could add things like status:200, auth:Basic, content-type:json, etc.
@gschier Okay I updated the branch with the minor feedback from the PR, minus the items mentioned in
Is what is there so far worth merging, and then doing a second PR for the rest? Otherwise I should be able to get to the additional items in the next week or so.
* Quick Switch matching for Request URL and Method Previously only Request Name was searched for in Quick Switch window. This adds support for searching Request URL and Method as well. A fuzzyMatchAll function has been added to be able to search different fields in any order, space delimited. * Include request parameters in searchable fields * Allow searching requests by folder paths * More descriptive placeholder for Quick Switch modal search input * Update sidebar filter to match Quick Switch, allowing URL and Query String matching * More descriptive placeholder for sidebar search * Unit tests for fuzzyMatch and fuzzyMatchAll * More unit tests for fuzzyMatch and fuzzyMatchAll * minor refactorings