Commit graph

745 commits

Author SHA1 Message Date
Bartosz Dziewoński 6276b6ead5 Log page/revision IDs when the page/revision seems to be missing
Bug: T315688
Change-Id: Icb77d62776f26f2daf3be7559f37eea4c6ab6b69
2022-10-09 20:21:59 +02:00
Bartosz Dziewoński 4588ae7d7c Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)
This path will also be used on most non-WMF wikis, but that's alright.

Bug: T315689
Change-Id: I20de2e2391e45b7ccc9233d6d8306ad47462605f
2022-10-09 20:20:17 +02:00
Daimona Eaytoy 50874ab4b7 Fix call to wfMessage
Follow-up to I8cf8b6960533718646189263acabc852ea976416, where the ...
was unintendedly removed.

Also switch to a suppression, because the type should be documented in
ParsoidClient, rather than enforced in callers. We will remove the
suppression once the documentation is updated.

Change-Id: I3ee2534959c8375d29f43e8391894f0a2002ae1c
2022-10-09 13:56:03 +02:00
libraryupgrader 154e47a7a5
build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.11.1 → 0.12.0

npm:
* grunt: 1.5.2 → 1.5.3
* grunt-banana-checker: 0.9.0 → 0.10.0

Change-Id: I8cf8b6960533718646189263acabc852ea976416
2022-10-09 10:55:34 +03:00
Ed Sanders e57cf6c60f ImmutableRange: Add surroundContents method
Also adds extractContents method.

Change-Id: Ie81dab12007b4038ebaaae904a1c032f80ef43cb
2022-10-04 16:51:08 +02:00
David Lynch d5161bf086 Add config to separate out visualenhancements on mobile
Follow-up to d0126ce6de which made them
default-on for all mobile. These two taken together mean that the
mobile visual enhancement features now *only* depend on this config,
rather than on whether the individual features are enabled on desktop.

Bug: T318871
Change-Id: If767753e6d33f19bbc540d4e74273e478198388c
2022-09-28 17:12:48 -05:00
jenkins-bot 3436684b2c Merge "Only hold on to a Config instead of ConfigFactory when injecting" 2022-09-28 14:22:46 +00:00
jenkins-bot d0126ce6de Merge "Visual enhancement features are now part of the mobile set" 2022-09-28 14:16:02 +00:00
David Lynch 3a42623fef Visual enhancement features are now part of the mobile set
Bug: T318302
Change-Id: I494e4dd6d2133d110499420ffc57f45a29999748
2022-09-27 16:09:05 -05:00
Bartosz Dziewoński 0a5cded42c Fix TODO about ParsoidClient::getPageHtml() params
Depends-On: Id9a450dc8b8eb3e82cf87718b96975e5a3c6180c
Change-Id: I35ce516187fb8dcde24bc35278378496f471e211
2022-09-26 22:50:07 +02:00
jenkins-bot fb7a25ce91 Merge "PreferenceHooks: Avoid referring to the field of disabled feature" 2022-09-24 23:30:44 +00:00
Bartosz Dziewoński 2679fa3b04 Replace VisualEditor ParsoidHelper with ParsoidClient
Depends-On: I21c4a8cd86f8d085e75a601ed6d2509dedd75d42
Change-Id: I9533d7c05047c2d873c8c6ee5944df965e3b379d
2022-09-19 18:00:14 +02:00
Func 8820940dfd PreferenceHooks: Avoid referring to the field of disabled feature
The GlobalPreferences extension would remove disabled fields from
the form, avoid referring to it in the disable-if param.

Bug: T317526
Change-Id: I6ec177a1f20855c90eb4ea17bb6625c75e5b9617
2022-09-13 09:32:09 +00:00
jenkins-bot 936883572c Merge "CommentFormatter: Fix TOC info being repeated for subsections" 2022-09-06 22:23:51 +00:00
jenkins-bot 0632bfc92e Merge "Refactor thread summary getters" 2022-09-06 22:17:26 +00:00
jenkins-bot 014ff9f8da Merge "Hooks: Inject VisualEditorParsoidClientFactory to ParsoidHelper" 2022-09-06 21:28:24 +00:00
Bartosz Dziewoński d7b6100c28 CommentFormatter: Fix TOC info being repeated for subsections
(And don't display it for empty top-level sections)

Bug: T309463
Change-Id: Icc69a248bca0be4945e07051e667b87af28927f7
2022-09-06 23:19:13 +02:00
Ed Sanders e24550fae9 Refactor thread summary getters
Replace getThreadSummary with individual getters that call
calculateThreadSummary once.

Change-Id: Ie8a8b4d7cb5121847b78dbc20bca2c8d48c7d857
2022-09-06 23:19:13 +02:00
Derick Alangi 5168005373 Hooks: Inject VisualEditorParsoidClientFactory to ParsoidHelper
Since it will be made a required field in VE, just inject it.

Change-Id: If682af406c0fc7a9eca106eb3ebd95e6c14baddd
2022-09-06 21:15:13 +01:00
Ed Sanders 09d9b179f7 Content*Item: Use more specific Content*Item classes within functions
We can't use these is class method function signatures, but we
can use within the functions themselves.

Change-Id: Ic24e47d6647226172a3bfacd81398d26143d98e4
2022-09-06 20:00:55 +00:00
jenkins-bot 23a5647ff4 Merge "Hooks: Remove injecting MainConfig to ParsoidHelper" 2022-09-06 17:53:11 +00:00
jenkins-bot 1c624210f4 Merge "Table of contents style tweaks" 2022-09-05 21:43:06 +00:00
Derick Alangi c1c1cee267 Hooks: Remove injecting MainConfig to ParsoidHelper
Will fallback to MainConfig gotten from services in VisualEditor.
VE will remove this complete soon.

Depends-On: I787c0afb227308aab56770d14d62e08eb0084a6c
Change-Id: I4b9e7362a1bf1b4f224c8c652d40851a18c19824
2022-09-05 14:36:25 +01:00
Ed Sanders 5c7cf02457 Table of contents style tweaks
* Make "X comments" appear on a new line deliberately
* Remove parentheses around "X comments"

Bug: T309463
Change-Id: I803eee9db59c633f129f15e436242a12bcc627f0
2022-09-05 12:57:31 +01:00
jenkins-bot f5b7f72a38 Merge "Inject services into API classes" 2022-09-05 11:44:04 +00:00
jenkins-bot 2ce1822484 Merge "Use cheaper getRawVal/getCheck instead of getVal where possible" 2022-09-03 05:33:08 +00:00
Thiemo Kreuz 62ddb8bceb Use cheaper getRawVal/getCheck instead of getVal where possible
getVal/getText can be expensive because they do Unicode normalization.
We can skip this when we know we aren't going to do anything meaningful
with the value anyway.

Change-Id: I9d939a44df6b67bcd8429096d89600ce1566ca39
2022-09-03 05:27:20 +00:00
Bartosz Dziewoński 14b01e101a Only hold on to a Config instead of ConfigFactory when injecting
The config is currently unused in some classes, but this is okay since
it might be used in the future.

Change-Id: Ie25fc52cc5d3476c9445e182975d229991316bd3
2022-09-03 00:39:51 +02:00
Bartosz Dziewoński dc07d802a9 Inject services into API classes
This replaces the remaining uses of MediaWikiServices::getInstance()
in API classes.

Change-Id: I5f602a7e7b5a21a7d40023571018604528ea8edb
2022-09-03 00:23:41 +02:00
Ed Sanders 664d5d041a Fix fetching of oldest comment in a thread
The implementation in Parser doesn't descend into sub-thread.
Re-use the getThreadSummary method in ThreadItem and traverse
the thread properly.

Bug: T298617
Change-Id: I318d9012eb83f37ccbe463923524ef2e9f995ced
2022-09-01 21:22:09 +00:00
jenkins-bot 988b076760 Merge "API: always output ISO8601 in the timestamp field" 2022-08-30 20:16:45 +00:00
jenkins-bot cbe48c04e5 Merge "ThreadItem jsonSerialize: make sure callback is applied last" 2022-08-30 20:14:39 +00:00
David Lynch 76919822fb API: always output ISO8601 in the timestamp field
Bug: T315400
Change-Id: Iac4ad334ca41197cb0b36217468113bec331aaac
2022-08-30 11:04:19 -05:00
jenkins-bot 5326f060de Merge "Notify users when a topic they are subscribed to is removed from a page" 2022-08-30 15:59:33 +00:00
David Lynch 4b370a8971 ThreadItem jsonSerialize: make sure callback is applied last
This changes a vast number of test expected-outputs because it affects
the order of the keys when serialized.

Bug: T315400
Change-Id: I6ad2cded6ba7cb2cc5e5ba37ea60f4b18ecc26be
2022-08-30 09:11:46 -05:00
jenkins-bot e680735d63 Merge "Remove all stuff about legacy IDs" 2022-08-27 05:34:48 +00:00
jenkins-bot b9e3043415 Merge "Enhance vector-2022 table of contents" 2022-08-26 20:57:39 +00:00
jenkins-bot d8213624df Merge "ApiDiscussionToolsEdit: etag is optional" 2022-08-25 19:50:37 +00:00
Bartosz Dziewoński 9b10b9c282 ApiDiscussionToolsEdit: etag is optional
Bug: T316234
Change-Id: If283af8e3f96c12d65e75dc88343a80f20e0f3ee
2022-08-25 21:18:09 +02:00
jenkins-bot 22825f06e6 Merge "Fix subscribe button appearing for unsubscribeable sections with visualenhancements" 2022-08-25 14:59:46 +00:00
Bartosz Dziewoński d33996f8b4 Notify users when a topic they are subscribed to is removed from a page
In the future the notifications can be improved to look up
the new location of the comment, using the permalinks data.

Depends-On: Ia8a21749a8edc20f34b2a3e445278ea6922b9109
Bug: T299657
Change-Id: I5f5e7b73fb84ff0d31fb8260b24066a17da71628
2022-08-25 03:52:58 +02:00
Bartosz Dziewoński cfa45a5f4c Remove all stuff about legacy IDs
We can no longer change IDs so easily, because they're stored in the
permalink database, so remove this mechanism to make sure it's not
accidentally used in the future.

Change-Id: I392ee1f49c48fc2f23d05e9a37c643438b4f2b9a
2022-08-24 01:01:09 +02:00
Bartosz Dziewoński 434944b197 Enhance vector-2022 table of contents
Bug: T307823
Depends-On: I034a579b7ef51950726c9ac056d6c940a7d7d472
Change-Id: Icafc13e1c846549429fe2b3b4a1721c02ab7428d
2022-08-23 19:46:44 +00:00
Ed Sanders 9adafd43a1 Show latest comment info in subtitle
Bug: T306675
Change-Id: I1400dbb50cdf8a0a5e23ce533c84fad96f3fae16
2022-08-23 19:31:40 +00:00
Bartosz Dziewoński 0eeffce1c1 Fix subscribe button appearing for unsubscribeable sections with visualenhancements
We didn't correctly reconcile the changes from
Ie0412b9f238d5ff8e54fd2ea358c1c26e303f4e1 and
I419883b5f9a4291b4bf575d57195d553fd5e291e.

Bug: T315821
Change-Id: I5a93cbb3bf029b352e808cbd9cb1ea3286e20c94
2022-08-23 01:07:14 +02:00
Bartosz Dziewoński a0647956de Make visualenhancements_pageframe features respect visualenhancements preference
Follow-up to I481e885b54a1aeb9dd69a08dc614ab5f4f94b41e.

Change-Id: Ia62a8b4441371956457a40117e8f4d05cdf2cb1c
2022-08-22 20:48:41 +02:00
Bartosz Dziewoński c52980dd7f Always use English for internal exceptions
Change-Id: I3d18fef2dfd28bbad9f01b83b018c25886f63265
2022-08-19 22:23:29 +02:00
Ed Sanders 0e95e45e88 Add space after namespace on talk pages
Bug: T313636
Change-Id: I481e885b54a1aeb9dd69a08dc614ab5f4f94b41e
2022-08-18 16:02:27 +01:00
jenkins-bot 9cf6fc6240 Merge "Show created/notified dates on Special:TopicSubscriptions" 2022-08-17 20:07:57 +00:00
jenkins-bot 234a698282 Merge "Replace deprecated database stuff" 2022-08-17 03:25:45 +00:00