Skip to content
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

Use fuzzy selection in more places #346

Open
rcorre opened this issue Jan 1, 2020 · 1 comment
Open

Use fuzzy selection in more places #346

rcorre opened this issue Jan 1, 2020 · 1 comment

Comments

@rcorre
Copy link

rcorre commented Jan 1, 2020

Describe the project you are working on:

Applies to any project.

Describe the problem or limitation you are having in your project:

Assigning a Resource to an exported field in the editor is tedious.
For example, suppose I want to assign the sound shield_break.wav to an AudioStreamPlayer. I have two options:

  1. Click stream > Load, and click through multiple folders until I find the sound I need.
  2. Type a string like shield_b in the FileSystem tab, then click-and-drag that file into to stream field.

I propose that clicking Load on any Resource field should show a fuzzy selector that shows only files of the appropriate type (e.g. wav/ogg for an AudioStream). There are 3 examples of such selectors in the editor already:

  1. The FileSystem tab:

1577914739

  1. The Call Method selector for an AnimationPlayer:

1577915203

  1. The "Quick Open Scene" selector:

1577915171

I think the 3rd has the best behavior (it can filter by a non-continuous string, e.g. "lats" will select "lab.tscn"), however the first might be the easiest to leverage as it is already designed for the filesystem.

(Maybe a future proposal is to use the same matching logic across all of these)

Describe how this feature / enhancement will help you overcome this problem or limitation:

It will make selecting resources easier as it requires less clicks than navigating through folders, and avoids the click-and-drag aspect of using the FileSystem tab.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

  1. Click on [empty] and click load:

1577915642

  1. See one of the dialogs shown above, but filtered to files of the appropriate type
  2. Type into the search box, files are fuzzy-filtered
  3. Press Enter to select the file you want

Describe implementation detail for your proposal (in code), if possible:

When load is clicked, spawn one of the existing fuzzy selection dialogs populated with files of the correct type, then assign the result to the selected field.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

It will be used often, and I don't see an easy way to script it.

Is there a reason why this should be core and not an add-on in the asset library?:

I believe it will provide a superior user experience for everyone.

@rcorre
Copy link
Author

rcorre commented Jan 1, 2020

Also, if/when godotengine/godot#26162 is merged, this will provide a better experience for user-defined resources in the editor.

rcorre added a commit to rcorre/godot that referenced this issue Jul 8, 2020
When you click the "Load" button to populate a Resource field in the
inspector dock, the editor currently creates a file dialog. Navigating
through folders to find the file you want is tedious.

This replaces the file dialog with the same QuickOpen dialog used for
the "Quick Run" and "Quick Open" scene actions. The result list is
filtered to only resources of the appropriate type, and you can type
I find that this is much faster and more intuitive than the file dialog.

As far as I'm aware, the only "feature" you lose compared to the old
FileDialog is the ability to show all types of files by changing the
extension filter to "All Files" in the lower right. This seems like an
unnecessary feature anyways, as selecting a file that is not of the
appropriate resource type would just result in an error like so:

```
The selected resource (StreamTexture) does not match any type expected for this property (AudioStream).
```

Relates to godotengine/godot-proposals#346.
rcorre added a commit to rcorre/godot that referenced this issue Sep 15, 2021
When clicking on a resource field in the inspector dock, you now have
the "Quick Load" option in addition to "Load". This opens a QuickOpen
dialog allowing the user to type in a phrase to quickly locate the
desired resource (similar to "Quick Open Scene").

In my experience, this is much faster than clicking through the File
Dialog.

Relates to godotengine/godot-proposals#346.
rcorre added a commit to rcorre/godot that referenced this issue Sep 19, 2021
When clicking on a resource field in the inspector dock, you now have
the "Quick Load" option in addition to "Load". This opens a QuickOpen
dialog allowing the user to type in a phrase to quickly locate the
desired resource (similar to "Quick Open Scene").

In my experience, this is much faster than clicking through the File
Dialog.

Relates to godotengine/godot-proposals#346.
akien-mga pushed a commit to akien-mga/godot that referenced this issue Sep 21, 2021
When clicking on a resource field in the inspector dock, you now have
the "Quick Load" option in addition to "Load". This opens a QuickOpen
dialog allowing the user to type in a phrase to quickly locate the
desired resource (similar to "Quick Open Scene").

In my experience, this is much faster than clicking through the File
Dialog.

Relates to godotengine/godot-proposals#346.

(cherry picked from commit 470b94f)
sairam4123 pushed a commit to sairam4123/godot that referenced this issue Nov 10, 2021
When clicking on a resource field in the inspector dock, you now have
the "Quick Load" option in addition to "Load". This opens a QuickOpen
dialog allowing the user to type in a phrase to quickly locate the
desired resource (similar to "Quick Open Scene").

In my experience, this is much faster than clicking through the File
Dialog.

Relates to godotengine/godot-proposals#346.

(cherry picked from commit 470b94f)
lekoder pushed a commit to KoderaSoftwareUnlimited/godot that referenced this issue Dec 18, 2021
When clicking on a resource field in the inspector dock, you now have
the "Quick Load" option in addition to "Load". This opens a QuickOpen
dialog allowing the user to type in a phrase to quickly locate the
desired resource (similar to "Quick Open Scene").

In my experience, this is much faster than clicking through the File
Dialog.

Relates to godotengine/godot-proposals#346.

(cherry picked from commit 470b94f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants