Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/245596
Change subject: Move Flow DM population to the bottom
......................................................................
Move Flow DM population to the bottom
The dm should populate after the navigation widget (and all other
ui widgets) are constructed, so they respond to the 'add' event
on the board.
Bug: T115265
Change-Id: I23252ef30d079ba5361702a34b8d93af882fcde0
(cherry picked from commit 61488455fc42bed3f81812d06a9dcf6eec35b98c)
---
M modules/flow-initialize.js
1 file changed, 17 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/96/245596/1
diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index 93549ec..e6c8fab 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -99,21 +99,6 @@
// We shouldn't have to worry about 'remove', since by the time
we have filtering,
// orderedTopicIds should be gone.
- // Fall back to mw.flow.data, which was used until September
2015
- dataBlob = mw.config.get( 'wgFlowData' ) || ( mw.flow &&
mw.flow.data );
- if ( dataBlob && dataBlob.blocks ) {
- // Populate the rendered topics or topic (if we are in
a single-topic view)
- mw.flow.system.populateBoardTopicsFromJson(
dataBlob.blocks.topiclist || dataBlob.blocks.topic );
- // Populate header
- mw.flow.system.populateBoardDescriptionFromJson(
dataBlob.blocks.header || {} );
- // Populate the ToC topics
- if ( dataBlob.toc ) {
- mw.flow.system.populateBoardTopicsFromJson(
dataBlob.toc );
- }
- } else {
- mw.flow.system.populateBoardFromApi();
- }
-
// Initialize the old system to accept the default
// 'newest' order for the topic order widget
// Get the current default sort
@@ -430,6 +415,23 @@
return false;
} );
+ // Fall back to mw.flow.data, which was used until September
2015
+ // NOTICE: This block must be after the initialization of the
ui widgets so
+ // they can populate themselves according to the events.
+ dataBlob = mw.config.get( 'wgFlowData' ) || ( mw.flow &&
mw.flow.data );
+ if ( dataBlob && dataBlob.blocks ) {
+ // Populate the rendered topics or topic (if we are in
a single-topic view)
+ mw.flow.system.populateBoardTopicsFromJson(
dataBlob.blocks.topiclist || dataBlob.blocks.topic );
+ // Populate header
+ mw.flow.system.populateBoardDescriptionFromJson(
dataBlob.blocks.header || {} );
+ // Populate the ToC topics
+ if ( dataBlob.toc ) {
+ mw.flow.system.populateBoardTopicsFromJson(
dataBlob.toc );
+ }
+ } else {
+ mw.flow.system.populateBoardFromApi();
+ }
+
preloadTopic = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'topic' );
preloadContent = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'content' );
preloadFormat = OO.getProp( dataBlob, 'blocks', 'topiclist',
'submitted', 'format' );
--
To view, visit https://gerrit.wikimedia.org/r/245596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23252ef30d079ba5361702a34b8d93af882fcde0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.27.0-wmf.2
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits