# HG changeset patch # User domruf # Date 1499111137 -7200 # Node ID 90282e66331383280129f89bc035ebcf9d11badd # Parent fa55523f37906302747faa0d1e885e3705e1c8ec changelog: avoid cutting off commit messages Split commit message into 2
elements: one with just the first line, and one with the full message. This makes it easier to handle the toggling of showing the whole commit message. This way, we no longer have to mess with the line height, and we avoid problems with cutting off parts of the text below the text baseline. Also stop cutting off the first line if it is too long for the table column. It adds a bit of overhead to store the first line twice, but having them separate make things simpler and is worth it. Patch modified by Mads Kiilerich. diff -r fa55523f3790 -r 90282e663313 kallithea/public/css/style.css --- a/kallithea/public/css/style.css Mon Aug 28 05:25:39 2017 +0200 +++ b/kallithea/public/css/style.css Mon Jul 03 21:45:37 2017 +0200 @@ -1510,10 +1510,9 @@ #graph_content tr td.mid .message, #graph_content_pr .compare_view_commits .message { - white-space: pre-wrap; + white-space: nowrap; padding: 0; overflow: hidden; - height: 1.2em; } #graph_content_pr .compare_view_commits .message { diff -r fa55523f3790 -r 90282e663313 kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html Mon Aug 28 05:25:39 2017 +0200 +++ b/kallithea/templates/changelog/changelog.html Mon Jul 03 21:45:37 2017 +0200 @@ -104,12 +104,16 @@
${h.age(cs.date,True)}
+ <% message_lines = cs.message.splitlines() %>
-
${h.urlify_text(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
+
+
${h.urlify_text(message_lines[0], c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
+ +