Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/194938
Change subject: Hygiene: Make special pages group 'other'
......................................................................
Hygiene: Make special pages group 'other'
They should not be cached along side normal css
Remove a redundant position top property since module is added via
addModuleStyles
Change-Id: Iee48212e9282856a6e04ee7ebe5344224c5d60cc
---
M extension.json
M resources/Resources.php
2 files changed, 144 insertions(+), 16 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather
refs/changes/38/194938/1
diff --git a/extension.json b/extension.json
index 8283287..2f601a4 100644
--- a/extension.json
+++ b/extension.json
@@ -9,8 +9,14 @@
"descriptionmsg": "gather-desc",
"license-name": "GPL-2.0+",
"type": "other",
+ "ExtensionFunctions": [
+ "Gather\\Hooks::onExtensionSetup"
+ ],
"SpecialPages": {
"Gather": "Gather\\SpecialGather"
+ },
+ "APIModules": {
+ "gather": "Gather\\api\\CollectionsListApi"
},
"MessagesDirs": {
"Gather": [
@@ -29,8 +35,8 @@
"Gather\\models\\CollectionsList":
"includes/models/CollectionsList.php",
"Gather\\models\\WithImage": "includes/models/WithImage.php",
"Gather\\models\\ArraySerializable":
"includes/models/ArraySerializable.php",
- "Gather\\stores\\Collection": "includes/stores/Collection.php",
"Gather\\stores\\JSONPage": "includes/stores/JSONPage.php",
+ "Gather\\stores\\Collection": "includes/stores/Collection.php",
"Gather\\stores\\WatchlistCollection":
"includes/stores/WatchlistCollection.php",
"Gather\\stores\\CollectionStorage":
"includes/stores/CollectionStorage.php",
"Gather\\stores\\UserPageCollection":
"includes/stores/UserPageCollection.php",
@@ -64,39 +70,155 @@
}
}
},
- "ext.collections.styles": {
+ "ext.gather.styles": {
"targets": [
"mobile",
"desktop"
],
+ "group": "other",
"styles": [
"ext.gather.styles/collections.less"
+ ]
+ },
+ "ext.gather.watchstar.icons": {
+ "targets": [
+ "mobile",
+ "desktop"
+ ],
+ "class": "ResourceLoaderImageModule",
+ "prefix": "mw-ui",
+ "images": {
+ "icon": {
+ "tick-disabled:before":
"ext.gather.watchstar.icons/grey_check.svg",
+ "tick:before":
"ext.gather.watchstar.icons/green_check.svg"
+ }
+ }
+ },
+ "ext.gather.api": {
+ "targets": [
+ "mobile",
+ "desktop"
],
"dependencies": [
- "mediawiki.ui.anchor",
- "mediawiki.ui.icon",
- "ext.gather.icons"
+ "mobile.watchstar",
+ "mobile.editor.api"
],
- "position": "top",
- "group": "other"
+ "scripts": [
+ "ext.gather.watchstar/CollectionsApi.js"
+ ]
+ },
+ "ext.gather.watchstar": {
+ "targets": [
+ "mobile",
+ "desktop"
+ ],
+ "dependencies": [
+ "mobile.watchstar",
+ "ext.gather.api",
+ "mobile.contentOverlays",
+ "ext.gather.watchstar.icons"
+ ],
+ "styles": [
+ "ext.gather.watchstar/contentOverlay.less"
+ ],
+ "messages": [
+ "gather-add-to-existing",
+ "gather-watchlist-title",
+ "gather-add-toast",
+ "gather-remove-toast",
+ "gather-anon-cta",
+ "gather-collection-member",
+ "gather-create-new-button-label",
+ "gather-add-to-new",
+ "gather-collection-non-member"
+ ],
+ "templates": {
+ "content.hogan":
"ext.gather.watchstar/content.hogan"
+ },
+ "scripts": [
+
"ext.gather.watchstar/CollectionsContentOverlay.js",
+ "ext.gather.watchstar/CollectionsWatchstar.js",
+ "ext.gather.watchstar/init.js"
+ ]
+ },
+ "ext.gather.collection.editor": {
+ "targets": [
+ "mobile",
+ "desktop"
+ ],
+ "dependencies": [
+ "mobile.overlays",
+ "mobile.toast",
+ "ext.gather.api"
+ ],
+ "messages": [
+ "gather-edit-collection-label-name",
+ "gather-edit-collection-label-description",
+ "gather-edit-collection-label-privacy",
+ "gather-edit-collection-save-label"
+ ],
+ "templates": {
+ "content.hogan":
"ext.gather.collection.editor/content.hogan"
+ },
+ "scripts": [
+
"ext.gather.collection.editor/CollectionEditOverlay.js"
+ ],
+ "styles": [
+ "ext.gather.collection.editor/editOverlay.less"
+ ]
+ },
+ "ext.gather.special": {
+ "targets": [
+ "mobile",
+ "desktop"
+ ],
+ "group": "other",
+ "dependencies": [
+ "ext.gather.collection.editor"
+ ],
+ "scripts": [
+ "ext.gather.special/init.js"
+ ]
}
},
"ResourceFileModulePaths": {
"localBasePath": "resources",
- "remoteExtPath": "Gather"
+ "remoteExtPath": "Gather/resources"
},
"Hooks": {
- "SkinMinervaDefaultModules": [
- "Gather\\Hooks::onSkinMinervaDefaultModules"
- ],
"MobilePersonalTools": [
"Gather\\Hooks::onMobilePersonalTools"
+ ],
+ "UnitTestsList": [
+ "Gather\\Hooks::onUnitTestsList"
+ ],
+ "getUserPermissionsErrors": [
+ "Gather\\Hooks::onGetUserPermissionsErrors"
],
"ContentHandlerDefaultModelFor": [
"Gather\\Hooks::onContentHandlerDefaultModelFor"
],
+ "SkinMinervaDefaultModules": [
+ "Gather\\Hooks::onSkinMinervaDefaultModules"
+ ],
"MakeGlobalVariablesScript": [
"Gather\\Hooks::onMakeGlobalVariablesScript"
]
+ },
+ "config": {
+ "ResourceModuleSkinStyles": {
+ "vector": {
+ "localBasePath":
"/vagrant/mediawiki/extensions/Gather/resources",
+ "remoteExtPath": "Gather/resources",
+ "targets": [
+ "mobile",
+ "desktop"
+ ],
+ "group": "other",
+ "ext.gather.styles": [
+ "ext.gather.styles/vector.less"
+ ]
+ }
+ }
}
}
diff --git a/resources/Resources.php b/resources/Resources.php
index 8386e54..5e782d0 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -40,6 +40,13 @@
'targets' => array( 'mobile', 'desktop' ),
);
+/**
+ * A ResourceLoaderFileModule template for special pages
+ */
+$wgGatherMobileSpecialPageResourceBoilerplate =
$wgGatherResourceFileModuleBoilerplate + array(
+ 'group' => 'other',
+);
+
$wgResourceModules += array(
'ext.gather.icons' => $wgGatherResourceFileModuleBoilerplate + array(
@@ -54,12 +61,10 @@
),
),
- 'ext.gather.styles' => $wgGatherResourceFileModuleBoilerplate + array(
+ 'ext.gather.styles' => $wgGatherMobileSpecialPageResourceBoilerplate +
array(
'styles' => array(
'ext.gather.styles/collections.less',
),
- 'position' => 'top',
- 'group' => 'other',
),
'ext.gather.watchstar.icons' => $wgGatherResourceFileModuleBoilerplate
+ array(
@@ -138,7 +143,7 @@
),
),
- 'ext.gather.special' => $wgGatherResourceFileModuleBoilerplate + array(
+ 'ext.gather.special' => $wgGatherMobileSpecialPageResourceBoilerplate +
array(
'dependencies' => array(
'ext.gather.collection.editor',
),
@@ -149,7 +154,7 @@
);
-$wgResourceModuleSkinStyles['vector'] = $wgGatherResourceFileModuleBoilerplate
+ array(
+$wgResourceModuleSkinStyles['vector'] =
$wgGatherMobileSpecialPageResourceBoilerplate + array(
'ext.gather.styles' => array(
'ext.gather.styles/vector.less',
),
@@ -157,3 +162,4 @@
unset( $wgGatherResourceFileModuleBoilerplate );
unset( $wgGatherResourceBoilerplate );
+unset( $wgGatherMobileSpecialPageResourceBoilerplate );
--
To view, visit https://gerrit.wikimedia.org/r/194938
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee48212e9282856a6e04ee7ebe5344224c5d60cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits