-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Add Search, move Add/Upload File, delete directory & "copy path" functionality to the repo's tree view UI #35911
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
base: main
Are you sure you want to change the base?
Conversation
3452673 to
1cf0812
Compare
ca8791e to
457f17f
Compare
f169aa3 to
809a645
Compare
|
You can do so in the main repo page in the code tab, same as to how its done on Github. Since I'm not aware of a way to view the root directory except for in the main repo page on the code tab (same on Github). Or perhaps I'm not understanding what you mean. |
809a645 to
0adcc74
Compare
4540d07 to
57782c3
Compare
Fixed
Moved. Should be more like Github's UX now: Screen.Recording.2025-11-13.at.14.04.46.mov |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry about that, I thought I had pushed my refactor of that. Updated. |
This comment was marked as resolved.
This comment was marked as resolved.
7d4a08c to
765fff3
Compare
…iew and apply patch ui improvements.
…vice with testing
765fff3 to
140c8cf
Compare
|
Rebased and had a look again with fresh eyes today. Debounced the search input and fixed an issue with scrolling while searching that I noticed. I've had a look through the changed lines and unless I've developed a blindspot to something in this PR I'm happy to sign off on it as is @wxiaoguang. |
|
Thank you for the updates. I've been very busy lately so I am not sure when I can get time to do a full review. Meanwhile other maintainers can also review. |
Thanks for your time on this. I appreciate it. I feel like we're pretty close here, maybe @silverwind? |
|
Any chance you could help out with a review here since you've got good context on it @wxiaoguang? Since we've lost momentum here for a week now, I'd appreciate the help. |
Did a quick test, it works but it doesn't look good to me.
And some of the code can be simplified to improve maintainability. If I have time, I could help to make more changes, but at the moment I don't and am not able to promise a predictable time. These concerns can also be considered as "nits", and I won't block if other maintainers approve and merge. |
| } | ||
|
|
||
| for _, e := range entries { | ||
| if !e.IsDir() && !e.IsSubModule() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why IsSubModule is skipped?
If submodule is not supported, either have a TODO comment, or fix the code to support it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured the dealing with .gitmodules entries would be very complex and would introduce a whole set of issues to deal with preventing leaving the repo in a broken state, especially given the scope of this PR. And I'll be honest I'm not sure I've got the knowledge to handle submodules on this project. I'll add a TODO.
Could you point me to the elements? Only found the repo-file-actions-dropdown button may have odd padding. |



/claim #35898
Resolves #35898
Summary of key changes:
Detailed breakdown:
1. Add search functionality to tree view
Added search to tree view using existing search
filterRepoFilesWeighted, with new modal to display the search results. User can navigate through search results using keyboard to scroll, select and escape the search on top of using mouse. No matches found notice when no results are found.Screen.Recording.2025-11-11.at.09.51.16.mov
2. Add backend functionality to delete directory
Modified the
DeleteFilePostendpoint to also allow for deletion of whole directories to support the "Delete directory" menu option added to the context menu.3. Add context menu for directories with functionality to copy path & delete a directory
Added context menu for "Copy path", "Copy Permalink" & "Delete directory" supported by backend change listed above.
Screen.Recording.2025-11-11.at.10.10.41.mov
4. Move Add/Upload file dropdown to right for parity with Github UI
Minor change to move this option to the right since already existed.
5. Add tree view to the edit/upload & patch UI