Page MenuHomePhorge

Implement "Locate File" input in Browse view
Closed, ResolvedPublic

Assigned To
Authored By
bekay
Sep 26 2023, 07:03
Referenced Files
F358320: image.png
Sep 26 2023, 07:03
F358318: image.png
Sep 26 2023, 07:03
F358316: image.png
Sep 26 2023, 07:03
Tokens
"Like" token, awarded by speck.

Description

In Diffusion, there is the very nice "Locate File" input. The problem with it is: It is hard to reach, especially when switching branches. For me, it goes like this:

  1. I switch the branch:
    image.png (157×314 px, 6 KB)
  2. I am very confused, why I can't locate a file:
    image.png (348×774 px, 15 KB)
  3. I have to click there to get to the "homepage" of the branch:
    image.png (378×529 px, 16 KB)

That is a bad user experience. I think, there should always be a "Locate File" input when browsing files. So the input should be implemented in the browse view. And it should be directory sensitive. If I am browsing a directory, It should only show files in that directory and sub directories.

Event Timeline

bekay triaged this task as Normal priority.

Well, no opinions from the team. I still think this should be implemented... 😁

I wonder if under the hood this means "Add branch support to Locate File"

speck subscribed.

I’ve been meaning to investigate this. It also has thrown me that it’s not available where you expect it. I do suspect @valerio.bozzolan is right

Under the hood branches are already supported by the locate feature. The whole file tree is loaded via AJAX, when you first click in the input field. This tree represents the current selected branch.

@bekay while in this area of code would you have any pointers on these other issues I’d like to fix at some point?

  1. File browse widget doesn’t work unless logged in, for publicly accessible repos
  2. The search results pop up width is often too narrow to show the full results path, and truncates the end of the path instead of beginning.
In T15645#15201, @speck wrote:

@bekay while in this area of code would you have any pointers on these other issues I’d like to fix at some point?

  1. File browse widget doesn’t work unless logged in, for publicly accessible repos
  2. The search results pop up width is often too narrow to show the full results path, and truncates the end of the path instead of beginning.
  1. True... the problem is: the pathtree is created through the conduit API, which needs a user. A small stack trace:
  1. Well, the default case for typeahead results is: the result wrapper is as wide as the input field. With a small css hack this could be changed only for the locate input:
.diffusion-profile-locate #locate-input + .jx-typeahead-results {
  min-width: 100%;
  width: auto;
}

I have landed my solution.