gitea/templates/repo/diff
Alexander McRae aba96f65cd
Use git diff-tree for DiffFileTree on diff pages (#33514)
Modify Diff View FileTree to show all files

## Changes

* removes Show Status button on diff
* uses `git diff-tree` to generate the file tree for the diff
* doesn't reload the diff tree each time we load more files in the
preview
* selecting and unloaded file will keep loading until that file is
loaded
* removes `DiffFileList.vue` and "Show Stats" in diff options

## Open Questions

* selecting and unloaded file will keep loading until that file is
loaded. Is this behaviour okay? It matches what github does.

### Demo

In this demo I set `git.MAX_GIT_DIFF_FILES=1` in my `app.ini` to
demonstrate a worst case example. In most cases the behaviour isn't
nearly as jarring as we load a bunch of files at a time.


https://github.com/user-attachments/assets/72f29663-d6fc-472d-94fa-7fb5950c2836

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-28 00:58:25 +00:00
..
blob_excerpt.tmpl Refactor tmpl and blob_excerpt (#32967) 2024-12-25 00:51:13 +08:00
box.tmpl Use git diff-tree for DiffFileTree on diff pages (#33514) 2025-02-28 00:58:25 +00:00
comment_form.tmpl Refactor markdown editor and use it for milestone description editor (#32688) 2024-12-04 02:11:34 +00:00
comment_form_datahandler.tmpl
comments.tmpl Hide/disable unusable UI elements when a repository is archived (#33459) 2025-01-31 20:47:31 +08:00
compare.tmpl Refactor pull-request compare&create page (#33071) 2025-01-02 01:16:09 +08:00
conversation.tmpl Improve mobile review ui (#31091) 2024-05-28 13:41:37 +00:00
conversation_outdated.tmpl Improve user experience for outdated comments (#29050) 2024-02-08 01:50:48 +00:00
csv_diff.tmpl
escape_title.tmpl Refactor tmpl and blob_excerpt (#32967) 2024-12-25 00:51:13 +08:00
image_diff.tmpl Refactor image diff (#31444) 2024-06-22 04:52:09 +00:00
new_comment.tmpl
new_review.tmpl Hide/disable unusable UI elements when a repository is archived (#33459) 2025-01-31 20:47:31 +08:00
options_dropdown.tmpl Use git diff-tree for DiffFileTree on diff pages (#33514) 2025-02-28 00:58:25 +00:00
section_code.tmpl Add template linting via djlint (#25212) 2023-06-14 18:17:58 +00:00
section_split.tmpl Refactor tmpl and blob_excerpt (#32967) 2024-12-25 00:51:13 +08:00
section_unified.tmpl De-emphasize signed commits (#31160) 2024-12-28 04:18:30 +08:00
stats.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-24 17:42:49 +01:00
whitespace_dropdown.tmpl code optimization (#31315) 2024-06-11 21:07:10 +08:00