Commit graph

228 commits

Author SHA1 Message Date
Bartosz Dziewoński 99b757465a Split DiscussionToolsEnableMobile=true into 'behind-overlay' and 'remove-overlay'
Bug: T295490
Bug: T295491
Bug: T280051
Change-Id: I1b96b0a22eec9e364c2ecbe8b734cebd0d157b96
2021-11-10 22:24:07 +01:00
jenkins-bot 3861aadbb3 Merge "Add links to Special:TopicSubscriptions in preferences" 2021-11-07 12:10:44 +00:00
jenkins-bot 22f48be13b Merge "Support new topic tool on mobile" 2021-11-05 16:01:14 +00:00
jenkins-bot 28885e81aa Merge "Enable DiscussionTools mobile by default for ease of testing" 2021-11-05 00:01:08 +00:00
Ed Sanders 93c75c1521 Enable DiscussionTools mobile by default for ease of testing
Disabled on Wikimedia wikis in configuration:
I83845fb3f22f6c91bd277461598e9ebac42aa16a

Bug: T270536
Change-Id: I937f6e9e89a5bb1728db055d3ec3e12a50c91ef9
2021-11-04 23:54:42 +00:00
Bartosz Dziewoński d52e87a5d1 Fix default value of wgDTSchemaEditAttemptStepSamplingRate, tweak docs
Bug: T295052
Change-Id: I91974c3c6ef4810ab303907017ec45c43defe635
2021-11-04 19:23:52 +00:00
Bartosz Dziewoński 312cce03db Add links to Special:TopicSubscriptions in preferences
Bug: T294994
Change-Id: Ifd564f435e300232d220896e5a29bd8f43db326c
2021-11-04 19:51:08 +01:00
Ed Sanders de4d4bfb21 Support new topic tool on mobile
* Use featuresEnabled.newtopictool to decide when new topic
  links might exist on the page, instead of relying on
  `#ca-addsection` existing. Change the logic of that feature
  flag to check if __NONEWSECTIONLINK__ is on the page.
* Render the add-topic button locally in a hook to replace
  the one suppressed by onMinervaNeueTalkPageOverlay. Do so
  whenever the newtopictool feature is enabled (see above).

Bug: T270537
Change-Id: I3e3f7403b3b86bb84fcb75a8833919512519b70f
2021-11-04 18:19:40 +00:00
David Lynch 7588a393e4 Use MinervaNeue hook to disable talk overlay if DT mobile enabled
Bug: T280051
Change-Id: I6a52adcfd8030b26649b609ca99902ff840e8fdf
2021-11-04 16:46:42 +00:00
Ed Sanders 900a01772f Support reply tool on mobile
Bug: T270536
Change-Id: I94d04e9cd442f9a4e0c5924da67c43a768417a8b
2021-11-03 17:49:06 +00:00
Ed Sanders 19a9070a59 Add dependency on mediawiki.user, required by logger.js
For the method mw.user.generateRandomSessionId

Change-Id: I7b3b6fdf7200ae2f580bb5eeb1bd25ca380a5800
2021-10-29 15:05:19 +01:00
jenkins-bot 9a8e33369b Merge "Allow more flexible overrides for the terms-of-use messages" 2021-10-28 15:05:16 +00:00
Bartosz Dziewoński 695a966a41 Remove unused non-parser-cache mode
Change-Id: Ief9f4153898b09a1ce15ccfdc8656dfad4642269
2021-10-07 17:59:10 +02:00
Bartosz Dziewoński dbb8b00ec7 Remove parser cache splitting ('dtreply' option)
Bug: T280599
Change-Id: I08b52874d575619308b5b83a39acfb6353c5b7b5
2021-10-07 17:59:10 +02:00
Bartosz Dziewoński a0dc12ab56 Add Special:TopicSubscriptions
Bug: T273342
Change-Id: If96a0df1efbf5cadfb6bf2bf8f7ad5c9c90ea142
2021-10-06 20:06:01 +00:00
jenkins-bot c7d82f4ddc Merge "Remove uppercase of first character of auprefix" 2021-10-05 20:57:58 +00:00
Bartosz Dziewoński 11566e4b27 Allow more flexible overrides for the terms-of-use messages
Bug: T284097
Change-Id: Ibacd9397a40ffcc8a8127ec543cb2f7300ce5464
2021-10-05 17:58:37 +02:00
Bartosz Dziewoński ca8781a3a0 Add a link to preferences within the Reply and New Discussion Tools
Bug: T291002
Change-Id: Id99f77d3a181aedd23305b7afa61a0a3fb6dabb7
2021-09-27 21:52:07 +00:00
Bartosz Dziewoński b6c8de03ef Change the "Watch this page" label to distinguish it from topic subscriptions
Bug: T290712
Change-Id: I02b89466a4e980e3cb2859b1ba5a3cbf4b5ae0ed
2021-09-21 11:44:06 +02:00
jenkins-bot c50b1630d1 Merge "Add API to get the status of topic subscriptions on a page" 2021-09-21 04:43:03 +00:00
Fomafix c1371b7416 Remove uppercase of first character of auprefix
Since Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a included in core since
MediaWiki 1.38 the uppercase of the first character of the parameter
auprefix is not needed anymore.

Bug: T291339
Depends-On: Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a
Change-Id: Ic14ca9c9c61d2a50bdbaff50b56302a60ed17a96
2021-09-20 07:28:34 +00:00
David Lynch 46b6d76433 Enable email delivery for our notifications for new users by default
We're using the same approach as Echo is for its new-users-only settings

Bug: T287547
Change-Id: I1d8fff364da919caaf86af94cf5f0c6e40b67ff9
2021-09-15 23:54:30 -05:00
Bartosz Dziewoński 8bb36bd782 Add API to get the status of topic subscriptions on a page
(Split off from Ic0fabda0de4ebbc5e424f49641e6b03ebb4b7e6a)

Bug: T290185
Change-Id: Iacc0f92bedfcb49e8a05d98af4d8170d08b1c8de
2021-09-07 21:38:09 +00:00
Bartosz Dziewoński ce899aaadd Inject services in hook handlers where possible
Change-Id: Ie5c36cabd90412d2299b00d2b0c3c3bdf9ffc6d6
2021-09-07 22:51:35 +02:00
Bartosz Dziewoński c70a203111 Inject ConfigFactory in API modules
…plus minor tweaks.

Change-Id: I80ded8bac836f4a49d61c51c4d17b48687628986
2021-09-07 18:36:12 +02:00
David Lynch 21600231d9 Empty states for anon/IP user talk pages
Bug: T287779
Bug: T288556
Change-Id: I9d01d1ac04c0cc443c4cbfe94d301db16f5b1ef6
2021-08-26 22:11:13 +02:00
Bartosz Dziewoński c8fa10770a Remove remnants of the cookie hack for loading unavailable tools
Follow-up to ee524d6bd6.

Change-Id: I1b4dc587e6b629b05ca0581dcd384a2bc7f01d2a
2021-08-18 20:45:02 +02:00
DannyS712 88ba997bed Injected SubscriptionStore into UnsubscribeAction
Dependency injection is now available to actions,
extension already requires MW 1.37+

Bug: T253078
Change-Id: I473abac19ed5e6f3c6706797e91704ff635f64c6
2021-08-09 22:38:52 +00:00
jenkins-bot 2fa030aafc Merge "Apply an empty-state to pages with the new topic tool enabled" 2021-08-05 16:52:49 +00:00
jenkins-bot 4aa139899e Merge "Change 'sourcemodetoolbar' default to enabled (when available)" 2021-08-05 00:01:14 +00:00
David Lynch 91af0594b5 Apply an empty-state to pages with the new topic tool enabled
This includes the dtrepliedto URL functionality from
I3f81e4d77faed367606e47678b8896051982359d.

Bug: T274831
Bug: T274832
Bug: T277329
Change-Id: I035d04f30c8312b0cb42902d3bf940df1482ffb3
2021-08-04 18:46:28 -05:00
Bartosz Dziewoński 9016f652ff Change 'sourcemodetoolbar' default to enabled (when available)
Bug: T287927
Change-Id: I4c55efee787ab624ecfb499c36e52f5f01f18a5c
2021-08-04 19:32:32 +02:00
C. Scott Ananian 5203d30ea6 Use DOMCompat::newDocument() to create a new Document
For compatibility with Parsoid's document abstraction (Parsoid may
switch to an alternate DOM library in the future), don't explicitly
create a new document object using `new DOMDocument`; instead use
the Parsoid wrapper `DOMCompat::newDocument()`.  This ensures that
the Document object created will be compatible with Parsoid.

There are a number of other subtle dependencies on the PHP `dom`
extension in DiscussionTools, like explicit `instanceof` tests; those
will be tweaked in a follow-up patch
(I3c4f41c3819770f85d68157c9f690d650b7266a3) since they do not affect
correctness so long as Parsoid is aliasing Document to a subclass of
the built-in DOMDocument.  Similarly, the Phan warnings we suppress
do not cause runtime errors (because of the fixes included in
c5265341afd9efde6b54ba56dc009aab88eff83c) but phan will be happier
once the follow-up patch lands and aligns all the DOM types.

Bug: T287611
Depends-On: If0671255779571a91d3472a9d90d0f2d69dd1f7d
Change-Id: Ib98bd5b76de7a0d32a29840d1ce04379c72ef486
2021-07-30 18:15:11 -04:00
Bartosz Dziewoński cfbf437d9d Allow the new topic tool to handle URLs like action=edit&section=new
Depends-On: Ib9302e2fda7dadf1edc43c0107db7234eb4bdf7a
Depends-On: Ic7dd677ea219938969f60bab91387c2e03ebdbe6
Bug: T282204
Change-Id: I2e7b2682da7beb3c1c469bb784a9a8ec3998aeb9
2021-07-30 09:25:21 +02:00
jenkins-bot 16f6715fe7 Merge "Move reply link handling out of CommentController" 2021-07-01 17:21:13 +00:00
jenkins-bot 3676f3881d Merge "Introduce CommentDetails to group up and document stuff we pass around" 2021-07-01 17:18:58 +00:00
Bartosz Dziewoński a2c662d3b2 Move reply link handling out of CommentController
Problems with the current setup:

* Each CommentController must have exactly one link.
  For T277371 we want multiple, and for T282205 we might want zero.

* CommentController objects must be constructed immediately.
  They are implemented to make this pretty fast, but it's still
  unnecessary work to do on page load.

* Only one link may be activated at a time, and activating one affects
  the styling of others, so CommentController has to use global state
  to check if it can set up and to update them.

Instead introduce ReplyLinksController, which knows about all reply
links and which one is active, and emits events that allow
CommentControllers to be constructed on demand.

Change-Id: Iabdeded2e71e598ae78703a6ff9410d0cfba397c
2021-06-30 17:05:55 +02:00
jenkins-bot b6b60bbe0b Merge "Config option to enable topic subscriptions backend and dtenable=1 URL parameter" 2021-06-29 15:21:09 +00:00
Bartosz Dziewoński ea68e1a8f0 Introduce CommentDetails to group up and document stuff we pass around
Change-Id: I809524ea8d89130548964ba9e5a73f00f6089ff4
2021-06-21 22:12:18 +02:00
Bartosz Dziewoński 26822864a9 Add missing dependency
Bug: T284969
Change-Id: I32b10c68991344ef4a2cedc7fb0fdd94b1f787a6
2021-06-15 12:34:18 +02:00
Bartosz Dziewoński 067f0c36de Config option to enable topic subscriptions backend and dtenable=1 URL parameter
…without making the topic subscriptions feature available in user preferences.

Follow-up to these commits, which added these checks in ad-hoc ways:
* 9420f22e9d
* f3422f40a6
* 23a490deca
* a555db7892

Bug: T284491
Change-Id: If2e3fb1e06d1cc489fbca14796ed77c83bb52991
2021-06-14 16:18:18 +02:00
Ed Sanders 5a166cfab5 Notification unsubcribe button
Bug: T279150
Change-Id: Ib0bfe3c0dced2108bddbc837a7ddd7bea814e129
2021-06-01 23:29:53 +02:00
Ed Sanders 6a24ceaeca Subscribe/unsubscribe with plain text links
Bug: T279149
Bug: T279151
Change-Id: Ie7d46ea2e8d458fcdad4f91bb89ba038969f6b62
2021-06-01 20:37:47 +02:00
jenkins-bot 939810f8fe Merge "Change feedback link for new topic tool" 2021-05-26 18:59:28 +00:00
Ed Sanders 2b3345af11 Change feedback link for new topic tool
Bug: T279400
Change-Id: I5d72552f45a63199c0fbb516dc94aef19945c95e
2021-05-26 11:27:01 +00:00
jenkins-bot 90528f2b49 Merge "Fix adding comments in lists containing <dt> tags" 2021-05-25 19:19:49 +00:00
jenkins-bot 14035f3c7e Merge "Remove cookie hack for loading unavailable tools" 2021-05-25 19:17:19 +00:00
Bartosz Dziewoński ee524d6bd6 Remove cookie hack for loading unavailable tools
Bug: T277783
Change-Id: I521db842b4b7a98d8d255d418abd0ccb167c5aa0
2021-05-25 20:27:46 +02:00
Timo Tijhof 54eb6691fa Allow talk pages to have a different ParserCache expiry
Using `updateCacheExpiry()` in this way appears to be established
with examples of other use in WMF production such as:
- CategortyTree extension:
  custom cache expiry for pages with `<categorytree>`.
- RSS extension:
  custom cache expiry for pages with `<rss>`.
- intersection extension:
  custom cache expiry for pages with `<DynamicPageList>`.
- Math extension:
  custom cache expiry if `<math>` failed.
- Wikibase extension, Flow extension:
  no caching for certain namespaces or content types.
- Graph extension, Kartographer extension:
  via onParserAfterParse hook, no caching if on preview.

Bug: T280605
Change-Id: Iea41ab8599ffae4622c97d682258b1b64eaf9ba2
2021-05-14 16:59:09 +00:00
Umherirrender 33f94693fb Replace uses of DB_MASTER with DB_PRIMARY
This requires MediaWiki version 1.36

Change-Id: Idc9edb06b2a080ea9d64e6cdac0b68eb14c485f9
2021-05-13 02:11:45 +02:00