Hi, I was working on a kind of prototype for a feature request/suggestion.
This suggestion was made by my partner Lucia. She has some knowledge with Unity and is now beginning to use/learn the Godot Engine. She missed a filter system when searching for assets in the FileSystem Dock.
So, (currently) there are 2 types of filters in Unity:
t:Texture file-name) or (file-name t:Texture)¯\_(シ)_/¯Search by (Resource) Type is easy to implement, there is no compatibility issue or something else.
l:UI file-name) or (file-name l:UI).tscn, .import and .tres files but not in scripts files.Filters can be stackable (as in the GitHub issue search)
(t:Texture l:UI file-name)

So, I was working on the "Filter by resource type" because it seems useful and is "easy" to implement.
I also added a "Match case" option because it can also be useful.

I'm not going to open a PR because I'm still a beginner in C++, I'm actually using the Godot Engine project to study and improve my C++ knowledge :)
Some stuff are hard-coded, such as the Resource type list (I think it should be more interesting if the list is dynamically generated using all the resource types used in the current project).
By the way, in addition to choosing the type in the filter list you can also enter any valid built-in Resource type.
Feel free to check my fork and copy the code. (https://github.com/williamd1k0/godot/commit/af079ab2e9e3616ac42e30ce33404db795a6a2fd)
Also, as I'm still a beginner, I appreciate any kind of criticism and suggestions about the code :)
Thanks!
Wow that`s awesome! It will be really useful especially for bigger projects. It also allows a more flexible project structure, many devs I know still use folders like "scenes/" or "scripts/" or "sprites/" which imo is not a good practice. But with this we can structure everything in their own folder, e.g. "foo/" which contains "foo_sprite, foo_script, foo_sfx, foo_scene" and if a "project wide" search for specific resources is needed, we can use this filter.
I think you should do a PR straight forward, if there is something to fix, the reviewer will point out. I'd recommend just to implement, instead of a project-only resources, add all resources and let the user filter by them all, it can be confusing to have a new filter type everytime you add a new file with a new resource type, especially for usability, the list of filters will always change between projects depending on the resources the project use, so "muscle memory" will be throw away;
So, I still don't know exactly what would be more optimal, listing only the types used seems more interesting and simple.
Listing everything would be a problem because there are many types of resources in Godot. For example, if you export a variable that can be any type of Resource (export(Resource) var any_resource).

Another option would be to reuse the resource creation menu, which supports "recent" and "favorites".

(or both "list only the resource types used" and "open the resource creation menu").
I think you can pretty much sort them all "by inheritance complexity". E.g.:
All AudioEffect* inherit from AudioEffect so the filter shows only AudioEffect. Same for *Texture (AtlasTexture, CurveTexture, etc...) filter shows only Texture. In this sense, only first level of inheritance of Resource would be shown, any deeper level of the hierarchy is actually not much meaningful I guess.
The list is still big, there are some resources which, at least for me, seems to be meaningless in the actual gamedev context, most are Editor resources, like ShortCut, VisualScriptNode, ButtonGroup etc... but I think the exclusion of there will have to be hardcoded.
I would like to take the opportunity that Juan is dealing with some usability stuff to know his opinion about this one.
But I don't know if I have the powers to summon him here 🤔
I think all users have the mention feature so I'll going to try :laughing:
@reduz what are your thoughts?
Here is cool addon which allows to customize/filter results - https://github.com/zaevi/godot-filesystem-view

Most helpful comment
Wow that`s awesome! It will be really useful especially for bigger projects. It also allows a more flexible project structure, many devs I know still use folders like "scenes/" or "scripts/" or "sprites/" which imo is not a good practice. But with this we can structure everything in their own folder, e.g. "foo/" which contains "foo_sprite, foo_script, foo_sfx, foo_scene" and if a "project wide" search for specific resources is needed, we can use this filter.
I think you should do a PR straight forward, if there is something to fix, the reviewer will point out. I'd recommend just to implement, instead of a project-only resources, add all resources and let the user filter by them all, it can be confusing to have a new filter type everytime you add a new file with a new resource type, especially for usability, the list of filters will always change between projects depending on the resources the project use, so "muscle memory" will be throw away;