Skip to content

Commit message description not hidden in commit reference links #5867

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

Closed
raucao opened this issue Jan 27, 2019 · 3 comments
Closed

Commit message description not hidden in commit reference links #5867

raucao opened this issue Jan 27, 2019 · 3 comments
Labels
issue/duplicate The issue has already been reported. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality

Comments

@raucao
Copy link

raucao commented Jan 27, 2019

  • Gitea version (or commit ref): 1.7.0

Description

When referencing an issue from a commit, the commit message that is rendered in the issue should only show the title (first line) by default, same as in other places, like e.g. the PR commit list.

Screenshots

Issue view

Description is added directly after title, and unformatted:

screenshot from 2019-01-27 16-29-32

PR commit index

The correct rendering:

screenshot from 2019-01-27 16-30-01

@lafriks lafriks added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI labels Jan 27, 2019
@petercolberg
Copy link
Contributor

Since Comment conveniently includes the commit hash in the CommitSHA field, what do you think of reusing RenderCommitMessage and optionally RenderCommitBody similar to the following?

<td class="message collapsing">
<span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
{{if IsMultilineCommitMessage .Message}}
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
{{template "repo/commit_status" .Status}}
</td>
(The Content field would contain the empty string instead of the current prerendered message.)

@lunny
Copy link
Member

lunny commented Feb 6, 2019

@petercolberg could you send a PR to fix that?

@adelowo
Copy link
Member

adelowo commented Feb 7, 2019

Duplicate of #3626

@lafriks lafriks closed this as completed Feb 8, 2019
@lafriks lafriks added the issue/duplicate The issue has already been reported. label Feb 8, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants