From 2336c514881794544230e58e2a47182302edf2ae Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 5 Aug 2019 12:08:57 -0700 Subject: [PATCH] Improve log entries display in change lists Log entries are wrapped with parenthesis - not hardcoded into HTML causing stray brackets in Minerva where this element is floated. Has no impact on other skins In addition to this the entire log entry item is wrapped in a new span mw-changeslist-log-entry to ensure the text is recognised as a whole entity - on Minerva floats were leading to the action and the action object being separated (e.g. uploaded and "File:Name were separated Bug: T229360 Change-Id: Idae997b15f68bb0dfcaa857f7458ba3497233d41 --- includes/changes/ChangesList.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 31b44430e8..5ced294bd2 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -451,9 +451,9 @@ class ChangesList extends ContextSource { public function insertLog( &$s, $title, $logtype ) { $page = new LogPage( $logtype ); $logname = $page->getName()->setContext( $this->getContext() )->text(); - $s .= $this->msg( 'parentheses' )->rawParams( - $this->linkRenderer->makeKnownLink( $title, $logname ) - )->escaped(); + $s .= Html::rawElement( 'span', [ + 'class' => 'mw-changeslist-links' + ], $this->linkRenderer->makeKnownLink( $title, $logname ) ); } /** @@ -605,7 +605,9 @@ class ChangesList extends ContextSource { $formatter->setShowUserToolLinks( true ); $mark = $this->getLanguage()->getDirMark(); - return $formatter->getActionText() . " $mark" . $formatter->getComment(); + return Html::openElement( 'span', [ 'class' => 'mw-changeslist-log-entry' ] ) + . $formatter->getActionText() . " $mark" . $formatter->getComment() + . Html::closeElement( 'span' ); } /** -- 2.20.1