2019-10-10 13:25:11 +00:00
|
|
|
{
|
|
|
|
"name": "DiscussionTools",
|
|
|
|
"license-name": "MIT",
|
|
|
|
"version": "0.0.0",
|
2019-12-11 23:52:40 +00:00
|
|
|
"url": "https://www.mediawiki.org/wiki/Extension:DiscussionTools",
|
2019-10-10 13:25:11 +00:00
|
|
|
"namemsg": "discussiontools",
|
|
|
|
"descriptionmsg": "discussiontools-desc",
|
2019-10-12 16:12:39 +00:00
|
|
|
"manifest_version": 2,
|
|
|
|
"requires": {
|
2019-10-12 15:59:18 +00:00
|
|
|
"MediaWiki": ">= 1.34.0",
|
|
|
|
"extensions": {
|
|
|
|
"VisualEditor": ">= 0.1.1"
|
|
|
|
}
|
2019-10-12 16:12:39 +00:00
|
|
|
},
|
2019-10-10 13:25:11 +00:00
|
|
|
"MessagesDirs": {
|
|
|
|
"DiscussionTools": [ "i18n" ]
|
|
|
|
},
|
2019-10-28 16:52:37 +00:00
|
|
|
"callback": "DiscussionToolsHooks::onRegistration",
|
2019-10-10 13:25:11 +00:00
|
|
|
"ResourceFileModulePaths": {
|
|
|
|
"localBasePath": "modules",
|
|
|
|
"remoteExtPath": "DiscussionTools/modules"
|
|
|
|
},
|
|
|
|
"ResourceModules": {
|
2019-10-23 12:44:49 +00:00
|
|
|
"ext.discussionTools.parser": {
|
2019-09-26 07:06:56 +00:00
|
|
|
"packageFiles": [
|
|
|
|
"parser.js",
|
2019-10-18 12:12:55 +00:00
|
|
|
"lib/moment-timezone/moment-timezone-with-data-1970-2030.js",
|
2019-09-26 07:06:56 +00:00
|
|
|
{
|
|
|
|
"name": "data.json",
|
2019-10-28 12:28:17 +00:00
|
|
|
"callback": "DiscussionToolsData::getLocalData"
|
2019-09-26 07:06:56 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"dependencies": [
|
2019-10-18 12:12:55 +00:00
|
|
|
"moment",
|
2019-09-26 07:06:56 +00:00
|
|
|
"mediawiki.util",
|
|
|
|
"mediawiki.Uri",
|
2019-10-23 12:44:49 +00:00
|
|
|
"mediawiki.Title"
|
|
|
|
]
|
|
|
|
},
|
2019-11-05 14:13:18 +00:00
|
|
|
"ext.discussionTools.modifier": {
|
|
|
|
"packageFiles": [
|
|
|
|
"modifier.js"
|
|
|
|
]
|
|
|
|
},
|
2019-11-05 13:55:01 +00:00
|
|
|
"ext.discussionTools.controller": {
|
|
|
|
"packageFiles": [
|
2019-11-05 14:07:50 +00:00
|
|
|
"controller.js",
|
|
|
|
{
|
|
|
|
"name": "config.json",
|
|
|
|
"config": {
|
|
|
|
"useVisualEditor": "DiscussionToolsUseVisualEditor"
|
|
|
|
}
|
|
|
|
}
|
2019-12-06 18:43:46 +00:00
|
|
|
],
|
2019-12-10 21:46:22 +00:00
|
|
|
"dependencies": [
|
|
|
|
"rangefix",
|
|
|
|
"ext.discussionTools.parser",
|
|
|
|
"ext.discussionTools.modifier"
|
|
|
|
],
|
2019-12-06 18:43:46 +00:00
|
|
|
"messages": [
|
|
|
|
"discussiontools-defaultsummary-reply",
|
|
|
|
"discussiontools-replylink",
|
|
|
|
"discussiontools-replywidget-loading"
|
2019-11-05 13:55:01 +00:00
|
|
|
]
|
|
|
|
},
|
2019-10-23 12:44:49 +00:00
|
|
|
"ext.discussionTools.init": {
|
|
|
|
"packageFiles": [
|
|
|
|
"dt.init.js"
|
|
|
|
],
|
2019-10-30 16:12:27 +00:00
|
|
|
"styles": "dt.init.less",
|
2019-10-23 12:44:49 +00:00
|
|
|
"dependencies": [
|
2019-10-24 14:38:31 +00:00
|
|
|
"mediawiki.Uri",
|
2019-11-05 13:55:01 +00:00
|
|
|
"ext.discussionTools.controller"
|
2019-10-24 14:38:31 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"ext.discussionTools.debug": {
|
|
|
|
"packageFiles": [
|
|
|
|
"dt.debug.js",
|
|
|
|
"highlighter.js"
|
|
|
|
],
|
|
|
|
"styles": "highlighter.css",
|
|
|
|
"dependencies": [
|
2019-10-23 12:44:49 +00:00
|
|
|
"ext.discussionTools.parser"
|
2019-09-26 07:06:56 +00:00
|
|
|
]
|
2019-11-05 14:07:50 +00:00
|
|
|
},
|
|
|
|
"ext.discussionTools.ReplyWidget": {
|
2019-12-10 21:46:22 +00:00
|
|
|
"packageFiles": [
|
2019-11-05 14:07:50 +00:00
|
|
|
"dt.ui.ReplyWidget.js"
|
|
|
|
],
|
2019-11-22 21:53:31 +00:00
|
|
|
"styles": [
|
|
|
|
"dt.ui.ReplyWidget.less"
|
|
|
|
],
|
2019-12-06 18:43:46 +00:00
|
|
|
"messages": [
|
2019-11-19 19:33:14 +00:00
|
|
|
"discussiontools-replywidget-anon-warning",
|
2019-12-06 18:43:46 +00:00
|
|
|
"discussiontools-replywidget-cancel",
|
2020-02-03 20:34:13 +00:00
|
|
|
"discussiontools-replywidget-preview",
|
2019-12-09 14:20:06 +00:00
|
|
|
"discussiontools-replywidget-reply",
|
|
|
|
"discussiontools-replywidget-terms-click"
|
2019-12-06 18:43:46 +00:00
|
|
|
],
|
2019-11-05 14:07:50 +00:00
|
|
|
"dependencies": [
|
2019-12-10 21:46:22 +00:00
|
|
|
"ext.discussionTools.controller",
|
2019-11-05 14:07:50 +00:00
|
|
|
"mediawiki.widgets.AbandonEditDialog"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"ext.discussionTools.ReplyWidgetPlain": {
|
|
|
|
"packageFiles": [
|
|
|
|
"dt.ui.ReplyWidgetPlain.js"
|
|
|
|
],
|
|
|
|
"dependencies": [
|
|
|
|
"ext.discussionTools.ReplyWidget",
|
2019-12-03 16:29:25 +00:00
|
|
|
"oojs-ui-core",
|
|
|
|
"mediawiki.editfont.styles",
|
2019-11-19 19:33:14 +00:00
|
|
|
"mediawiki.user",
|
2019-11-05 14:07:50 +00:00
|
|
|
"mediawiki.jqueryMsg"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"ext.discussionTools.ReplyWidgetVisual": {
|
|
|
|
"packageFiles": [
|
|
|
|
"dt.ui.ReplyWidgetVisual.js",
|
|
|
|
"CommentTarget.js",
|
|
|
|
"CommentTargetWidget.js"
|
|
|
|
],
|
|
|
|
"styles": [
|
|
|
|
"CommentTargetWidget.less"
|
|
|
|
],
|
|
|
|
"dependencies": [
|
|
|
|
"ext.discussionTools.ReplyWidget",
|
|
|
|
"ext.visualEditor.mwcore",
|
|
|
|
"ext.visualEditor.mwwikitext",
|
|
|
|
"ext.visualEditor.core.desktop",
|
|
|
|
"ext.visualEditor.desktopTarget",
|
|
|
|
"ext.visualEditor.mwextensions.desktop"
|
2019-11-05 14:07:50 +00:00
|
|
|
]
|
2019-09-26 07:06:56 +00:00
|
|
|
}
|
2019-10-10 13:25:11 +00:00
|
|
|
},
|
|
|
|
"QUnitTestModule": {
|
2019-10-24 11:41:25 +00:00
|
|
|
"localBasePath": "tests/qunit",
|
|
|
|
"remoteExtPath": "DiscussionTools/tests/qunit",
|
|
|
|
"packageFiles": [
|
|
|
|
"index.js",
|
|
|
|
"utils.js",
|
|
|
|
{
|
|
|
|
"name": "data-en.json",
|
2019-10-28 12:28:17 +00:00
|
|
|
"callback": "DiscussionToolsData::getLocalData",
|
2019-10-24 11:41:25 +00:00
|
|
|
"callbackParam": "en"
|
|
|
|
},
|
2019-10-24 12:59:42 +00:00
|
|
|
"data/enwiki-config.json",
|
|
|
|
"data/enwiki-data.json",
|
|
|
|
"data/plwiki-config.json",
|
|
|
|
"data/plwiki-data.json",
|
|
|
|
"pages/oldparser/en-913983958.json",
|
|
|
|
"pages/parsoid/en-913983958.json",
|
|
|
|
"pages/oldparser/pl-55171451.json",
|
|
|
|
"pages/parsoid/pl-55171451.json",
|
2020-01-28 23:35:26 +00:00
|
|
|
"other/no-heading.json",
|
2020-01-21 22:01:11 +00:00
|
|
|
"modifier.test.js",
|
2019-10-24 11:41:25 +00:00
|
|
|
"parser.test.js"
|
|
|
|
],
|
2019-10-24 12:59:42 +00:00
|
|
|
"templates": {
|
|
|
|
"oldparser/en-913983958.html": "pages/oldparser/en-913983958.html",
|
2020-01-21 22:01:11 +00:00
|
|
|
"oldparser/en-913983958-modified.html": "pages/oldparser/en-913983958-modified.html",
|
2019-10-24 12:59:42 +00:00
|
|
|
"parsoid/en-913983958.html": "pages/parsoid/en-913983958.html",
|
2020-01-21 22:01:11 +00:00
|
|
|
"parsoid/en-913983958-modified.html": "pages/parsoid/en-913983958-modified.html",
|
2019-10-24 12:59:42 +00:00
|
|
|
"oldparser/pl-55171451.html": "pages/oldparser/pl-55171451.html",
|
2020-01-21 22:01:11 +00:00
|
|
|
"oldparser/pl-55171451-modified.html": "pages/oldparser/pl-55171451-modified.html",
|
|
|
|
"parsoid/pl-55171451.html": "pages/parsoid/pl-55171451.html",
|
Pick reply insertion point based on parser tree, not DOM tree
I don't like that I had to special-case `<p>` tags (top-level
comments) in this code. I feel like it should be possible to handle
top-level comments and replies in a generic way, but I couldn't find
a way to do it that actually worked.
Notes about changes to the behavior, based on the test cases:
* Given a top-level comment A, if there was a "list gap" in the
replies to it: previously new replies would be incorrectly added at
the location of the gap; now they are added after the last reply.
(T242822)
Example: "pl", comment at "08:23, 29 wrz 2018 (CEST)"
* Given a top-level comment A and a reply to it B that skips an
indentation level: previously new replies to A would be added with
the same indentation level as B; now they are added with the
indentation level of A plus one. (The old behavior wasn't a bug, and
this is an accidental effect of other changes, but it seems okay.)
Example: "pl", comment at "03:22, 30 wrz 2018 (CEST)"
and reply at "09:43, 30 wrz 2018 (CEST)"
* Given a top-level comment A, a reply to it B, and a following
top-level comment C that starts at the same indentation level as B:
previously new replies to A would be incorrectly added in the middle
of the comment C, due to the DOM list structure; now they are added
before C. (T241391)
(It seems that comment C was supposed to be a multi-line reply that
was wrongly indented. Unfortunately we have no way to distinguish
this case from a top-level multi-line comment that just happens to
start with a bullet list.)
Example: "pl", comments at "03:36, 24 paź 2018 (CEST)",
"08:35, 24 paź 2018 (CEST)", "17:14, 24 paź 2018 (CEST)"
* In the "en" example, there are some other changes where funnily
nested tags result in slightly different results with the new code.
They don't look important.
* In rare cases, we must split an existing list to add a reply in the
right place. (Basically add `</ul>` before the reply and `<ul>`
after, but it's a bit awkward in DOM terms.)
Example: split-list.html, comment "aaa"; also split-list2.html
(which is the result of saving the previous reply), comment "aaa"
* The modifier can no longer generate DOM that is invalid HTML, fixing
a FIXME in modifier.test.js (or at least, it doesn't happen in these
test cases any more).
Bug: T241391
Bug: T242822
Change-Id: I2a70db01e9a8916c5636bc59ea8490166966d5ec
2020-01-15 06:09:13 +00:00
|
|
|
"parsoid/pl-55171451-modified.html": "pages/parsoid/pl-55171451-modified.html",
|
2020-01-28 23:35:26 +00:00
|
|
|
"other/no-heading.html": "other/no-heading.html",
|
Pick reply insertion point based on parser tree, not DOM tree
I don't like that I had to special-case `<p>` tags (top-level
comments) in this code. I feel like it should be possible to handle
top-level comments and replies in a generic way, but I couldn't find
a way to do it that actually worked.
Notes about changes to the behavior, based on the test cases:
* Given a top-level comment A, if there was a "list gap" in the
replies to it: previously new replies would be incorrectly added at
the location of the gap; now they are added after the last reply.
(T242822)
Example: "pl", comment at "08:23, 29 wrz 2018 (CEST)"
* Given a top-level comment A and a reply to it B that skips an
indentation level: previously new replies to A would be added with
the same indentation level as B; now they are added with the
indentation level of A plus one. (The old behavior wasn't a bug, and
this is an accidental effect of other changes, but it seems okay.)
Example: "pl", comment at "03:22, 30 wrz 2018 (CEST)"
and reply at "09:43, 30 wrz 2018 (CEST)"
* Given a top-level comment A, a reply to it B, and a following
top-level comment C that starts at the same indentation level as B:
previously new replies to A would be incorrectly added in the middle
of the comment C, due to the DOM list structure; now they are added
before C. (T241391)
(It seems that comment C was supposed to be a multi-line reply that
was wrongly indented. Unfortunately we have no way to distinguish
this case from a top-level multi-line comment that just happens to
start with a bullet list.)
Example: "pl", comments at "03:36, 24 paź 2018 (CEST)",
"08:35, 24 paź 2018 (CEST)", "17:14, 24 paź 2018 (CEST)"
* In the "en" example, there are some other changes where funnily
nested tags result in slightly different results with the new code.
They don't look important.
* In rare cases, we must split an existing list to add a reply in the
right place. (Basically add `</ul>` before the reply and `<ul>`
after, but it's a bit awkward in DOM terms.)
Example: split-list.html, comment "aaa"; also split-list2.html
(which is the result of saving the previous reply), comment "aaa"
* The modifier can no longer generate DOM that is invalid HTML, fixing
a FIXME in modifier.test.js (or at least, it doesn't happen in these
test cases any more).
Bug: T241391
Bug: T242822
Change-Id: I2a70db01e9a8916c5636bc59ea8490166966d5ec
2020-01-15 06:09:13 +00:00
|
|
|
"other/split-list.html": "other/split-list.html",
|
|
|
|
"other/split-list-modified.html": "other/split-list-modified.html",
|
|
|
|
"other/split-list2.html": "other/split-list2.html",
|
|
|
|
"other/split-list2-modified.html": "other/split-list2-modified.html"
|
2019-10-24 12:59:42 +00:00
|
|
|
},
|
2019-10-24 11:41:25 +00:00
|
|
|
"dependencies": [
|
2020-01-21 22:01:11 +00:00
|
|
|
"ext.discussionTools.modifier",
|
2019-10-24 11:41:25 +00:00
|
|
|
"ext.discussionTools.parser"
|
|
|
|
]
|
2019-10-10 13:25:11 +00:00
|
|
|
},
|
|
|
|
"AutoloadClasses": {
|
2019-10-28 12:28:17 +00:00
|
|
|
"DiscussionToolsData": "includes/DiscussionToolsData.php",
|
2019-10-10 13:25:11 +00:00
|
|
|
"DiscussionToolsHooks": "includes/DiscussionToolsHooks.php"
|
|
|
|
},
|
|
|
|
"Hooks": {
|
2019-10-10 19:11:07 +00:00
|
|
|
"BeforePageDisplay": [
|
|
|
|
"DiscussionToolsHooks::onBeforePageDisplay"
|
2020-01-24 19:22:29 +00:00
|
|
|
],
|
2020-02-18 18:28:17 +00:00
|
|
|
"GetBetaFeaturePreferences": "DiscussionToolsHooks::onGetBetaPreferences",
|
2020-01-24 19:22:29 +00:00
|
|
|
"ListDefinedTags": "DiscussionToolsHooks::onListDefinedTags",
|
|
|
|
"ChangeTagsListActive": "DiscussionToolsHooks::onListDefinedTags",
|
2020-02-06 20:54:58 +00:00
|
|
|
"RecentChange_save": "DiscussionToolsHooks::onRecentChangeSave"
|
2019-10-10 13:25:11 +00:00
|
|
|
},
|
2019-11-05 14:07:50 +00:00
|
|
|
"config": {
|
2020-02-04 21:06:13 +00:00
|
|
|
"DiscussionToolsEnable": {
|
|
|
|
"value": true,
|
|
|
|
"description": "Enable DiscussionTools on talk pages."
|
|
|
|
},
|
2020-02-18 18:28:17 +00:00
|
|
|
"DiscussionToolsBeta": {
|
|
|
|
"value": false,
|
|
|
|
"description": "Make DiscussionTools a BetaFeature."
|
|
|
|
},
|
2019-11-05 14:07:50 +00:00
|
|
|
"DiscussionToolsUseVisualEditor": {
|
|
|
|
"value": false,
|
|
|
|
"description": "Use VisualEditor for editing replies (both visual and wikitext)."
|
|
|
|
}
|
|
|
|
},
|
2020-02-20 20:39:35 +00:00
|
|
|
"ConfigRegistry": {
|
|
|
|
"discussiontools": "GlobalVarConfig::newInstance"
|
|
|
|
},
|
2019-10-10 13:25:11 +00:00
|
|
|
"type": "other"
|
|
|
|
}
|