Cleanup, better handling for multiline comments in full commit view

This commit is contained in:
Andrii V 2026-02-16 12:45:08 +01:00
parent cb7f116e22
commit 93d4bc5120
2 changed files with 13 additions and 3 deletions

View file

@ -514,6 +514,10 @@ table.trending_language_tbl {
padding-right: 0;
cursor: pointer;
width: 20px;
&.open {
vertical-align: top;
}
}
}
}

View file

@ -107,8 +107,12 @@ var CommitsController = function () {
$('#graph_nodes').css({'padding-top': padding});
$.each($('.message.truncate'), function(idx, value) {
if(!(value.offsetWidth < value.scrollWidth)){
var expandTd = $(this).closest('td').siblings('.expand_commit');
// Skip expanded commits — their overflow is visible so width comparison is invalid
if (expandTd.hasClass('open')) {
return;
}
if(!(value.offsetWidth < value.scrollWidth)){
expandTd.find('i').hide();
expandTd.removeAttr('title');
expandTd.removeClass('expand_commit');
@ -176,7 +180,8 @@ var CommitsController = function () {
'height': '1.5em',
'white-space': 'nowrap',
'text-overflow': 'ellipsis',
'overflow': 'hidden'
'overflow': 'hidden',
'overflow-wrap': 'normal'
});
$('#t-' + cid).css({
'height': 'auto',
@ -192,7 +197,8 @@ var CommitsController = function () {
'height': 'auto',
'white-space': 'pre-line',
'text-overflow': 'initial',
'overflow': 'visible'
'overflow': 'visible',
'overflow-wrap': 'break-word'
});
$('#t-' + cid).css({
'height': 'auto',