reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
455 stars 85 forks source link

Several improvements for the Resource window #1119

Open StephanRoemer opened 5 years ago

StephanRoemer commented 5 years ago

In the GIF above, I would have expected that entering "sym" and "soft" would only return the "SYM Strings Sus Extra Soft" patch.

nofishonfriday commented 5 years ago

The search field does not work as expected. When you enter two key words, the results don't get narrowed down. Sometimes even the opposite is the case and you see more results than with only one keyword.

That's because the keywords are OR'ed. results = keyword1 OR keyword2...

I've added supporting AND keyword (like in Reaper's action list) / plugin list filter), so if you type sym AND soft it should now only show result "SYM Strings Sus Extra Soft".

edit: see below

StephanRoemer commented 5 years ago

Thanks nofish, this works as expected! Thanks so much!

Just a little detail: would it be possible to make AND work as default mode (without the need to type it)? That's how the action list works as well. AND is default and if we need OR, we can type it.

nofishonfriday commented 5 years ago

Thanks for testing and reporting back.

About making AND default, hm.. I fear someone will complain about changing existing behaviour then. :P I'll think about it...

StephanRoemer commented 5 years ago

Hmm maybe you could make it an option (checkbox) to select the default behavior?

StephanRoemer commented 5 years ago

On the other hand, I can't think of any default behavior where adding several words would result in an OR search. Even the Media Explorer has AND as default. Just as general thought. Maybe it would be more consistent to apply the same behavior to the resources window.

nofishonfriday commented 5 years ago

On the other hand, I can't think of any default behavior where adding several words would result in an OR search. Even the Media Explorer has AND as default. Just as general thought. Maybe it would be more consistent to apply the same behavior to the resources window.

On further thought, agreed. :) cfillion has a nicely working filter (which I think defaults to AND as should be) implemented in ReaPack, maybe we can reuse that at some point.

StephanRoemer commented 5 years ago

That would be awesome! :)

X-Raym commented 4 years ago

@nofishonfriday Hi ! How this has been implemented ? It is only OR filter for now.

About making AND default, hm.. I fear someone will complain about changing existing behavior then. :P

Actually I'm not sure people will complain. All other reaper fields are AND filters, so it is definitely the expected behavior. 😄 (or at least the expected behavior would been to have working filter with OR keyword support and NOT, like other reaper fields).

nofishonfriday commented 4 years ago

@X-Raym I revised the quoted statement one post later. :P https://github.com/reaper-oss/sws/issues/1119#issuecomment-493083501 Agreed with defaulting to AND. :) Currently it's still only OR though, right (no changes made yet).

@cfillion What do you think about reusing your ReaPack list filter implementation here?

cfillion commented 4 years ago

It depends on the C++11 stdlib so it cannot be used as-is on macOS < 10.7 (it also depends on boost but only for a to_lower function). Porting it to use non-smart pointers should be doable though.