-
Notifications
You must be signed in to change notification settings - Fork 4
feat: allows configure to consider parent folder name in queries #9
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
base: main
Are you sure you want to change the base?
feat: allows configure to consider parent folder name in queries #9
Conversation
Hey @cristianoliveira , thanks for the input and sorry for the late reply. I've been quite busy recently. This looks interesting. I do not have this use case for myself, but it does make sense and I could imagine more people who organize it this way. If it's non breaking (people without such a structure can still use it like now), I do not see a problem in applying this change. I'll take a deeper look within the next days (probably monday). Thanks for the unit tests also. Makes total sense and I have not gotten into that here, so it's great to a first part. Awesome. In the meantime (if you have not already), you can fork and then just use your fork as repo. I'll keep you updated here once there is news to share (and you'll see it anyway if I merge). Thanks again and have a nice week 💪🏼 |
Hey @pascalbe-dev keeping backwards compatibility makes sense! I was thinking to add a configuration to apply this behaviour |
Summary: This commit adds a feature to filter bookmarks by folder structure during search queries Detailed Changes: - BrowserBookmarks.py: - Modified `BookmarkQuerier` instantiation to include a `filter_by_folders` parameter from preferences. - manifest.json: - Added a new setting `filter_by_folders` with select options for enabling/disabling folder filtering. - querier/BookmarkQuerier.py: - Updated `BookmarkQuerier` class to accept `filter_by_folders` parameter and modify search behavior accordingly. - tests/test_bookmark_querier.py: - Split tests into separate classes for when `filter_by_folders` is enabled and disabled. Added new test cases to ensure correct functionality when the filter is applied. (cherry picked from commit 11c62fc)
Added a new setting |
2f4ea67
to
82f94a5
Compare
54f8bd7
to
6e806ad
Compare
Hello there 👋
I took the liberty to implement a feature that was missing when filtering bookmarks. Usually I organize my bookmarks in folders like
projects
,tools
, etc and when querying the bookmarks I had to query by their exact name. I wanted to filter them but "pre filtered" by the parent name first.Like this:
I should be able to query by
tutorial
and receive both suggestions, as well as, query byadvanced tutorial
and receive only one (see the unit tests)I'm not sure if this is align with the direction of the plugin, feel free to close the PR if it isn't
Extra
I also added some tests and a Makefile to run then with
make test