forgejo_backup/templates/repo/diff
Lucas Schwiderski 3a986d282f Implement single-commit PR review flow (#7155)
This implements the UI controls and information displays necessary to allow reviewing pull requests by stepping through commits individually.

Notable changes:

- Within the PR page, commit links now stay in the PR context by navigating to `{owner}/{repo}/pulls/{id}/commits/{sha}`
- When showing a single commit in the "Files changed" tab, the commit header containing commit message and metadata is displayed
  - I dropped the existing buttons, since they make less sense to me in the PR context
  - The SHA links to the separate, dedicated commit view
- "Previous"/"Next" buttons have been added to that header to allow stepping through commits
- Reviews can be submitted in "single commit" view

Talking points:

- The "Showing only changes from" banner made sense when that view was limited (e.g. review submit was disabled). Now that it's on par with the "all commits" view, and visually distinct due to the commit header, this banner could potentially be dropped.

Closes: #5670 #5126 #5671 #2281 #8084

![image](/attachments/cff441dc-a080-42f8-86ae-9b80490761bf)

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [x] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7155
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-06-17 09:31:50 +02:00
..
blob_excerpt.tmpl Fix the wrong line number in the diff view page when expanded twice. (#31431) 2024-06-23 12:48:08 +02:00
box.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
comment_form.tmpl fix: no notification for replies to pending comments (#7167) 2025-03-09 15:07:12 +00:00
comment_form_datahandler.tmpl Make sure fmt catches all templates (#20979) 2022-08-31 23:58:54 +08:00
comments.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
compare.tmpl ui: improve branch/tag dropdown selector consistency (#7187) 2025-03-13 18:11:01 +00:00
conversation.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
conversations.tmpl [BUG] split code conversations in diff tab (#2306) 2024-02-16 12:16:11 +00:00
csv_diff.tmpl Fix CSV diff for added/deleted files (#21189) 2022-09-17 10:45:32 +08:00
escape_title.tmpl cleanup locale function usage (#27227) 2023-09-24 20:31:58 +00:00
image_diff.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
new_comment.tmpl Do not reload page after adding comments in Pull Request reviews (#13877) 2021-01-08 23:49:55 +02:00
new_review.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
options_dropdown.tmpl Remove DiffFileList component 2025-01-19 18:56:18 +01:00
section_code.tmpl Add template linting via djlint (#25212) 2023-06-14 18:17:58 +00:00
section_split.tmpl Fix incorrect "blob excerpt" link when comparing files (#31013) 2024-05-24 10:08:24 +02:00
section_unified.tmpl Fix incorrect "blob excerpt" link when comparing files (#31013) 2024-05-24 10:08:24 +02:00
stats.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
whitespace_dropdown.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00