Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/294701

Change subject: Split off basic styles from the JavaScript module 
'mediawiki.action.history'
......................................................................

Split off basic styles from the JavaScript module 'mediawiki.action.history'

The .updatedmarker element is now styled for users without JavaScript,
and doesn't have a flash of unstyled content for users with it.

Bug: T137383
Change-Id: I362abacf51160a8305b2b0013f65e89deb2ffc93
---
M includes/actions/HistoryAction.php
M resources/Resources.php
M resources/src/mediawiki.action/mediawiki.action.history.css
A resources/src/mediawiki.action/mediawiki.action.history.styles.css
4 files changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/294701/1

diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index 5ec10e6..63fe97b 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -116,6 +116,7 @@
                // Setup page variables.
                $out->setFeedAppendQuery( 'action=history' );
                $out->addModules( 'mediawiki.action.history' );
+               $out->addModuleStyles( 'mediawiki.action.history.styles' );
                if ( $config->get( 'UseMediaWikiUIEverywhere' ) ) {
                        $out = $this->getOutput();
                        $out->addModuleStyles( [
diff --git a/resources/Resources.php b/resources/Resources.php
index 150b8d3..a7eab7b 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1464,10 +1464,13 @@
                ],
        ],
        'mediawiki.action.history' => [
-               'position' => 'top',
                'scripts' => 
'resources/src/mediawiki.action/mediawiki.action.history.js',
                'styles' => 
'resources/src/mediawiki.action/mediawiki.action.history.css',
        ],
+       'mediawiki.action.history.styles' => [
+               'position' => 'top',
+               'styles' => 
'resources/src/mediawiki.action/mediawiki.action.history.styles.css',
+       ],
        'mediawiki.action.history.diff' => [
                'position' => 'top',
                'styles' => [
diff --git a/resources/src/mediawiki.action/mediawiki.action.history.css 
b/resources/src/mediawiki.action/mediawiki.action.history.css
index 95e92ae..fd5dbc9 100644
--- a/resources/src/mediawiki.action/mediawiki.action.history.css
+++ b/resources/src/mediawiki.action/mediawiki.action.history.css
@@ -1,8 +1,6 @@
+/* Styles for the JavaScript enhancements of the history page */
+
 #pagehistory li.before input[name="oldid"],
 #pagehistory li.after input[name="diff"] {
        visibility: hidden;
-}
-
-.updatedmarker {
-       background-color: #b7f430;
 }
diff --git a/resources/src/mediawiki.action/mediawiki.action.history.styles.css 
b/resources/src/mediawiki.action/mediawiki.action.history.styles.css
new file mode 100644
index 0000000..269db8e
--- /dev/null
+++ b/resources/src/mediawiki.action/mediawiki.action.history.styles.css
@@ -0,0 +1,5 @@
+/* Basic styles for the history page */
+
+.updatedmarker {
+       background-color: #b7f430;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/294701
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I362abacf51160a8305b2b0013f65e89deb2ffc93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to