-
-
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
0adcc74 to
9266b9c
Compare
db8fc5a to
3ec69bf
Compare
2b608e7 to
4540d07
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 |
|
Ok, attempting the changes requested but concerned that PR is starting to go beyond scope. |
…iew and apply patch ui improvements.
41005b4 to
72d9f96
Compare
Sorry, I didn’t fully consider how the commit model would look after the change—it does become a bit awkward. I also noticed that deleting a file opens a popup window, but deleting a directory still redirects to a separate page. Could we update the delete directory action to use the same popup window approach for consistency? I think this should be the last feature request from me (though I still need to review the code). |
| @@ -0,0 +1,102 @@ | |||
| import $ from 'jquery'; | |||
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.
We use fomanticQuery instead of referencing jQuery directly. This helps prepare for removing jQuery in the future.
No, it shouldn't use a modal unless you can make the code/logic exactly the same as that page. The "deleting modal" in this PR is also incomplete. If you are not able to provide a feasible solution, just redirect all to the existing pages, but not keep adding unmaintainable "modals" |
|
Getting conflicting feedback, should I proceed with the modals or not? Maybe the modals are proving to be problematic? @lunny
Can I get clarification on which part is incomplete. @wxiaoguang |
It appears that GitHub redirects to a dedicated page with a left-side tree view and a complete list of files that will be deleted. In that case, please disregard my earlier request to move it to a popup dialog. |
You need to do your best to understand the problem and figure out what's the right thing to do, but not just follow the reviewer's suggestions that can be wrong.
Many, you can read the code to see more details, for example: fork-on-edit (why the form uses "TargetFormAction" but not the current one?), commit-email-selector (why there is "CommitCandidateEmails" and how it works?), etc. Blindly copying-pasting existing code only causes problems. |
|
Personally, I think switching to the modals for the commit form may have been an unnecessary change in this PR. They introduced complexity and I agree that the look is kind of awkward. Personally I think the existing approach was already a pretty solid solution. To switch to the modal approach needs more consideration both in design and implementation, which can be done in a separate issue. If we can roll back on the modal approach and no longer add feature requests, I can clean up the code better and wind this PR up. What do you think @lunny ? |




/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
6. Move "Commit changes" button to above the editor and the commit form into a modal for parity with Github's UX.
Screen.Recording.2025-11-13.at.14.04.46.mov
7. Move Delete file commit UI into a modal.
Screen.Recording.2025-11-15.at.12.57.06.mov
8. Remove redundant "Cancel" and repo name from Apply Patch breadcrumb UI