forgejo/templates/repo
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
..
actions feat(ui): Automatically refresh workflows in the "Actions" list (#7361) 2025-04-04 14:38:54 +00:00
branch fix: Remove "create branch" button on mirrored repos (#7640) 2025-05-14 23:26:12 +00:00
cite
code fix(ui): multiple fixes of sync fork UI (#7740) 2025-05-02 14:25:05 +00:00
diff Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
editor chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
find
graph Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
issue port(gitea): Retain issue/pull sort type (#8067) 2025-06-06 15:30:52 +02:00
migrate feat(ui): redesign migration selection screen (#6795) 2025-04-19 13:51:35 +00:00
projects
pulls
release fix: remove download attribute from external assets (#8112) 2025-06-09 10:48:35 +02:00
settings feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
tag fix: add missing bottom margin for verification-button in release view (#8044) 2025-06-03 08:55:22 +02:00
wiki Fix two missed null value checks on the wiki page. (#34205) 2025-04-22 10:04:41 +02:00
activity.tmpl
admin_flags.tmpl
blame.tmpl
branch_dropdown.tmpl fix(ui): show commit icon in branch dropdown button when viewing a commit (#7571) 2025-04-19 04:33:07 +00:00
clone_buttons.tmpl
clone_script.tmpl
code_frequency.tmpl
commit_header.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commit_load_branches_and_tags.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commit_page.tmpl chore: extract commit header template (#8061) 2025-06-05 11:35:08 +02:00
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commits_list_small.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
commits_search_dropdown.tmpl
commits_table.tmpl chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
contributors.tmpl
create.tmpl fix(ui): make limits clearer in create repo form (#7402) 2025-05-20 16:37:15 +02:00
create_advanced.tmpl
create_basic.tmpl fix(ui): make limits clearer in create repo form (#7402) 2025-05-20 16:37:15 +02:00
create_from_template.tmpl
create_helper.tmpl
create_init.tmpl
empty.tmpl fix(ui): clarify repo init instruction for sha256 (#7394) 2025-03-30 18:08:05 +00:00
file_info.tmpl
flags.tmpl
forks.tmpl
graph.tmpl fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
header.tmpl feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
header_fork.tmpl
home.tmpl feat(ui): make fork related banners more consistent (#7577) 2025-04-23 16:48:26 +00:00
icon.tmpl
latest_commit.tmpl Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
navbar.tmpl Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053) 2025-04-01 02:28:02 +02:00
packages.tmpl
pulse.tmpl chore(ui): cleanup unused color CSS (#7898) 2025-05-19 14:04:28 +02:00
recent_commits.tmpl
release_tag_header.tmpl
search.tmpl
search_name.tmpl
shabox.tmpl chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
shabox_badge.tmpl chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
star_unstar.tmpl
sub_menu.tmpl
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl fix(ui): ensure same width of usercards in grid (#6799) 2025-05-25 13:31:53 +02:00
view_file.tmpl fix(ui): change escaping button bg on selected lines (#7944) 2025-05-28 05:16:19 +02:00
view_list.tmpl
watch_unwatch.tmpl
watchers.tmpl