jenkins-bot has submitted this change and it was merged.
Change subject: position 'top' for ext.flow.discussion
......................................................................
position 'top' for ext.flow.discussion
This seems to help the flash of unstyled content when you view a Flow
board. (If necessary, `touch modules/discussion/init.js` to encourage
ResourceLoader to reload its cache.)
I had to change ext.flow.base.js to initialize mw.flow upon load instead
of later on document ready, because dependent parser and editor modules
access mw.flow upon load. It doesn't depend on or interact with the DOM,
so it doesn't need to be on document ready and clients may not expect
that API functions aren't available when this RL module is 'ready'.
The remaining FOUC I see is the flow header turning bold and dark gray.
TODO: think module loading through carefully, refactor so that only CSS
and JS that affects appearance of inital page from server is loaded
'top', maybe use addModuleStyles() for initial CSS applied to static
page HTML.
Change-Id: I79d57a9d6e77fba651a528116ef50ceb5ae82706
---
M Resources.php
M modules/base/ext.flow.base.js
2 files changed, 5 insertions(+), 2 deletions(-)
Approvals:
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Resources.php b/Resources.php
index fa996ba..59b7759 100644
--- a/Resources.php
+++ b/Resources.php
@@ -75,6 +75,7 @@
'flow-post-moderated-toggle-show',
'flow-post-moderated-toggle-hide',
),
+ 'position' => 'top',
),
'ext.flow.editor' => $flowResourceTemplate + array(
'scripts' => 'editor/ext.flow.editor.js',
diff --git a/modules/base/ext.flow.base.js b/modules/base/ext.flow.base.js
index 3af406b..7ad5242 100644
--- a/modules/base/ext.flow.base.js
+++ b/modules/base/ext.flow.base.js
@@ -1,6 +1,7 @@
( function ( $, mw ) {
-$( function () {
+
mw.flow = {
+
'api' : {
/**
* Execute a Flow action, fires API call.
@@ -213,6 +214,7 @@
}
};
+// Define some higher-level functions using mw.flow.api "primitives".
mw.flow.api.newTopic = mw.flow.api.generateBlockAction(
'topic_list',
'new-topic',
@@ -265,5 +267,5 @@
'prev_revision'
]
);
-} );
+
} )( jQuery, mediaWiki );
--
To view, visit https://gerrit.wikimedia.org/r/89370
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I79d57a9d6e77fba651a528116ef50ceb5ae82706
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits