Fix diff of large descriptions

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-11-09 17:21:36 +01:00
parent 3c706c8009
commit 644c64aa4b
2 changed files with 7 additions and 1 deletions

View File

@@ -8,6 +8,11 @@
text-decoration: none;
}
.activitymessage .visualdiff {
overflow: scroll;
max-height: 200px;
}
.activityTabView .avatardiv-container {
display: inline-block;
bottom: -3px;

View File

@@ -276,7 +276,8 @@ class DeckProvider implements IProvider {
private function parseParamForChanges($subjectParams, $params, $event) {
if (array_key_exists('diff', $subjectParams) && $subjectParams['diff']) {
$diff = new Diff();
$event->setMessage($subjectParams['after']);
// Don't add diff as message since we are limited to 255 chars here
//$event->setMessage($subjectParams['after']);
$event->setParsedMessage('<pre class="visualdiff">' . $diff->render($subjectParams['before'], $subjectParams['after']) . '</pre>');
return $params;
}