diff options
author | Jon Robson <jdlrobson@gmail.com> | 2022-01-19 11:44:51 -0800 |
---|---|---|
committer | VolkerE <volker.e@wikimedia.org> | 2022-01-20 22:28:21 +0000 |
commit | 6c67798d6cd1f932cc605c843670c2196f4b45b7 (patch) | |
tree | f551afd07d89168acf731a4e3ba192b75abd1234 /includes/changes/ChangesList.php | |
parent | 28664da30fe555ee6c857882121888dcd6ca0fee (diff) | |
download | mediawikicore-6c67798d6cd1f932cc605c843670c2196f4b45b7.tar.gz mediawikicore-6c67798d6cd1f932cc605c843670c2196f4b45b7.zip |
[ChangesList] Time element in ChangesList should be consistently named
Follow up to I0cba011f0ab8cb8fd59962b5eafb7650deefe841
This class is usually used for dates.
In Special:Contributions an additional class is used for times
so let's use that here.
This will be helpful for T219349
Change-Id: Ibd5cff5cc37bec8eb840d7f0479fcb4eb8346611
Diffstat (limited to 'includes/changes/ChangesList.php')
-rw-r--r-- | includes/changes/ChangesList.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index ebf2cec78b42..fd564d01a452 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -642,14 +642,18 @@ class ChangesList extends ContextSource { public function getTimestamp( $rc ) { // This uses the semi-colon separator unless there's a watchlist expiry date for the entry, // because in that case the timestamp is preceded by a clock icon. - // A space is important after mw-changeslist-separator--semicolon to make sure + // A space is important after `.mw-changeslist-separator--semicolon` to make sure // that whatever comes before it is distinguishable. // (Otherwise your have the text of titles pushing up against the timestamp) - // A specific element is used for this purpose as `mw-changeslist-date` is used in a variety + // A specific element is used for this purpose rather than styling `.mw-changeslist-date` + // as the `.mw-changeslist-date` class is used in a variety // of other places with a different position and the information proceeding getTimestamp can vary. + // The `.mw-changeslist-time` class allows us to distinguish from `.mw-changeslist-date` elements that + // contain the full date (month, year) and adds consistency with Special:Contributions + // and other pages. $separatorClass = $rc->watchlistExpiry ? 'mw-changeslist-separator' : 'mw-changeslist-separator--semicolon'; return Html::element( 'span', [ 'class' => $separatorClass ] ) . ' ' . - '<span class="mw-changeslist-date">' . + '<span class="mw-changeslist-date mw-changeslist-time">' . htmlspecialchars( $this->getLanguage()->userTime( $rc->mAttribs['rc_timestamp'], $this->getUser() |