Page MenuHomePhabricator

Use localBasePath for PagelistWidget
Closed, ResolvedPublic

Description

Currently, when we need to import a new file in PagelistWidget using the ResourceLoader configuration (extension.json) we need to write something like,

extension.json
diff --git a/extension.json b/extension.json
index 64143ae..45f794b 100644
--- a/extension.json
+++ b/extension.json
@@ -162,7 +162,8 @@
                                "index.pagelist/PagelistInputWidget.VisualFormPanel.js",
                                "index.pagelist/PagelistInputWidget.TopPanel.js",
                                "index.pagelist/PagelistInputWidget.PageNumberInputWidget.js",
-                               "index.pagelist/PagelistInputWidget.Parameters.js"
+                               "index.pagelist/PagelistInputWidget.Parameters.js",
+                               "index.pagelist/<name_of_file>.js"
                        ],
                        "messages": [
                                "proofreadpage-pagelist-dialog-cancel",

If we use the "localBasePath" for "ext.proofreadpage.index.pagelist" directive, we can omit the index.pagelist/ which currently needs to be added for every file.

Documentation

Event Timeline

Change 675313 had a related patch set uploaded (by Yash9265; author: Yash9265):
[mediawiki/extensions/ProofreadPage@master] Added a localBasePath for PagelistWidget

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

Change 675313 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Added a localBasePath for PagelistWidget

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