[PATCH] repository 'latest changes': truncate first line to avoid table bleed
Mads Kiilerich
mads at kiilerich.com
Thu Feb 19 11:01:22 EST 2015
On 02/19/2015 01:36 PM, Thomas De Schampheleire wrote:
> For commit messages with the first line being very long, the 'latest changes'
> table on the repository overview page can 'bleed', so that the commit number
> overlaps with the commit status.
>
> Commit 15cb8156b10d732cf39b37a88c656894621c0f54 changed the initial truncate
> on 50 characters to a chop at the first newline characters.
> In this commit, re-add a truncation of the first line, at 120 characters.
Wouldn't it be better to do that truncation in css, setting some max
width of the column and hide overflow?
The 120 seems a bit arbitrary and closely related to the actual styling
of the page (and screen size).
2nd thought after having a closer look, and reproduced it by making the
browser window very narrow:
The root cause of this seems to be that our templates / styling has an
annoying addiction to 'float'.
The right fix would be to do something to this
changeset-status-container. Perhaps give it is own table column ... or
at least set a min width on the changeset column ... or give the pre
with the hash a margin-right:25px .
/Mads
>
> diff --git a/kallithea/templates/changelog/changelog_summary_data.html b/kallithea/templates/changelog/changelog_summary_data.html
> --- a/kallithea/templates/changelog/changelog_summary_data.html
> +++ b/kallithea/templates/changelog/changelog_summary_data.html
> @@ -38,7 +38,7 @@
> </div>
> </td>
> <td>
> - ${h.urlify_commit(h.chop_at(cs.message,'\n'),c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
> + ${h.urlify_commit(h.truncate(h.chop_at(cs.message,'\n'), 120), c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
> </td>
> <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}">
> ${h.age(cs.date)}</span>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
More information about the kallithea-general
mailing list