Commit graph

3833 commits

Author SHA1 Message Date
Ed Sanders f509f91c71 Remove unnecessary IIFE
Change-Id: I1f23cd134d830afdf4d6afee5f1a399743c9eaa6
2024-04-19 12:34:28 +01:00
Ed Sanders a74c00ba8c Prefer arrow functions for callbacks
This allows us to remove our `this` bindings.

Change-Id: Ie8c8c38d36af8a033b5181870c39f8981a57b939
2024-04-19 12:34:23 +01:00
Translation updater bot d4c36b42cc Localisation updates from https://translatewiki.net.
Change-Id: If07e942ad9909e154539c9d1f1830e1b22dc0a7d
2024-04-11 09:21:19 +02:00
Translation updater bot e450c6496d Localisation updates from https://translatewiki.net.
Change-Id: Ia058430241a0d2c441b8207ff52eede967f8260c
2024-04-10 09:20:44 +02:00
Translation updater bot 337d1e6f62 Localisation updates from https://translatewiki.net.
Change-Id: I9abc7ebe49819d89f9accc7175b1ca145cd2e304
2024-04-09 09:26:30 +02:00
Translation updater bot a4f4f33ace Localisation updates from https://translatewiki.net.
Change-Id: I066211c751e43b6d2b029865eae97d85aadb4f9b
2024-04-08 09:25:34 +02:00
Translation updater bot 2996cab1c1 Localisation updates from https://translatewiki.net.
Change-Id: Iffdb24c464a48afd006173698c30d532271722b6
2024-04-05 09:38:02 +02:00
jenkins-bot a071c62d83 Merge "Special:TopicSubscriptions: Use permalinks when available" 2024-04-04 14:06:49 +00:00
Bartosz Dziewoński 52ae0f3152 Special:TopicSubscriptions: Use permalinks when available
When permalink data is available, display a permalink using
the current page title, instead of a plain link to the section
at the time of subscription.

Consolidate and clean up some existing permalink code.

Bug: T306373
Change-Id: Ie2f63cbfdbfa703530205201dfcfb0e5ad053b35
2024-04-04 13:44:06 +00:00
Translation updater bot 3004ff5626 Localisation updates from https://translatewiki.net.
Change-Id: I072236b18450a895a2ee46dddc8dc40ce9dd2167
2024-04-04 09:37:50 +02:00
Translation updater bot 3b9e043e47 Localisation updates from https://translatewiki.net.
Change-Id: I9d7ce8baab44307e145b31434760d20103684fbc
2024-04-02 09:21:21 +02:00
jenkins-bot 409c2fb7e5 Merge "Replace deprecated ChangeTags method calls with ChangeTagsStore" 2024-04-01 11:11:40 +00:00
Translation updater bot e1339d3b2a Localisation updates from https://translatewiki.net.
Change-Id: Ib8f8ca892aa182b69d1842cc9480010f473ad89b
2024-04-01 09:22:33 +02:00
Dringsim afff10a932
Replace deprecated ChangeTags method calls with ChangeTagsStore
Bug: T360664
Change-Id: I14b676e74b277dfea62109fcca6881fea3763997
2024-04-01 09:00:39 +08:00
David Lynch ebc884e217 Also don't check for moved topics on fragments starting with !/
Similar reasoning for our existing filter on just `/`; it's only really
used in state routing.

Bug: T361322
Change-Id: Ibcf1a58a884b953003012640041471d3bb5c9450
2024-03-29 10:07:43 -05:00
jenkins-bot f3df3dfa0a Merge "Setup grunt-tyops and fix" 2024-03-28 13:35:23 +00:00
Ed Sanders a70f411ee1 Setup grunt-tyops and fix
Change-Id: I372c3cc5bedaf800716bff68cadb2846a399a42a
2024-03-27 14:01:18 +00:00
Bartosz Dziewoński c44313a867 Fix autosubscribe on new pages with $wgDiscussionToolsAutoTopicSubEditor = 'discussiontoolsapi'
Broken by the introduction of 'nocontent' parameter in
6bf6105d2a.

Bug: T359751
Change-Id: I60d9a6f51e897ecdc68525151990212ecc171548
2024-03-27 00:51:14 +01:00
jenkins-bot 083900821e Merge "Clean up subscribe links/buttons" 2024-03-26 18:39:11 +00:00
Ed Sanders eb92db2b08 topicsubscriptions.js: No longer assume both buttons and links exist in DOM
Bug: T360942
Bug: T359751
Change-Id: I98d50a734dc9bd37d7d488ed97d5a47e65790587
2024-03-26 15:17:45 +00:00
James D. Forrester 30d911b649 Replace wfGetDB() in test with $this->getDb()
Not spotted in code search due to wrong case, which PHP forgives.
Whoops.

Bug: T360991
Depends-On: I73e4d3ab3158659b6a3c0a942f6bef10820b4248
Change-Id: I2d1cfd0f05c962f2d62dde911e4b0eed1ca02d83
2024-03-26 12:01:16 +00:00
Translation updater bot 9781b4f9a6 Localisation updates from https://translatewiki.net.
Change-Id: Ie37486f1b59c37ea3724378c23d640cf84dd4460
2024-03-26 08:19:29 +01:00
jenkins-bot 29b4ec8b75 Merge "ReplyLinksController: url.searchParams -> searchParams" 2024-03-25 20:40:12 +00:00
jenkins-bot ab9aae8172 Merge "Pass through dtenable from main request query string" 2024-03-25 20:16:46 +00:00
Ed Sanders fba7edbbeb ReplyLinksController: url.searchParams -> searchParams
Cache the object property as we never use the rest of the URL.

Change-Id: I1a0ec90b2a4366f126150469c72908ec22817d4f
2024-03-25 18:33:16 +00:00
jenkins-bot 62cff4900f Merge "Add #top to the ignore list for checking for moved topics" 2024-03-25 18:30:06 +00:00
Ed Sanders 5957ac55df Pass through dtenable from main request query string
Instead of passing dtenable=1 unconditionally for API requests.

Bug: T360863
Change-Id: I42c651558d95a88eaf6006b6509caa4e41df8464
2024-03-25 18:26:53 +00:00
Translation updater bot fad95c02b6 Localisation updates from https://translatewiki.net.
Change-Id: I7ff6591d46d2f9df5e4c1a34347e343cacf4fbe9
2024-03-25 08:35:48 +01:00
Bartosz Dziewoński dacef1a97a Clean up subscribe links/buttons
* Don't generate `<!--__DTSUBSCRIBELINK__...-->` placeholder comments
  (follow-up to Idb23b0f5e438d35ed74569ff50302c7fad5ba688)
* Remove unused method parameter
* Remove unnecessary pass-by-reference (only $tocInfo needs it)

Change-Id: Ie3348671c486de5bbd9f286772a8d145e3609bd5
2024-03-25 01:13:59 +01:00
David Lynch 5276729d3e Add #top to the ignore list for checking for moved topics
Top is in the WHATWG spec as a magic value that always navigates to the
top of the document.

There used to be a #top element in pre-Vector2022 skins, and it's in
fairly wide use on some wikis in signatures and via gadgets, so many
links exist that point to it.

Bug: T360274
Change-Id: Ia12464239ab2cdc428c570d0cf5df1c0d1780b7a
2024-03-22 22:01:17 -05:00
jenkins-bot f22dabfb80 Merge "Move some doc comments to real type hints" 2024-03-23 01:36:33 +00:00
Umherirrender 6c005d293f Add explicit parentheses around mixed boolean operator
Mixing different binary boolean operators within an expression
without using parentheses to clarify precedence is not allowed (T358966)

Change-Id: I9e9c9531ab0fa373606b19a5865cec748a3f36ff
2024-03-23 00:52:30 +01:00
Translation updater bot 1d377d284f Localisation updates from https://translatewiki.net.
Change-Id: I8ac50a30ce6b64f7ae2bbe969b71a4fe4928a68c
2024-03-22 08:44:09 +01:00
Translation updater bot bf752c5e0d Localisation updates from https://translatewiki.net.
Change-Id: If5ddaf783d99aa097db92e08ea13b64b81bf95ca
2024-03-21 08:54:57 +01:00
Translation updater bot fe83a6b5b3 Localisation updates from https://translatewiki.net.
Change-Id: Iac44a8d485271e6c94e4878aa9b5d0af88bc6cc7
2024-03-20 08:23:31 +01:00
Translation updater bot 86a9ab0e36 Localisation updates from https://translatewiki.net.
Change-Id: I3da696e30b4af2deb68264e4b60e4f52d6f09f92
2024-03-19 08:24:55 +01:00
Translation updater bot 62d66cb82a Localisation updates from https://translatewiki.net.
Change-Id: Ida7ec3e9cb98ff3d26874da827b97bd28aff6458
2024-03-18 08:30:50 +01:00
Translation updater bot 0bf382329f Localisation updates from https://translatewiki.net.
Change-Id: Iec19b4a5eabffa56bf33a03934b072efb27c3696
2024-03-15 08:33:19 +01:00
Translation updater bot 313179e61c Localisation updates from https://translatewiki.net.
Change-Id: I130f5f7b5bd00649ef16c572a1e6cfa649582d21
2024-03-14 09:02:54 +01:00
jenkins-bot b8d42a0667 Merge "Use standard gray color for timestamp links" 2024-03-13 15:57:31 +00:00
jenkins-bot bd09ad6801 Merge "Move [subscribe] links outside of <h2> tags" 2024-03-11 17:07:14 +00:00
Bartosz Dziewoński d2d2d914ce Move some doc comments to real type hints
Change-Id: I64e3f7123c803ae2576c8b05824698d78a691018
2024-03-11 14:13:17 +01:00
jenkins-bot c5044b0822 Merge "Localisation updates from https://translatewiki.net." 2024-03-11 07:30:49 +00:00
Translation updater bot 4f6dbf44b2 Localisation updates from https://translatewiki.net.
Change-Id: I59ef15227246f2c46f70a30be2a2fde92ae25e0f
2024-03-11 08:26:47 +01:00
Bartosz Dziewoński 69e8e948b2 Remove now redundant PHPDoc blocks
MediaWiki's PHPCS plugin requires documentation comments on all
methods, unless those methods are fully typed (all parameters and
return value).

It turns out that almost all of our methods are fully typed already.

Procedure:

1. Find: \*(\s*\*\s*(@param \??[\w\\]+(\|null)? &?\$\w+|@return \??[\w\\]+(\|null)?)\n)+\s*\*/
   Replace with: */
   This deletes type annotations, except those not representable
   as PHP type hints such as union types `a|b` or typed arrays `a[]`,
   or those with documentation beyond type hints, or those on
   functions with any other annotations.

2. Find: /\*\*/\n\s*
   Replace with nothing
   This deletes the remaining comments on methods that had no prose
   documentation.

3. Undo all changes that PHPCS complains about (those comments
   were not redundant)

4. Review the diff carefully, these regexps are imprecise :)

Change-Id: Ic82e8b23f2996f44951208dbd9cfb4c8e0738dac
2024-03-10 23:53:04 +00:00
Bartosz Dziewoński b16dd9dd96 Update PHPCS overrides
There's now a different rule for the same thing in
mediawiki/mediawiki-codesniffer v43.0.0. Also document the reason for
the override. Follow-up to 8b00546749.

Change-Id: I392ee10639ffda6de55b091555e8c3cadd2af485
2024-03-10 22:59:05 +01:00
Umherirrender 8b00546749 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I889efe00ac06fa857fc3ae063193368927bcff7a
2024-03-10 17:36:18 +01:00
Bartosz Dziewoński 9c9512ecf5 Move [subscribe] links outside of <h2> tags
Place the "[subscribe]" links used when the 'VISUALENHANCEMENTS'
feature is disabled in the same DOM position as the "🔔 Subscribe"
buttons used when it is enabled.

Recent changes in MediaWiki core caused them to move inside the
`<span class="mw-headline">`, breaking some gadgets (T13555#9615648).
Moving them all the way outside should avoid problems.

I don't remember why we placed them inside the `<h2>` tags, but there
doesn't seem to be any reason to do it now. It must have been easier
that way before we introduced the `<div class="mw-heading">` wrappers.

Note that I'm keeping the `<!--__DTSUBSCRIBELINK__...-->` placeholder
comments in case it turns out there is a reason, and we need to revert
this change. If everything goes well, they can be cleaned up in change
Ie3348671c486de5bbd9f286772a8d145e3609bd5 later.

Bug: T13555
Change-Id: Idb23b0f5e438d35ed74569ff50302c7fad5ba688
2024-03-08 21:18:53 +01:00
Translation updater bot dc5919fefe Localisation updates from https://translatewiki.net.
Change-Id: Id59fb8cbe6a01e46fa852690be144ff8ce543848
2024-03-08 08:22:57 +01:00
jenkins-bot 63dd90a8dc Merge "Fix collapsed sections when recovering autosave on mobile, take 3" 2024-03-07 17:36:12 +00:00