Consistently use classes for deleted items in lists of diffs
authorjdlrobson <jdlrobson@gmail.com>
Tue, 26 Mar 2019 16:30:35 +0000 (09:30 -0700)
committerVolkerE <volker.e@wikimedia.org>
Tue, 26 Mar 2019 23:04:51 +0000 (23:04 +0000)
Even if a revision has been deleted and the history-deleted class is
being used, the original class for its corresponding element when
not deleted should be applied. This is important as it allows skins
to skin consistently. "history-deleted" is a modifier class - it provides
further information on the original meaning.

This blocks styling the history page from core in Minerva skin

Bug: T216420
Change-Id: Ia659606838d7e38bc09054e36cd980b00f5e6da9

includes/Linker.php
includes/actions/pagers/HistoryPager.php

index ec3b245..df99556 100644 (file)
@@ -1093,7 +1093,7 @@ class Linker {
                        $link = wfMessage( 'rev-deleted-user' )->escaped();
                }
                if ( $rev->isDeleted( Revision::DELETED_USER ) ) {
-                       return ' <span class="history-deleted">' . $link . '</span>';
+                       return ' <span class="history-deleted mw-userlink">' . $link . '</span>';
                }
                return $link;
        }
@@ -1519,7 +1519,7 @@ class Linker {
                        $block = " <span class=\"comment\">" . wfMessage( 'rev-deleted-comment' )->escaped() . "</span>";
                }
                if ( $rev->isDeleted( Revision::DELETED_COMMENT ) ) {
-                       return " <span class=\"history-deleted\">$block</span>";
+                       return " <span class=\"history-deleted comment\">$block</span>";
                }
                return $block;
        }
index 9e4080d..b333372 100644 (file)
@@ -485,7 +485,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        $link = htmlspecialchars( $date );
                }
                if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
-                       $link = "<span class=\"history-deleted\">$link</span>";
+                       $link = "<span class=\"history-deleted mw-changeslist-date\">$link</span>";
                }
 
                return $link;