Commit graph

266 commits

Author SHA1 Message Date
Ed Sanders aa03dc971e Add discussiontoolscompare API
For two given revisions, this API tells us which comments have
been added and which have been removed.

Can be used to highlight new comments, or check if the page
has been updated since we first loaded it.

Bug: T281624
Bug: T300504
Change-Id: Ia4d95ffe3b7cf2317cd8e7c0f034e09f64777ef3
2022-02-08 15:53:27 +00:00
Ed Sanders 025130fcd2 Don't prompt to reload the page if the reply widget is open
Only show the reload prompt if the 'disappeared' error is detected
when the reply widget is loading. Don't show it if we failed
to save, as it suggests you will not lose content if you reload.

Change-Id: I106f274e180dc97b540d729e31aae575c43f29f0
2022-02-07 22:45:35 +00:00
jenkins-bot 6a23be0bb5 Merge "Move ApiDiscussionTools to ApiDiscussionToolsPageInfo" 2022-02-07 20:43:26 +00:00
jenkins-bot 283aa46865 Merge "extension.json: Sort ApiModules" 2022-02-07 20:43:24 +00:00
Ed Sanders 7cad692afa Move ApiDiscussionTools to ApiDiscussionToolsPageInfo
Also remove 'paction' param, and instead make 'transcludedFrom' a
property of the result object.

Change-Id: I0a289f6d71e4708afff0b52066b1ed6faf76b9ae
2022-02-07 16:50:02 +00:00
Ed Sanders ee2749d34a extension.json: Sort ApiModules
Change-Id: I0fea49bd7f86dd6ca48fb1960e47c62abeaf41aa
2022-02-07 16:49:40 +00:00
Ed Sanders 6d655dee0a Remove DiscussionToolsEnableTopicSubscriptionBackend config
This is now deployed on all wikis, and going forward I don't think
we need to make this configurable.

Change-Id: I231976267ba6cdfeec622efaa15983a84c330649
2022-02-04 18:22:10 +00:00
jenkins-bot b0b965512e Merge "Create MemoryStorage wrapper around mw.SafeStorage" 2022-02-02 17:27:37 +00:00
Ed Sanders dd9d37b555 Create MemoryStorage wrapper around mw.SafeStorage
This means we can guarantee we will be able to recover
auto-saves if we don't reload the page.

Change-Id: Ic867ae6df0c949f35cb32ec4b835688778db29ef
2022-02-02 14:59:47 +00:00
Bartosz Dziewoński bacf6a8fc6 Remove unused code in JS modifier
I don't think we're going to need this in the client again.

Change-Id: Id38405c14edfd7ac45afad8f32cad64594ae7bc0
2022-01-29 21:39:45 +00:00
jenkins-bot 3a4a6bff16 Merge "Add another test case for transclusions overlapping comments" 2022-01-21 22:25:46 +00:00
David Lynch dccaa5bf65 Add an optional suffix message to mentions
Wikis like jawiki will then be able to customize the message to include
honorifics as they think appropriate.

Bug: T268588
Change-Id: I213fb9fd0a9ed6592ce3548a5b2c3b11a55c1abc
2022-01-19 10:29:10 -06:00
Bartosz Dziewoński 4e4e9f1c80 Add another test case for transclusions overlapping comments
Prior to 8de940b5, the comments on this page would not be marked as
partially transcluded.

Bug: T298408
Change-Id: Ib7eb8b4113151048c0e778b3530600d98dd8f705
2022-01-17 23:52:02 +01:00
Bartosz Dziewoński b7cbd714ca Add tests for bullet indentation
Bug: T259864
Change-Id: If38016564b67ee7217fe7328b40973aa244ff467
2022-01-14 00:27:04 +00:00
jenkins-bot 3699158e81 Merge "Handle selflinks by returning the current page's title" 2022-01-12 21:46:35 +00:00
Ed Sanders f80ff74fc6 Handle selflinks by returning the current page's title
Bug: T287818
Change-Id: I67f10ac9976581279d1e6a477e90d55875ebab20
2022-01-12 21:18:04 +00:00
Bartosz Dziewoński 7b1053300a Enable wikis to customize the syntax used for replies
The following values for configuration variables are supported:
$wgDiscussionToolsReplyIndentation = 'invisible'; (default)
$wgDiscussionToolsReplyIndentation = 'bullet';

Bug: T259864
Change-Id: Icefad79630adc6ed35687498614e6a03ede1451b
2022-01-12 20:54:04 +00:00
Bartosz Dziewoński 8d51ce32b6 Test cases for adding replies outside of frames
Bug: T297034
Change-Id: Ida57b2638d3434c9b47b120942348ebfe0f96d37
2022-01-11 17:01:47 +00:00
Bartosz Dziewoński d24b04ee71 Test case for several bugs from it.wp
Servers as another test case for partially transcluded comments,
and a test case for comment start markers placed outside of
paragraphs.

Bug: T298051
Bug: T298096
Change-Id: Id07d2f57708c037578cb653c83848490c9a15fc6
2022-01-05 23:17:51 +00:00
jenkins-bot 9d73ed5dfb Merge "Add beta preference discussiontools-betaenable to DefaultUserOptions" 2021-12-17 18:32:59 +00:00
jenkins-bot fb16305135 Merge "Show a hint on legacy interface when arriving from new topic tool hint" 2021-12-17 17:30:39 +00:00
jenkins-bot e568c62f85 Merge "Show a hint on the new topic tool to explain that it's new" 2021-12-17 17:30:37 +00:00
jenkins-bot bdbd13ab9f Merge "Remove unused JS version of ThreadItem#getTranscludedFrom" 2021-12-17 01:02:29 +00:00
Bartosz Dziewoński 52c09788a1 Remove unused JS version of ThreadItem#getTranscludedFrom
We're probably not going to use it again, and I don't want to make the
effort of rewriting it in Id867b3005ebc46906d6df852a525fcaec9e6b19b.

Change-Id: I0b02533f7c9b8c1b0df271e03a74063f123d0dff
2021-12-17 00:54:37 +00:00
Ed Sanders 4a88be8084 Move user subscription limit to config
This makes it easier to change going forward, and
configurable on 3rd party wikis.

Bug: T294881
Change-Id: I9e5343cab42cb00ed6b62cf5adf9e02b072481f1
2021-12-16 21:07:40 +01:00
Bartosz Dziewoński d0eec56f6d Show a hint on legacy interface when arriving from new topic tool hint
Bug: T293962
Change-Id: I56823efb4e58839b3f121ff23d576984b86e4e81
2021-12-16 17:43:23 +00:00
David Lynch f24a73a05a Show a hint on the new topic tool to explain that it's new
This shows to users who are logged in and have more than 500 edits

Bug: T293962
Change-Id: Ic47fa897c6a4f43c27d4cfd5571e34f8acb01eb8
2021-12-16 16:01:38 +01:00
Ed Sanders d2443f7785 Rename DiscussionToolsAutoTopicSubWhere to DiscussionToolsAutoTopicSubEditor
Better describes that we are checking the editor used to make
the edit, rather than descibing some virtual "location".

Change options to 'discussiontoolsapi' and 'any'.

Change-Id: I3024517e70ed61c738e4bf46a2ac7b58c975d98a
2021-12-15 16:24:35 +00:00
jenkins-bot f731b7a575 Merge "Update abtest bucketing for newtopictool usage" 2021-12-13 18:02:09 +00:00
David Lynch d228ca0f67 Update abtest bucketing for newtopictool usage
Trigger off the (absence of the) new preference for tracking topic tool
usage.

Change the name of the bucket preference so anyone who was enrolled in
the prior abtest won't find themselves re-enrolled.

Update the abtest enrollment code so it explicitly sets the preference
for the feature. This is a trade-off -- it does mean that we'll need to
special-case *unenrollment* once the abtest is disabled if we want to
just quietly revert people to the wiki's default, but it also means that
Special:Preferences will be accurate.

Bug: T291307
Change-Id: I659679e05b65fc7db05e249114e5a7de4cf55816
2021-12-13 18:45:37 +01:00
Esanders 3cbca26bd0 Revert "Split DiscussionToolsEnableMobile=true into 'behind-overlay' and 'remove-overlay'"
This reverts commit 99b757465a.

Reason for revert: We may never need the 'behind-overlay' setting
and it is untested and probably broken.

Bug: T295816
Change-Id: I9e128862271697ece5241d0e98727174b42f54ff
2021-12-06 17:26:01 +00:00
jenkins-bot e479c28459 Merge "First-run experience popup for automatic topic subscriptions" 2021-11-16 01:39:46 +00:00
Bartosz Dziewoński 9adbbccad8 Auto topic subscriptions disabled by default, enabled only for new users when out of beta
Bug: T294398
Change-Id: I909caaebbb976624a16f15361d4ee232007ff506
2021-11-15 23:36:03 +00:00
Bartosz Dziewoński 9ded06a655 First-run experience popup for automatic topic subscriptions
Bug: T262103
Change-Id: I9f9336718ad060d553146c4e27604565ce5822c6
2021-11-15 22:45:42 +01:00
Bartosz Dziewoński 8d3cf30f60 Automatic topic subscriptions (only for reply tool and new topic tool)
Bug: T284836
Change-Id: I0f98c26c997f66b7a43cd4b971fe72a37d12db5d
2021-11-15 22:45:42 +01:00
Bartosz Dziewoński 0d57aa9762 Automatic topic subscriptions (on any edit)
Bug: T284836
Change-Id: Ia42ad087218fd91a0cdd1664157d1049738e3c01
2021-11-15 22:45:42 +01:00
Bartosz Dziewoński e6de1c0462 Test case for splitting about-groups starting with an empty <span>
Bug: T290940
Change-Id: I632d351cf61980a48c0a16c4bdb3656dac83a584
2021-11-15 16:03:28 +00:00
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