Commit graph

1458 commits

Author SHA1 Message Date
Ed Sanders 9e9ad65f2b build: Update eslint-config-wikimedia to 0.28.2
Change-Id: Ifb0eb261325544fceeb16d13be31bbf303e64124
2024-06-13 17:28:06 +01:00
jenkins-bot a3adda8ed7 Merge "Remove jquery.makeCollapsible workarounds for mobile" 2024-06-10 19:29:49 +00:00
Ed Sanders e9f412f4c0 eslint: Remove no-op config
Change-Id: Idcc2f4e4edeb57d1fb11deb4e798529f14466c9b
2024-06-06 16:30:49 +01:00
Ed Sanders 39f106ebf4 build: Update stylelint-config-wikimedia to 0.17.1
Change-Id: Ie6c51769e5037cd27ec4b04858ad3c2dcf0db81e
2024-06-05 18:36:37 +01:00
Bartosz Dziewoński 2c9264e412 Remove jquery.makeCollapsible workarounds for mobile
The module is now loaded normally by the Minerva skin (T111565).

Bug: T323639
Change-Id: I9121410c20fffd651c81c26b84b861ec9300881f
2024-06-04 00:56:58 +02:00
Ed Sanders bf09928773 build: Update eslint-config-wikimedia to 0.28.0
Change-Id: Ie6bcea16debc74d3dd1283f6a4975fb3bd5056b0
2024-06-03 18:37:15 +01:00
Ed Sanders 1900b2d383 Drop IE basic support
Use the better method for inserting spaces after the
talk namespace, now that IE support is not required.

Change-Id: Id07e91e13bc0b19c467380e6aa5d3ebd7a4db106
2024-05-30 17:26:26 +01:00
jenkins-bot ff59532fdc Merge "Keep all buttons in "reply" group on one line" 2024-05-28 18:26:43 +00:00
Ed Sanders 49aaeba740 Keep all buttons in "reply" group on one line
Specifically, the "Reply" button and [...] overflow menu.

Change-Id: I66f9cf01a0ef31f31b28bfe185a39b4d22d69913
2024-05-28 18:37:21 +01:00
Bartosz Dziewoński 9d73c46d99 Percent-decode the permalink when copying
Bug: T357021
Change-Id: Ic71c030e6796695de5ff88a940adb86d63996e7f
2024-05-28 18:22:30 +02:00
Ed Sanders a86897f890 Comment thanking
Bug: T249893
Change-Id: I64f7abc26bfc3e7b226340934a637a555edf754f
2024-05-28 17:47:09 +02:00
Ed Sanders 177639f5be Use Array#push instead of Array#concat
Change-Id: I605e726fce1cf1acf39ffdcfe8c7cd51c032a372
2024-05-24 17:28:37 +00:00
Ed Sanders ea5639b20b ESLint: Enforce prefer-const
Change-Id: I5985d1b532988bb3b71ff1aa24eae57ac2e1b9c5
2024-05-24 16:50:13 +01:00
Ed Sanders 44303de9cf ESLint: Replace some lets with consts by moving declarations
Change-Id: I710bff5fe04268172a40af75eb6ff5910eaf0255
2024-05-24 16:50:13 +01:00
Ed Sanders dda9227947 ESLint: Manually fix remaining no-var violations
Change-Id: I4474bd0205e7a1ed8e60147e52675e3e0b93ccd9
2024-05-24 16:50:11 +01:00
Ed Sanders ca5157156a ESLint: Autofix no-var rule
Leave rule off for now as manual fixes are required.

Also temporarily disable prefer-const rule as that
will also require some manual fixes.

Change-Id: I8c3478f26f51287acb943bd38c9c1020c06b9f39
2024-05-24 16:49:36 +01:00
jenkins-bot 5689650a6a Merge "Replace $.extend with Object.assign" 2024-05-02 21:42:02 +00:00
Ed Sanders 1e0aa2171f Replace $.extend with Object.assign
Change-Id: Id559ab68451a1d767e92ed17b1ef0832a5f243af
2024-05-02 16:49:43 +01:00
Ed Sanders 2dd73f935c JSDoc: {Mixed} -> {any}
Change-Id: I78bdc1ec8767dca05e979d8c6ebfed72573acc6f
2024-05-02 10:36:24 +01:00
jenkins-bot 28a529b31d Merge "CommentController: Delay polling on error" 2024-04-30 20:03:09 +00:00
jenkins-bot 3c4b5364f2 Merge "Prefer short arrow functions" 2024-04-30 16:57:37 +00:00
jenkins-bot 8b9a813b11 Merge "Clean up handling of <span class="mw-headline">" 2024-04-30 16:48:56 +00:00
jenkins-bot 9f7de3e917 Merge "Remove the "offset" from getHeadlineNodeAndOffset()" 2024-04-30 16:48:54 +00:00
Bartosz Dziewoński ede626faa2 Remove unused styles for .mw-ui-icon
The mobile site no longer uses the .mw-ui-icon class.

Change-Id: I212c743997839eeca63a23bf618436787af32fa4
2024-04-29 18:55:43 +02:00
Bartosz Dziewoński 1bfd97580e CommentController: Delay polling on error
Use exponential backoff.

Bug: T362814
Change-Id: I436a700de3b89abbfa1f991bcf6dc7aa52008cbd
2024-04-26 04:56:34 +02:00
Bartosz Dziewoński 3cffe1190e Clean up handling of <span class="mw-headline">
The PHP code should never see a `<span class="mw-headline">` node
since MediaWiki change If04d72f427ec3c3730e757cbb3ade8840c09f7d3,
but we have to support it for our old integration tests (T363031).

Improve code comments to explain this and move the handling to
one place, so that it can be deleted more easily in the future.

Follow-up to 08f61b2609.

Change-Id: I5ab9d3373a6911c1456c30d844b66576b278a1b5
2024-04-20 00:16:45 +00:00
Bartosz Dziewoński 7445294b3b Remove the "offset" from getHeadlineNodeAndOffset()
Since c6cd20f682 the offset is always 0.

Change-Id: I9c1c8230f897d8bb287ca47056f5fa9fb187d060
2024-04-20 00:34:32 +02:00
Bartosz Dziewoński d4c5aebd8f Prefer short arrow functions
When an arrow function body contains just a single `return` statement,
the braces can be omitted.

(Changes are mostly made by `grunt eslint --fix`, with only some line
breaks added by hand.)

Change-Id: I37f259f87085c8d20ed09cfa58a8456dd36cdc38
2024-04-20 00:08:51 +02:00
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
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
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
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
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
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 b8d42a0667 Merge "Use standard gray color for timestamp links" 2024-03-13 15:57:31 +00:00
jenkins-bot 63dd90a8dc Merge "Fix collapsed sections when recovering autosave on mobile, take 3" 2024-03-07 17:36:12 +00:00
David Lynch 01749e4970 Instrument when permalinks are copied
Bug: T359182
Change-Id: I3a7cfc0eaf6472804cc587cfa320bdc20b462492
2024-03-05 11:35:46 -06:00
Bartosz Dziewoński 4958416caf Only include one set of DiscussionTools buttons in the page HTML
We no longer need to support toggling visual enhancements without
reloading the page, so we can remove the extraneous set of buttons
to reduce HTML size.

Bug: T322457
Change-Id: I54e57c754c54b7e611069f9832d1ebabf141a396
2024-03-01 16:51:17 +00:00
Bartosz Dziewoński a9966234ac Fix collapsed sections when recovering autosave on mobile, take 3
We need to more carefully wait for mobile section toggling to happen.
Follow-up to 3957d7ac25.

Bug: T338920
Change-Id: I1bd31483c5be9428075f07494e89b06f19f8bf23
2024-02-28 04:43:59 +01:00
jenkins-bot 545d17d2c9 Merge "Replace spaces in link fragments before searching for topics/comments" 2024-02-26 19:21:11 +00:00
Ed Sanders 16e308119f Replace spaces in link fragments before searching for topics/comments
MediaWiki should never generate links like this, but users or 3rd
party tools probably create them accidentally quite regularly, and
we do a similar thing with Title normalisation.

Change-Id: Ia467f422578bcb9b4d3fb8feab0b85f4b6436f7e
2024-02-26 18:59:00 +00:00
jenkins-bot 85f75fb8ed Merge "Parser: Minor code cleanup" 2024-02-16 12:40:19 +00:00
jenkins-bot a386c3a251 Merge "Remove "Read as wiki page" feature on mobile talk pages" 2024-02-15 23:42:09 +00:00
Bartosz Dziewoński ef13c65d55 Use standard gray color for timestamp links
Bug: T275729
Change-Id: I122155f02a7cd771f358b7536909bc5f59abee2c
2024-02-15 03:23:53 +01:00
Ed Sanders c99e07881d Comment MonoBook fixes which are actually Apex fixes
Change-Id: I44ddc7ad4cef556b71fb3f6710d92500dfd4e9ac
2024-02-13 13:54:38 +00:00
Ed Sanders bb579ef4c6 Reduce opacity of overflow menu button
This is still an experimental feature and not deployed
anywhere, but as we mute the timestamp to indicate it
is more part of the interface than the content, we should
do the same with this overflow menu button.

Change-Id: I30391912377692fffa9e67e8c4ca63db715878bf
2024-02-09 23:53:20 +00:00
jenkins-bot 26abd2383d Merge "Fix collapsed sections when recovering autosave on mobile, take 2" 2024-02-08 16:38:22 +00:00