Details
- Reviewers
Campbell Barton (campbellbarton) - Group Reviewers
User Interface - Maniphest Tasks
- T83747: Search for add-ons does not include category
Diff Detail
- Repository
- rB Blender
Event Timeline
The category should only be searched when "All" categories are on display. For single categories this doesn't make much sense.
Exclude category from the search when category filter is not set to "All"
To me it appears natural if the search of "import" among the "import" addons returns all of them. Makes no sense for the user to do so, but it's imho an intuitive behaviour of filtering and searching on the same term.
On the other hand, if category is excluded from the search when a category filter is active, the behaviour of the search may be a bit inconsistent. For example, when searching for "import" with category filter - "All", it will find "3D-Coat Applink" and other import addons that don't have "import" in their names and descriptions. When performing the same search with category filter set to "Import-Export", those addons will not be displayed.
In any case this is a minor difference and is imho acceptable both ways. So changing the patch as requested.
Mostly fine, although I find the logic for these checks confusing.
if search and not ((search in ...) or (search in ...) or (search in ...)): continue
would reach much better.
Also, prefer not include description. We can easily add as part of separate patch.
| release/scripts/startup/bl_ui/space_userpref.py | ||
|---|---|---|
| 1854 | filter != "All" should be ordered first. Currently it's always searching the category even when this is disabled. | |
Symplified logical expression.
Removed description from the search.
Moved info["author"] and filter == "All" checks before the lookup in the author and category strings.