Commit graph

1564 commits

Author SHA1 Message Date
Translation updater bot 39e9016b87 Localisation updates from https://translatewiki.net.
Change-Id: Iae1baaa0acea6b44067eb5c1d5ff15724d27e8fa
2021-08-20 08:24:00 +02:00
jenkins-bot ccd2769b17 Merge "Remove remnants of the cookie hack for loading unavailable tools" 2021-08-19 16:32:10 +00:00
jenkins-bot d77353d93e Merge "Remove unnecessary contentType: 'multipart/form-data' from an API query" 2021-08-19 16:32:08 +00:00
jenkins-bot 52ff6ef77e Merge "HookUtils: Simplify check for your own talk page" 2021-08-19 16:32:07 +00:00
jenkins-bot e2ef5764da Merge "Minor cleanups in topic subscription code" 2021-08-19 16:32:04 +00:00
jenkins-bot b7978be7ed Merge "Remove repetition in "Discussion pages" preferences" 2021-08-19 14:46:57 +00:00
Translation updater bot 92ae198a81 Localisation updates from https://translatewiki.net.
Change-Id: I8ba37de1e240352a1e5bcbcdc8797502abedec75
2021-08-19 08:13:22 +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
Bartosz Dziewoński 75d63bb056 Remove repetition in "Discussion pages" preferences
Bug: T289187
Change-Id: Id6c90546e4b57754e13b55f7c61610b51de87966
2021-08-18 20:20:34 +02:00
Translation updater bot 232dc64246 Localisation updates from https://translatewiki.net.
Change-Id: Iedd5754ddb1619b34fc7cb66aa1d78a3d4ee04b5
2021-08-18 08:13:26 +02:00
Bartosz Dziewoński 4aca61990a HookUtils: Simplify check for your own talk page
This approach is used in our new topic tool empty state code and is
much nicer. Also fix typo in a comment nearby.

Change-Id: I80755ef0960a172b0f370c36c1979a86498d6fa9
2021-08-17 22:22:15 +02:00
Bartosz Dziewoński bcd92a5d33 Minor cleanups in topic subscription code
For automatic topic subscriptions, I plan to introduce a third
subscription state to indicate them. This patch includes minor tweaks
I wanted to add while working on that:

* Introduce constants instead of numbers
* Remove a TODO that doesn't seem like a good idea any more
* Remove a `"length": 1` on sub_state that did not do anything
  (but it might have been meant to indicate that it was supposed
  to be a boolean, which would be wrong)

Bug: T284836
Change-Id: I6e6096968ad38510102287bccd349090b6ca4280
2021-08-17 22:22:15 +02:00
jenkins-bot 359b80ed70 Merge "When opening new topic tool using any link, always activate the link in page tabs too" 2021-08-17 15:51:29 +00:00
Translation updater bot 7bcb5f195e Localisation updates from https://translatewiki.net.
Change-Id: Ie1e58b3aa4711b2d5039871beccac100e6183069
2021-08-17 08:19:16 +02:00
jenkins-bot 781992de2d Merge "Create a hidden revision tag for talk page comments" 2021-08-17 02:07:10 +00:00
jenkins-bot e090c455cc Merge "EventDispatcher: Fix ignoring level 3+ headings" 2021-08-16 22:08:42 +00:00
jenkins-bot 2cd97c4be5 Merge "Handle highlighting and scrolling to comments for bundled notifications" 2021-08-16 20:43:37 +00:00
Bartosz Dziewoński db28a3d3a7 Handle highlighting and scrolling to comments for bundled notifications
Notifications are bundled by section, so instead of linking to the
comment, link to the section.

Additionally, add a parameter to the URL listing all the comment IDs
from the bundle, and highlight them all and scroll to the topmost one.

Having to handle both URL fragments and URL query parameters makes
this code kind of a mess :(

Also, some unexpected changes became necessary:

* EventDispatcher.php: Store the section title in events using
  HeadingItem::getLinkableTitle() instead of ThreadItem::getText().
  The result is mostly the same, except in case of wacky markup like
  images or extension tags. We can more reliably use it to link to the
  section on the page, and we already use getLinkableTitle() when
  generating edit summaries in the reply tool for this reason.

* dt.init.less: Change the mix-blend-mode for the highlights from
  'multiply' to 'darken', so that multiple overlapping highlights do
  not look more opaque. This affects how the highlights look on
  non-white backgrounds and images (they're less blue, and on darker
  backgrounds entirely invisible), but it seems worth it.

Bug: T286620
Change-Id: I21bb5c003abc2747f0350d3f3af558dfb55693e9
2021-08-16 22:03:30 +02:00
Bartosz Dziewoński 76b2f5bcbc Clarify the references to talk pages in notification preferences
Bug: T286954
Change-Id: I3ba3b76a74f2673f790745f385963b868ca711f6
2021-08-16 21:58:53 +02:00
Bartosz Dziewoński a129899971 Remove unnecessary contentType: 'multipart/form-data' from an API query
This was copied from somewhere else (probably VisualEditor), but it is
not needed here.

Using the multipart/form-data encoding is beneficial when sending long
binary data (such as the compressed HTML VisualEditor sends), and is
also required when uploading files, but it is not helpful when sending
a short query like we do here.

Also rename a variable.

Change-Id: I9bcce2ce1ca7c218e4cd147960d1070dd23ea9fa
2021-08-16 21:33:59 +02:00
Bartosz Dziewoński ad04b24ffd Create a hidden revision tag for talk page comments
Bug: T262107
Depends-On: I21159d03eebaf46ad94f4273ba698a59b8019185
Change-Id: Iceddfaf6a4bcc5e8b5c85c8cd5638bf14aa7db03
2021-08-16 15:42:51 +00:00
Bartosz Dziewoński 47510a22f3 EventDispatcher: Fix ignoring level 3+ headings
The code (prior to d25825a754) assumed
that level 3+ headings would always follow a level 2 heading or the
placeholder heading, but we don't generate a placeholder heading if
there are no comments in section zero.

Add more tests to confirm that comments under level 3+ headings (that
are not sub-headings of level 2), and level 1 headings, are ignored
when generating notifications, and do not mess with normal headings.

Bug: T288775
Change-Id: Ic57b56752a4797cb01234f66e0ed7b849752bd70
2021-08-16 15:42:06 +00:00
Translation updater bot 4c103576e8 Localisation updates from https://translatewiki.net.
Change-Id: If470919a929b62537e563a33a3c88f70f429766f
2021-08-16 08:16:13 +02:00
Translation updater bot 98da78306a Localisation updates from https://translatewiki.net.
Change-Id: I2ecddb22f0abb9deb46e2d46c043894743a99d0f
2021-08-13 08:18:37 +02:00
Bartosz Dziewoński d25825a754 EventDispatcher: Remove failing invariant check
To be investigated in the future.

Bug: T288775
Change-Id: Ic27418a0ec976347be5fa586bbd32cc4a0d8d511
2021-08-12 22:37:51 +02:00
Translation updater bot 98f79545d6 Localisation updates from https://translatewiki.net.
Change-Id: I2d7c1927d1d917302951b26410f69665b5845e84
2021-08-12 08:09:30 +02:00
David Lynch 642fede864 Apply design tweaks to empty states
Bug: T274831
Bug: T274832
Bug: T277329
Change-Id: I0dcdb3479ba668b78cf247856a8ec00d5ea37ab4
2021-08-11 14:33:43 -05:00
libraryupgrader 912e9d874a build: Updating path-parse to 1.0.7
* https://npmjs.com/advisories/1773 (CVE-2021-23343)

Change-Id: Ia4f226e1704eaed9d482546e5e4826c43f5b939f
2021-08-11 17:38:12 +00:00
Translation updater bot f436692239 Localisation updates from https://translatewiki.net.
Change-Id: I9a5ea45cbe009337cd4725ac62ec5ac4b12e16fc
2021-08-11 08:19:13 +02:00
vladshapik 613b0a9b27 Avoid using deprecated ParserOptions::getUser
Bug: T287858
Change-Id: I13ef6ef128a8316f699c6e038adf82d18bf81b96
2021-08-10 16:43:11 +03:00
Translation updater bot 5cf1cee1e4 Localisation updates from https://translatewiki.net.
Change-Id: I6da7968f52ff25ff9d23f7c22f29d6190c3f2a49
2021-08-10 08:06:31 +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
Bartosz Dziewoński b46893eb7d Remove pointless uses of preserveWhiteSpace property
This DOMDocument property has no effect, because we do not use
DOMDocument methods for parsing HTML, but rather DOMUtils::parseHTML()
provided by Parsoid.

Change-Id: I1d9e73e53f2d44f41cf9dcda4f06ac8647671096
2021-08-09 23:45:48 +02:00
Translation updater bot a9abb268bb Localisation updates from https://translatewiki.net.
Change-Id: I55fa8bb02f396b304938a9a4da79b09de43f7d88
2021-08-09 08:23:53 +02:00
jenkins-bot dfa2646604 Merge "Only show the empty state on talk namespaces" 2021-08-07 16:19:16 +00:00
David Lynch 93f2e64f3f Only show the empty state on talk namespaces
This should only affect some edge cases like the project namespace (e.g.
Wikipedia:Village_pump isn't a talk page, but does get discussiontools.)

Bug: T288317
Change-Id: I509101063a1d64d09cff71a84bf48c69ab7a8c08
2021-08-06 16:04:23 -05:00
David Lynch 0cb756f248 Don't detach the reply widget when posting to an empty page
This will avoid a flash of the empty-state while we're reloading the
page to get new tabs.

Refactor out the new topic controller's clear behavior from its teardown
behavior, so we can still wipe out the storage when redirecting.

Bug: T288314
Bug: T288320
Change-Id: I6a5313b5e5b3bc9925e5cdaea04d8fbd3dc796af
2021-08-06 15:18:17 -05:00
Bartosz Dziewoński 076242e3b4 Revert "Silence JQMIGRATE warnings when running tests"
This reverts commit f075e37303.

No longer needed after Iaf786cd0f1d870cbcf0b968b7adce616c82df3d8
in MediaWiki core, and now causes exceptions because
UNSAFE_restoreLegacyHtmlPrefilter is undefined.

Bug: T280944
Change-Id: I0dbd6fcb5dce939de334815e9fe371425cf5641f
2021-08-06 18:19:42 +00:00
Translation updater bot 3150c533a6 Localisation updates from https://translatewiki.net.
Change-Id: Ib5325a1e137a46b011f52067d4c563958b67354a
2021-08-06 08:13:28 +02:00
jenkins-bot 10c23d0eb1 Merge "Deal with document body consistently" 2021-08-06 03:08:28 +00:00
jenkins-bot 02c09106ab Merge "Remove use of DOMXPath to remove Phan suppressions" 2021-08-06 03:05:13 +00:00
jenkins-bot 125cb495e2 Merge "ImmutableRange: Remove Phan suppression" 2021-08-06 02:47:07 +00:00
Bartosz Dziewoński 7fcaae95b7 When opening new topic tool using any link, always activate the link in page tabs too
Bug: T288267
Bug: T277371
Change-Id: I1854c82853abf16d9552765df983b4490fcd4b30
2021-08-05 19:09:05 +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
Translation updater bot b3ae9c3695 Localisation updates from https://translatewiki.net.
Change-Id: I7c172be4f0bab67b3ae473e3baef82083efb49fa
2021-08-05 08:22:01 +02: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
David Lynch b492d3d635 Update preferences language for source mode toolbar
Also, fix some copy-paste errors in the topic subscription qqq text.

Bug: T287315
Change-Id: I153467e6c02fb938825692204a02a6c327c941cb
2021-08-04 12:24:23 -05:00
Translation updater bot 93f7afac5d Localisation updates from https://translatewiki.net.
Change-Id: I53b86456b2e52e914cd8309d343224860f3035f4
2021-08-04 08:14:47 +02:00