Commit graph

1299 commits

Author SHA1 Message Date
Ed Sanders 16924515df Use passive event listeners for window scroll events
TODO comments suggested using the VE helper util, but
that is no longer necessary since all our browsers
support passive events.

Change-Id: I7026d4c5013857f25f4474b3bec840af6fbf9fb6
2023-08-09 16:43:39 +01:00
Ed Sanders 42b588c087 UsernameCompletionAction: Use @inheritdoc
Change-Id: Ic7b0eaead64cfc30e2c93b598bfbe4b9dee666f8
2023-07-24 18:53:47 +01:00
jenkins-bot 218d3aea38 Merge "Backend changes related to topic subjects in message body" 2023-07-11 15:21:50 +00:00
Bartosz Dziewoński 90f8fe5ec1 Reload page or redirect when saving an edit creates a temp account
Depends-On: I6cdc014fb39d35ce1f091b53dc3a9c4a3c95f9e9
Depends-On: I01e13ce1ebab462eeb0ba3847d4205a88965a127
Bug: T338002
Change-Id: I768e4fa2030d781bbc65428371bda17a87bd6a42
2023-07-10 22:55:58 +00:00
jenkins-bot 671ee1c685 Merge "Replace the last use of mediawiki.Uri" 2023-07-07 15:00:37 +00:00
David Lynch 9482ec0841 Unregister existing topic subscription handlers on init
Bug: T340402
Change-Id: If6907e183b0301e14679b61d7af5119bea006c2b
2023-06-26 11:43:54 -05:00
jenkins-bot 6de3603990 Merge "ApiDiscussionToolsEdit: Allow not returning the new revision content" 2023-06-22 21:31:32 +00:00
Bartosz Dziewoński 14d9652a78 Backend changes related to topic subjects in message body
Our edit API now recognizes topic subjects in the message body,
generates edit summaries from them, and optionally returns an error
if no subject is provided.

Bug: T334163
Bug: T338390
Change-Id: Iac3778a4a88a4def234be9d10b80d9796d35bceb
2023-06-22 10:35:04 +02:00
Bartosz Dziewoński cd6bccbb5a Replace the last use of mediawiki.Uri
Depends-On: Ia95a27c7d7ebc9e4779f82598152145f02993b29
Change-Id: I5bd5f1ea0c708d685fbfa104a03844275c61dae7
2023-06-21 15:33:15 +02:00
Bartosz Dziewoński 9ba9081efb Clean up old localStorage entries
Bug: T339042
Change-Id: Ia07c0234d23f16b04dd6c729fefd33c99f8cf9c6
2023-06-19 15:55:37 +00:00
jenkins-bot 7c0f099529 Merge "Redo wrapper for localStorage integration" 2023-06-19 15:54:16 +00:00
Bartosz Dziewoński f7d98d7690 Redo wrapper for localStorage integration
I think the issues in T329299 are caused by partially autosaved
comments. We store data in multiple localStorage keys, and if some of
them are stored but others are not (due to exceeding storage quota),
our code can't handle the inconsistent state.

We already have a wrapper around localStorage that tries to cover up
these issues. Change it so that all values specific to an instance of
a reply tool are stored under one localStorage key. This ensures that
all updates consistently succeed or fail, with no partially stored
state.

One of the reasons we haven't done this is because this requires the
whole data to be serialized to JSON every time, but our experience
with VE change 4355d697aa shows that this is fast enough.

Extra changes:
* Remove storagePrefix, now redundant
* Remove use of createConflictableStorage, now redundant
* Prefix the key with 'mw' as advised by mw.storage documentation
* Use ES6 syntax for the new code (just for fun)
* Use consistent expiry (T339042)

Bug: T329299
Change-Id: I347115f7187fd7d6afd9c6f368441e262154233b
2023-06-19 16:45:08 +02:00
jenkins-bot 0c7c7de242 Merge "Support ISO 8601 timestamps in the parser" 2023-06-19 12:31:58 +00:00
Theodore Dubois 4ca17b8c33 Support ISO 8601 timestamps in the parser
https://wikipesija.org is currently using ISO 8601 as the default date
format. The format is xnY-xnm-xnd"T"xnH:xni:xns and 'xn', 'm', and 's'
need support added.

Change-Id: I235098a578eb92ddd23ea47fa23d60df4b28f590
2023-06-17 11:36:43 -07:00
jenkins-bot e749702d2a Merge "Remove broken code" 2023-06-15 17:46:12 +00:00
jenkins-bot 3a796a228c Merge "Remove a mobile hack for post-edit messages" 2023-06-15 16:33:43 +00:00
jenkins-bot cf1a509313 Merge "Don't try to prefix browser title if a custom message is incompatible" 2023-06-15 05:34:28 +00:00
Ed Sanders 306ae10e0c Remove broken code
The wrong 'this' was being used. I don't think this additional
call is required because we have already disabled the section earlier.

Change-Id: I7c9005463223a3de94de5924bf5d5da22e7ca67c
2023-06-14 18:55:45 +01:00
Ed Sanders 8a8c7270cf Set URL fragment when recovering auto-save on mobile
This triggers Toggler.js in MF to open the section, which
may not be stored in sessionStorage, as DT can recover
from localStorage.

Bug: T338920
Change-Id: I695e2d423b5159ef4cdcefc0f4d4d0a05f46879b
2023-06-14 18:04:19 +01:00
Bartosz Dziewoński 6bf6105d2a ApiDiscussionToolsEdit: Allow not returning the new revision content
Sometimes we call this API and then reload the page (or navigate to
another URL), without using the page content it returns. Save some
work and some data transfer and don't generate it in those cases.

Depends-On: Ic5fac61f3ef9b2dfce6ff757f1d414a9f41f217d
Change-Id: If1aea90488e3f22cc31ac1f360139ae65acf000a
2023-06-12 20:28:45 +00:00
Bartosz Dziewoński f6e24150e9 Remove a mobile hack for post-edit messages
No longer needed since Ie0a49e5f37ac5e47066ce74d7e618d933cb30809
in MediaWiki core.

Change-Id: Id8f19cddd594cd82e2348992634015348e356e28
2023-06-12 20:28:36 +00:00
jenkins-bot 18af8d462d Merge "Delay the load of VE modules until we're sure they're needed" 2023-06-09 22:40:35 +00:00
David Lynch ab23c23d48 Delay the load of VE modules until we're sure they're needed
Bug: T336020
Change-Id: I492d7b17a1ee3563f531fd565647ffd1307bddd4
2023-06-09 14:53:44 -05:00
Ed Sanders 0672f4c74a Remove DiscussionToolsEnableMobile
This existed to do a staged rollout to WMF wikis.

Bug: T322497
Change-Id: I4562c166f3f07bce972f9d599de211147d2dc631
2023-06-06 13:25:21 +01:00
Ed Sanders d7e56679a4 UsernameCompletionAction: Tell widget to remove characters when using insertAndOpen
Change-Id: Iefad1e10feeb67b9c80580d62bd6215e839c2303
2023-06-02 14:22:37 +01:00
Bartosz Dziewoński d5668f0fde Don't try to prefix browser title if a custom message is incompatible
Some wikis customize the 'pagetitle' in ways that are not compatible
with the client-side message parser.

Depends-On: If1979da12777e4ee4e97937640fc5e6176f9b5fe
Bug: T317600
Change-Id: Id05a08f8d350a8d8c6d301a3cb3a53f3a798fe09
2023-06-01 00:09:08 +02:00
jenkins-bot 2eaf6f81a2 Merge "Prevent squishing headings too much in visual enhancements mode" 2023-05-30 13:08:08 +00:00
jenkins-bot ce29fc2a46 Merge "Remove the new topic tool hint" 2023-05-30 12:10:27 +00:00
Bartosz Dziewoński 291808ff2b Avoid duplicating new topic tool if there are multiple .mw-parser-output elements
Bug: T337476
Change-Id: I581e4a584b3f18597e17f157478d9f4ade41c24e
2023-05-25 15:03:35 +02:00
jenkins-bot c28bcaaabd Merge "UsernameCompletionAction: Document constructor and pass all args" 2023-05-24 19:02:22 +00:00
Ed Sanders 919bdf2a22 UsernameCompletionAction: Document constructor and pass all args
Change-Id: Ie1e37f423d68082be35df2aa7b08b7e372af25c5
2023-05-24 18:57:03 +00:00
Bartosz Dziewoński fda08f7b54 Remove the new topic tool hint
This temporary message has been shown for long enough.

This mostly reverts:
* d0eec56f6d
* f24a73a05a
* bd40523843

Bug: T322495
Change-Id: Ic1762e170547fba8b5fda225eff21e515ace512d
2023-05-24 20:15:49 +02:00
Ed Sanders 6ec2e36e45 build: Update devDependencies
Change-Id: I29a4c712515453a0790ca2b346e53d555f366aea
2023-05-24 18:55:11 +01:00
David Lynch 5568761377 Username completions: always abandon if the first input is a space
This has been added to the core behavior of shouldAbandon as well, but
the way it's overridden here needs to be changed since the
multiple-words check would override that.

Depends-On: If130cdc1df595e6ab12d531ce603cc42c8b3b5f3
Change-Id: Ie7bdc4a4702514fcb7d500924dad18729198b9e8
2023-05-20 09:47:40 +03:00
jenkins-bot 8e94616fad Merge "Update warning about logged-out editing for temp user creation" 2023-05-16 17:51:45 +00:00
Bartosz Dziewoński 8b2e0d7be9 Update warning about logged-out editing for temp user creation
Depends-On: I2ea656a8a1704a495f1a94fede1a8829ba7325a1
Depends-On: I84ce108b4d46b4e19fad032382f8b69a1b0065d5
Bug: T332432
Change-Id: I8487d7d249c66bf3c3c60120f490a6ba72745aac
2023-05-16 18:57:46 +02:00
jenkins-bot 8a0262d33a Merge "Don't show a link to change their preferences to temp users" 2023-05-16 15:34:48 +00:00
Bartosz Dziewoński cff03d96ec Fix Vector 2022 TOC metadata styles
Stuff changed in Vector.

Change-Id: Iff99763b6013dd687ceb6367d50cfd936ecb987b
2023-05-14 16:47:48 +02:00
Bartosz Dziewoński dde4bdebc1 Prevent squishing headings too much in visual enhancements mode
Also, replace a `px` value with an `em` value in another similar case,
to support users and skins changing base font size. The exact values
don't matter that much.

Bug: T335823
Change-Id: I18778b13948abc18d67631d620be0b658d04facf
2023-05-12 16:42:40 +02:00
Bartosz Dziewoński 060c38b7e0 Don't show a link to change their preferences to temp users
Temporary users will not have access to user preferences (T330815).

Bug: T332432
Change-Id: I5d0718613494db84de800cef0544fccb9e3d8b8c
2023-05-04 20:46:54 +02:00
David Lynch 83236058d5 Trigger a MobileWebUIActions show event for lede-button
Bug: T314596
Change-Id: I388873329e0dcb74633d81ca7ea633958ac3e56a
2023-05-04 11:25:40 -05:00
Bartosz Dziewoński 3c8bd658cf Close mobile lede section dialog when opening a tool
Bug: T327574
Change-Id: Icdf9ca05d3a1dec189cf4604a01141b07363dec3
2023-04-18 21:21:48 +02:00
Ed Sanders fed7f9482f Drop IE11 support
The following are now available in all browsers we support:
* mix-blend-mode in CSS
* Node#contains

Change-Id: I324948f0bceac6d86999300e2b2c8756613e56d2
2023-04-12 17:19:44 +01:00
Bartosz Dziewoński 316e741868 Support topic subscriptions when JavaScript is disabled
Unsubscribing was already available from Special:TopicSubscriptions
when JavaScript is disabled.

* Add links to subscribe/unsubscribe in CommentFormatter
* Update links in skin navigation
* Add support for subscribing in the actions

Bug: T321431
Change-Id: If3c4bf7df309d0d98237c3b7b9c129cc2f72cda3
2023-04-10 21:30:19 +02:00
Bartosz Dziewoński 6a7d949703 Remove integration with removed MobileFrontend talk page tools
* Remove the hook we used to disable that feature
* Remove CSS that only applied when it was enabled
* Update code comments that referred to it

Bug: T319145
Change-Id: If21a04f6a087289d8249a786f7c991e5e12c9bed
2023-04-04 17:17:49 +02:00
jenkins-bot 24185a1471 Merge "styles: Replace 'mediawiki.ui/variables' call with skin variables" 2023-04-04 15:12:11 +00:00
Volker E 03d1ea70ab styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
  skin variables – `background-color` `color`, `border-*`, `box-shadow`.
- removing skin overrides like `.skin-monobook`, they are now covered
  by the skin variables.
Patch requires MediaWiki core version >= v1.41.0.

Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Change-Id: I36c7a0f5ed06c3eccd792b19b6a1972663f20df6
2023-04-04 01:14:24 -07:00
Ed Sanders 92f5cfd821 Support suppressing comment detection in pages or sections
This can be done within sections using CSS:
* mw-notalk

Or at a page level using a magic word:
* __NOTALK__

"notalk" suppresses all comment detection, treating the content as
not containing any comments even if there are signatures present.

Bug: T295553
Bug: T249293
Change-Id: Ic1d7294bafcf7071e16838e70684ecadd7bc6fd3
2023-04-03 18:36:34 +02:00
Ed Sanders 856b90fa3e Support hiding reply links in archived pages or sections
This can be done within sections using CSS:
* mw-archivedtalk

Or at a page level using a magic word:
* __ARCHIVEDTALK__

"archivedtalk" still detects the comments, but disables features
as appropriate for an archived conversion, i.e. the reply tool.

Bug: T295553
Bug: T249293
Change-Id: Ic47693e9a2f53f92563ccdd50203fb55c12d0493
2023-04-03 18:34:57 +02:00
David Lynch fed37fcc82 preloadparams on other platforms supports numbered indexes
Change-Id: I4f1f5e8758007ab95e342ad5429c909f495d8deb
2023-04-01 22:49:06 +02:00