X Tutup
Skip to content

Show file when FileSystem is searched with UID#102789

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
KoBeWi:navigUIDe_to_path
Dec 16, 2025
Merged

Show file when FileSystem is searched with UID#102789
akien-mga merged 1 commit intogodotengine:masterfrom
KoBeWi:navigUIDe_to_path

Conversation

@KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Feb 12, 2025

Closes godotengine/godot-proposals#10737

Entering a UID in FileSystem's filter will navigate to that UID:

godot.windows.editor.dev.x86_64_qxMh0V1SCE.mp4

At first I wanted to search the file, but the dock does not support finding by full path.

@KoBeWi KoBeWi added this to the 4.x milestone Feb 12, 2025
@KoBeWi KoBeWi requested a review from a team February 12, 2025 22:02
@Ryan-000
Copy link
Contributor

Is there a reason this didn't make it into 4.5, given #99094 landed and this complements that UX?

I’ve cherry-picked it into my build, and it still works well, would love to see it in 4.5.1.

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 16, 2025

It was likely overlooked. I forgot I made this tbh 😅

@Mickeon
Copy link
Member

Mickeon commented Sep 30, 2025

It feels a bit overly specific that you have to enter the exact UID of a given resource. I'd personally expect the search to find the resource based on early matches. For example, writing uid://dct2 would lead to the first resource that matches, in the video uid://dct2slt82u81f.

On one hand, I understand. This process may potentially be too slow, as the string representation is not how UIDs are stored.
On the other hand, one can't always expect the user to have the UID ready to be copy-pasted. In some cases it may be more convenient to write it out. The more characters are written, the more likely an exact match is to be found.

It doesn't help that, in this PR, an invalid UID causes the search to silently fail, with no way of knowing. A typical file search would at least show no file matches in the results, but because this PR navigates to the file result, nothing happens.

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 30, 2025

On the other hand, one can't always expect the user to have the UID ready to be copy-pasted.

Well, this feature does expect it. It's meant for quick lookup, currently there is no way to do that, other than using EditorScript.
And yeah, partial match is unfeasible. Even if it turns out fast enough, just thinking about what it does internally is a big NO xd

It doesn't help that, in this PR, an invalid UID causes the search to silently fail, with no way of knowing.

If nothing gets selected, I think it's enough indicator that the UID is not found 🤔

@ajreckof
Copy link
Member

ajreckof commented Sep 30, 2025

I think quick lookup would be better as a commandclick on the string itself. For now it opens the resource on the right side it could easily focus it on fileSystem at the same time.

I feel like the search bar is not the right place for it as it used otherwise as a filter not a quick lookup. I would prefer something like partial match with filtering on that meaning you would only see the ones that have uids corresponding.

But I see how this could be a nightmare as there is a mix of string and ints

Edit : I just realised there is a button for just that in the tooltip then I4m wondering when you would have the uid ready to copy but not have access to the tooltip?

@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 30, 2025

I think quick lookup would be better as a commandclick on the string itself.

That only works in script editor. What about Output or UIDs copied from external sources? (e.g. a history file from a plugin)

@superhighlevel
Copy link

Is any chance this PR will be in 4.6? I've seen some progression about the caching and storing the UIDs

@akien-mga akien-mga modified the milestones: 4.x, 4.6 Dec 16, 2025
@akien-mga akien-mga merged commit 9b5e8f9 into godotengine:master Dec 16, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the navigUIDe_to_path branch December 16, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Ability to Search for UIDs in FileSystem Search Bar

6 participants

X Tutup