[PR #2980] [MERGED] Expandable commit bodies #16693

Closed
opened 2025-11-02 12:16:31 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2980
Author: @sondr3
Created: 11/26/2017
Status: Merged
Merged: 11/30/2017
Merged by: @lunny

Base: masterHead: commit-message


📝 Commits (10+)

  • f4a48d2 Initial working state of expandable commit bodies
  • 67fde4d Fix all commits having showing button for multiline commits
  • 524f957 Refactor checking multiline messages method
  • 053cc1d Force newlines with
    in commit body
  • 7afb927 Show multiple lines in the list view of repositories
  • 23b92b8 Fixed proper newlines and minor refactor
  • 7f25cd8 Fix commit list messages jumping around
  • 65e6a19 Fix indentation in view_list.tmpl
  • ed572c2 Use vertical-align: baseline instead of top
  • 3767880 Refactor commit button toggle function

📊 Changes

7 files changed (+53 additions, -5 deletions)

View changed files

📝 modules/templates/helper.go (+27 -2)
📝 public/css/index.css (+1 -1)
📝 public/js/index.js (+4 -0)
📝 public/less/_repository.less (+8 -0)
📝 templates/repo/commits_table.tmpl (+5 -1)
📝 templates/repo/diff/page.tmpl (+3 -0)
📝 templates/repo/view_list.tmpl (+5 -1)

📄 Description

UPDATE: Here is how it looks right now:

e5998be9e0d7352e72b44f2918ce2f2a
f48f9d6f52849b35644d0b53791b964d

Original post

I've taken some time to try to work on some kind of solution to the expandable commit message bodies that was talked about in #2939 and #2944, but trying to make it work like it does on GitHub and GitLab. It is however a very rough work in progress as I've never programmed in Go before nor have I much experience with JQuery.

There are several issues with this right now:

  • It shows the expand button for every commit, even if it's not required.
  • The commit bodies doesn't expand properly, the text get squished together in one line and I'm not sure how to display it over several lines
  • There's quite a bit of code duplication going on with the commit bodies

I'd like a helping hand with this to figure out how to best solve it, as I'm not a Go programmer.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2980 **Author:** [@sondr3](https://github.com/sondr3) **Created:** 11/26/2017 **Status:** ✅ Merged **Merged:** 11/30/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `commit-message` --- ### 📝 Commits (10+) - [`f4a48d2`](https://github.com/go-gitea/gitea/commit/f4a48d2f1bd6209371bb10b2c016cb06fcdbe2c5) Initial working state of expandable commit bodies - [`67fde4d`](https://github.com/go-gitea/gitea/commit/67fde4d3c9f486404e1740c9016c624e781e300c) Fix all commits having showing button for multiline commits - [`524f957`](https://github.com/go-gitea/gitea/commit/524f957c33ee1a72f87935b027c5ca56483e6926) Refactor checking multiline messages method - [`053cc1d`](https://github.com/go-gitea/gitea/commit/053cc1d79a4345bf5e98e12189210bd8429c2ea5) Force newlines with <br> in commit body - [`7afb927`](https://github.com/go-gitea/gitea/commit/7afb927f04624308edde9bb77b724369a73e0662) Show multiple lines in the list view of repositories - [`23b92b8`](https://github.com/go-gitea/gitea/commit/23b92b82f7fa5fe891d6e99a9e81a9a5d06a12fa) Fixed proper newlines and minor refactor - [`7f25cd8`](https://github.com/go-gitea/gitea/commit/7f25cd8c9fb7b0625cf0d64f79bc27108e6dd9ef) Fix commit list messages jumping around - [`65e6a19`](https://github.com/go-gitea/gitea/commit/65e6a19f826b2380b20a46540028f33b61313279) Fix indentation in view_list.tmpl - [`ed572c2`](https://github.com/go-gitea/gitea/commit/ed572c26072b24b7ea084c2baf82f3a41be27f85) Use vertical-align: baseline instead of top - [`3767880`](https://github.com/go-gitea/gitea/commit/3767880f57f0a8685138c7e3bf62d039abb3bff7) Refactor commit button toggle function ### 📊 Changes **7 files changed** (+53 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `modules/templates/helper.go` (+27 -2) 📝 `public/css/index.css` (+1 -1) 📝 `public/js/index.js` (+4 -0) 📝 `public/less/_repository.less` (+8 -0) 📝 `templates/repo/commits_table.tmpl` (+5 -1) 📝 `templates/repo/diff/page.tmpl` (+3 -0) 📝 `templates/repo/view_list.tmpl` (+5 -1) </details> ### 📄 Description ## UPDATE: Here is how it looks right now: ![e5998be9e0d7352e72b44f2918ce2f2a](https://user-images.githubusercontent.com/2280539/33277630-62b2ff3a-d399-11e7-8aaf-10df49e0e149.gif) ![f48f9d6f52849b35644d0b53791b964d](https://user-images.githubusercontent.com/2280539/33277631-62cd0cae-d399-11e7-839a-d8763a425cf3.gif) ## Original post I've taken some time to try to work on some kind of solution to the expandable commit message bodies that was talked about in #2939 and #2944, but trying to make it work like it does on GitHub and GitLab. It is however a very rough work in progress as I've never programmed in Go before nor have I much experience with JQuery. There are several issues with this right now: - ~It shows the expand button for every commit, even if it's not required.~ - ~The commit bodies doesn't expand properly, the text get squished together in one line and I'm not sure how to display it over several lines~ - ~There's quite a bit of code duplication going on with the commit bodies~ I'd like a helping hand with this to figure out how to best solve it, as I'm not a Go programmer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:16:31 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16693