Commit graph

800 commits

Author SHA1 Message Date
Bartosz Dziewoński 3a0b05f564 Allow replying to some comments with accidental complex transclusions
When a comment almost exactly matches the range of an
accidental complex transclusion consisting only of
pages from the 'Template' namespace and wikitext fragments,
I think we can safely allow replying to the comment.

Even if this turns out to be incorrect in some cases,
the failure will be more graceful after the changes in T313100:
instead of potentially duplicating contents from a template,
the worst case now is that the reply will appear in the wrong
place (at the end of the transclusion).

Bug: T313093
Change-Id: Ie8da09d74a652d893fd8c3e2435ef6cb70fad64a
2022-11-14 19:17:36 +01:00
Bartosz Dziewoński 469b7720af Place replies outside transclusions, disallow replying to transcluded comments
Bug: T313100
Change-Id: I3993c96ec8d3d0add33d779860d158327985107d
2022-11-14 19:17:18 +01:00
jenkins-bot 0655cdbf56 Merge "Move visualenhancements metadata and some buttons outside of <h2>" 2022-11-14 15:29:12 +00:00
Bartosz Dziewoński 08e1073f58 ThreadItemStore: Handle race conditions when finding/inserting outside of transaction
Bug: T322701
Change-Id: Icea63dd562c1812a372f3a947ba1244e72d07a16
2022-11-10 23:33:24 +00:00
Bartosz Dziewoński 04cfffe323 Move visualenhancements metadata and some buttons outside of <h2>
We wrap a `<div>` tag around the `<h2>`, and move some elements there.
The markup is inspired by and compatible with my proposal for T13555.

The "ext-discussiontools-init-section" class is moved to the `<div>`.

A small patch is needed in MobileFrontend to preserve the section
collapsing functionality: I11bff21e81046898ca63f3f432797129fa70ad88.

The following elements are now outside of `<h2>`:
* Metadata bar
* Subscribe button
* Ellipsis menu (only shown on mobile)

The following elements are sadly still inside of `<h2>`:
* Subscribe links (only shown on desktop)
* Section edit links from MediaWiki core
Trying to move them mucks up the CSS too much. I hope we can resolve
this later as a part of the work on T13555.

Depends-On: I11bff21e81046898ca63f3f432797129fa70ad88
Bug: T314714
Change-Id: I0bbdcfa02c334858737855349d7a35746de1d8f2
2022-11-10 23:35:40 +01:00
Ed Sanders 79521f89cf Add button to reveal lede section on mobile
Bug: T312309
Depends-On: I9c3035c9dbe7545a05efb2286dffe0145d3557b4
Change-Id: I9d74914ddbcc9def74e85106a68574a807b0b731
2022-11-10 22:10:04 +00:00
jenkins-bot d1911e4f11 Merge "ThreadItemStore: Fix setting parent IDs when parent already existed" 2022-11-08 19:01:42 +00:00
jenkins-bot c83bad9de8 Merge "Embed pageThread JSON in jsConfigVars instead of infusing HTML" 2022-11-08 18:59:48 +00:00
jenkins-bot c0e757c716 Merge "ABtest for mobile, logged out users" 2022-11-08 18:41:38 +00:00
jenkins-bot 811c32c518 Merge "ABtest for mobile, logged in users" 2022-11-08 18:41:23 +00:00
Ed Sanders a00131a18f Embed pageThread JSON in jsConfigVars instead of infusing HTML
Bug: T322651
Depends-On: I86d461756398780dc24949013f35b7730a481052
Change-Id: I85ee8e6ed6eba97b94f4e4c415fbc5286c234cce
2022-11-08 16:20:39 +00:00
jenkins-bot 0251155359 Merge "Topic subscription feature is unavailable if Echo is not installed" 2022-11-08 03:11:14 +00:00
Bartosz Dziewoński 759e6b757a ThreadItemStore: Fix setting parent IDs when parent already existed
Bug: T322599
Change-Id: I697de586fb3c1b1901f434f6fbef501cec3164df
2022-11-08 01:38:41 +01:00
Ed Sanders d6160c76fa Topic subscription feature is unavailable if Echo is not installed
Bug: T322498
Change-Id: I072e9363fceb4beae820b7742dec4249b4f58905
2022-11-07 12:28:45 +00:00
jenkins-bot 98285f3b27 Merge "ThreadItemStore: Update existing rows if possible rather than insert+delete" 2022-11-03 14:12:49 +00:00
Bartosz Dziewoński c4c455c550 ThreadItemStore: Update existing rows if possible rather than insert+delete
Bug: T321121
Change-Id: I678b093aef95febb33cf4b0140b0625ef3241779
2022-11-03 00:53:19 +01:00
jenkins-bot 140939b3dd Merge "Avoid unsafe wrapping of Message::parse() into paragraph" 2022-11-02 18:37:29 +00:00
jenkins-bot 0d24c4881a Merge "Revert "Add config to separate out visualenhancements on mobile"" 2022-11-02 09:17:53 +00:00
Timo Tijhof 18e523281c Avoid unsafe wrapping of Message::parse() into paragraph
Bug: T322173
Change-Id: I8405a33129ab17edcb7a02440146684170f1c0a7
2022-11-02 00:19:46 +00:00
Bartosz Dziewoński c53b44d1bc Revert "Add config to separate out visualenhancements on mobile"
No longer needed.

This reverts commit d5161bf086.

Bug: T318868
Change-Id: I909266903271cecba050d171a3ec66ef0a12b8a9
2022-11-01 21:09:37 +00:00
David Lynch 9021a45966 ABtest for mobile, logged out users
Bug: T320993
Change-Id: I3530c540ec20f8806abcd7010b4d4933d1b53cfc
2022-10-31 16:23:59 -05:00
David Lynch 2b0d2deb4a ABtest for mobile, logged in users
Bug: T320993
Change-Id: I46597f2846811c52cbaba1a1db31bff575a41246
2022-10-31 16:23:46 -05:00
Bartosz Dziewoński 433e57394c Use PHP 7.4 property types
Change-Id: I788db64f0c0c00894d77256b7f016d44eda4bbb1
2022-10-28 21:56:38 +02:00
jenkins-bot da907eb610 Merge "Don't apply topic containers to table-of-contents heading" 2022-10-26 16:30:28 +00:00
jenkins-bot c9dadbfe7d Merge "Remove support for <span class="mw-headline-number"> in headings" 2022-10-26 16:29:41 +00:00
jenkins-bot d55b8f8d2f Merge "Don't insert comment markers inside <figure>" 2022-10-26 16:28:37 +00:00
Bartosz Dziewoński 9cbb0a8c60 Don't apply topic containers to table-of-contents heading
Change-Id: I3abbf7907907f6280e6b58bcf4307c0ce3b1898e
2022-10-25 18:59:25 +00:00
Bartosz Dziewoński c6cd20f682 Remove support for <span class="mw-headline-number"> in headings
This feature has been removed from MediaWiki in change
Ic9ed88f419419cf4cc5cc32010539eea8b76314b.

Change-Id: If11b33589f47eab614f5129b38e80d0f3cafa083
2022-10-25 18:59:05 +00:00
jenkins-bot 2e28320eb2 Merge "ThreadItemStore: Fix updates for identical revision timestamps" 2022-10-24 23:57:07 +00:00
jenkins-bot f85f7fde10 Merge "ThreadItemStore: Remove long comment no one is ever going to read" 2022-10-24 16:22:24 +00:00
jenkins-bot 0db489b3e7 Merge "EventDispatcher: Remove reference to $wgWMESchemaEditAttemptStepOversample" 2022-10-24 12:48:27 +00:00
jenkins-bot 341b180a66 Merge "Don't insert reply tool outside <section> on mobile" 2022-10-22 02:39:44 +00:00
Bartosz Dziewoński d2df103803 Don't insert reply tool outside <section> on mobile
Bug: T319148
Change-Id: I7db0ef1980f4997b77593f3d43d35886ecd8a4ae
2022-10-21 01:20:13 +02:00
Bartosz Dziewoński 8c9a7c451e Retry without RESTBase when the page/revision seems to be missing
Bug: T315688
Change-Id: I2ec0fa20cc1ee36fc521441ac00c5515dc66a37c
2022-10-20 23:06:16 +00:00
Bartosz Dziewoński 33f4006713 ThreadItemStore: Fix updates for identical revision timestamps
Use revision IDs to break the tie, consistently with MediaWiki (see
RevisionStore::getRelativeRevision) instead of assuming that the
revision we're processing now is somehow both older *and* newer than
the other one (the mind boggles how that ever made sense to me).

Change-Id: I9f1a07124301a36be68578d908353b72f0442c00
2022-10-20 02:37:47 +02:00
Bartosz Dziewoński 91aeaabe83 ThreadItemStore: Remove long comment no one is ever going to read
I should have just put that in a commit message rather than source code.

Change-Id: Ia5c06c91c21b0b5da1ed578369825a3870c48833
2022-10-20 01:49:19 +02:00
jenkins-bot 3c53a489cf Merge "CommentFormatter: Always add the overflow menu" 2022-10-18 16:16:42 +00:00
jenkins-bot 66780457e4 Merge "Add 'wpTextbox1' to parameters that disable new topic tool" 2022-10-18 15:47:21 +00:00
jenkins-bot a9191c49b8 Merge "Ship HTML test files for JS using 'packageFiles' instead of 'templates'" 2022-10-14 16:53:38 +00:00
jenkins-bot bf1b17d34a Merge "Autogenerate list of files for JS test module instead of maintaining it by hand" 2022-10-14 16:53:36 +00:00
jenkins-bot f09d91a29c Merge "ThreadItemStore: Move some work in insertThreadItems() outside transactions" 2022-10-14 16:36:45 +00:00
jenkins-bot d7cf6adb0a Merge "Log page/revision IDs when the page/revision seems to be missing" 2022-10-14 16:34:45 +00:00
jenkins-bot 19e64cd8ee Merge "Use ParsoidOutputAccess when RESTBase is not set up (WMF private wikis)" 2022-10-14 16:34:15 +00:00
jenkins-bot a8bf67c4e9 Merge "Fix '?dtenable=1' on mobile" 2022-10-13 00:00:01 +00:00
Ed Sanders cdad0cc260 Fix '?dtenable=1' on mobile
isFeatureEnabledForOutput already checks if the mobile flag is enabled,
but it also respects the dtenable=1 override.

Change-Id: I95035281bf301b22c1a9ef4c06ec54cdd0cbc85c
2022-10-12 23:53:12 +00:00
Bartosz Dziewoński 361283a332 Ship HTML test files for JS using 'packageFiles' instead of 'templates'
We originally used 'templates' because it seemed like an obvious
choice for HTML files, and because 'packageFiles' requires extra code
to include anything that isn't a .js or .json file.

However, the templates are expected to be HTML fragments rather than
whole documents, and they are parsed in a particular way that takes a
lot of code to clean up (which we needed to do, because we use the
same test files for testing PHP code).

I tried doing it in the 'packageFiles' way, and the extra code doesn't
seem that bad in comparison after all. Moreover, the 'templates'
mechanism (when used the intended way) feels vaguely deprecated in
favor of Vue.js, and I'd rather move away from it.

This makes the tests faster too (probably mostly thanks to the removal
of the clean up code) – on my machine they go from 1800ms to 1500ms.

(Simplify linearWalk tests, as we no longer need to do weird things
with document fragments to get consistent outputs in PHP and JS.)

Change-Id: I39f9b994ce5636d70fea2e935a7c87c7d56dcb26
2022-10-12 22:45:41 +00:00
Bartosz Dziewoński f9903401a6 Autogenerate list of files for JS test module instead of maintaining it by hand
Depends-On: I223f63aab132444833aad7d7c162b27c9e93991c
Change-Id: Ib869b66d9f9155163ad9e0475e5e8a69dac9f55a
2022-10-12 22:41:41 +00:00
jenkins-bot f6e271d781 Merge "Remove all hacks for old HTML in HTTP cache or parser cache" 2022-10-12 14:20:52 +00:00
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