[UI] Agit: Add link to docs and tooltip to label

Continuation of #2444, which introduced the commit
bf7fb89178 but only added
the label and the tests.

The tooltip explaining what AGit is and its advantages is not
meant to advertise AGit - it is meant to inform the reader that
is presumably not familiar with the workflow that they will not
be able to find a fork or a branch associated with the Pull Request
as a direct consequence of this workflow.

Issue #2474 mentions that we should show instructions on how to
fetch an AGit-created Pull Request, and this is the plan. However,
this may take time, so I might as well make the label a bit more
"complete" and less out-of-place for now if we do not manage to
improve these instructions until the next release (Forgejo v1.22).

Refs: https://codeberg.org/forgejo/forgejo/issues/2474
This commit is contained in:
Panagiotis "Ivory" Vasilopoulos 2024-02-27 13:35:21 +01:00 committed by Earl Warren
parent 6cbc64e0a5
commit 5bc7b8baf8
2 changed files with 10 additions and 5 deletions

View file

@ -1508,7 +1508,6 @@ issues.action_check_all = Check/Uncheck all items
issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a> issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a>
pulls.merged_by = by <a href="%[2]s">%[3]s</a> was merged %[1]s pulls.merged_by = by <a href="%[2]s">%[3]s</a> was merged %[1]s
pulls.merged_by_fake = by %[2]s was merged %[1]s pulls.merged_by_fake = by %[2]s was merged %[1]s
pulls.made_using_agit = AGit
issues.closed_by = by <a href="%[2]s">%[3]s</a> was closed %[1]s issues.closed_by = by <a href="%[2]s">%[3]s</a> was closed %[1]s
issues.opened_by_fake = opened %[1]s by %[2]s issues.opened_by_fake = opened %[1]s by %[2]s
issues.closed_by_fake = by %[2]s was closed %[1]s issues.closed_by_fake = by %[2]s was closed %[1]s
@ -1865,6 +1864,9 @@ pulls.clear_merge_message_hint = Clearing the merge message will only remove the
pulls.reopen_failed.head_branch = The pull request cannot be reopened, because the head branch doesn't exist anymore. pulls.reopen_failed.head_branch = The pull request cannot be reopened, because the head branch doesn't exist anymore.
pulls.reopen_failed.base_branch = The pull request cannot be reopened, because the base branch doesn't exist anymore. pulls.reopen_failed.base_branch = The pull request cannot be reopened, because the base branch doesn't exist anymore.
pulls.made_using_agit = AGit
pulls.agit_explanation = Created using the AGit workflow. AGit lets contributors propose changes using "git push" without creating a fork or a new branch.
pulls.auto_merge_button_when_succeed = (When checks succeed) pulls.auto_merge_button_when_succeed = (When checks succeed)
pulls.auto_merge_when_succeed = Auto merge when all checks succeed pulls.auto_merge_when_succeed = Auto merge when all checks succeed
pulls.auto_merge_newly_scheduled = The pull request was scheduled to merge when all checks succeed. pulls.auto_merge_newly_scheduled = The pull request was scheduled to merge when all checks succeed.

View file

@ -73,10 +73,13 @@
</span> </span>
{{end}} {{end}}
{{if .MadeUsingAGit}} {{if .MadeUsingAGit}}
{{/* TODO: Add tooltip and a link to the documentation */}} {{/* TODO: Move documentation link to the instructions at the bottom of the PR, show instructions when clicking label */}}
<span id="agit-label" class="ui small label"> {{/* Note: #agit-label is necessary for testing whether the label appears when it should in tests/integration/git_test.go */}}
<a target="_blank" rel="noopener" href="https://forgejo.org/docs/latest/user/agit-support/">
<span id="agit-label" data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.agit_explanation"}}" class="ui small label">
{{ctx.Locale.Tr "repo.pulls.made_using_agit"}} {{ctx.Locale.Tr "repo.pulls.made_using_agit"}}
</span> </span>
</a>
{{end}} {{end}}
<span id="pull-desc-edit" class="gt-hidden flex-text-block"> <span id="pull-desc-edit" class="gt-hidden flex-text-block">
<div class="ui floating filter dropdown"> <div class="ui floating filter dropdown">