Commit graph

2321 commits

Author SHA1 Message Date
Ed Sanders 63acc121fc Thread containers: Link latest comment timestamp to corresponding comment
Bug: T309751
Change-Id: Id969bd7a76544d6024b8714c45cdfe5c59b71a0b
2022-06-24 21:44:21 +00:00
Ed Sanders b1be63469b Only enable visual enhancements in specific namespaces
Change-Id: I91643d3f07a9ee6f03a18f8e2787ab9cb61bc41d
2022-06-24 16:15:07 +01:00
jenkins-bot bb04010ab0 Merge "Truncate timestamps in comment IDs / names" 2022-06-24 08:33:22 +00:00
Translation updater bot 1c05db4609 Localisation updates from https://translatewiki.net.
Change-Id: If78136f44b9347caecfec0a6f366c992a8139e6a
2022-06-24 09:30:33 +02:00
Bartosz Dziewoński 109a50cb34 Truncate timestamps in comment IDs / names
For comments posted on or after 2022-07-12 (configurable), use a
shorter format, identical to the timestamps MediaWiki uses in URLs.

Changing the format for already existing comments would involve
difficult migrations, therefore we elect not to do it.

Bug: T304595
Change-Id: I387051a6a3a1d84cfae45c3e1516db870cc8b977
2022-06-24 00:49:58 +02:00
jenkins-bot 1a7011dde2 Merge "Show thread metadata in section headers" 2022-06-23 20:19:37 +00:00
Ed Sanders da64c43ccc Show thread metadata in section headers
Bug: T269950
Change-Id: Ifa47ddcbccf288be0bbecd5961eab7c5122aab7b
2022-06-23 17:17:09 +01:00
Translation updater bot d4c8044bed Localisation updates from https://translatewiki.net.
Change-Id: I590400762095875895cd0412a49c30d03f081807
2022-06-23 09:02:47 +02:00
Translation updater bot be62bd895b Localisation updates from https://translatewiki.net.
Change-Id: Ieb37e856acecd5556d61b6f2bb0e7ec9285b7fcc
2022-06-22 08:13:16 +02:00
jenkins-bot 54d5f7a898 Merge "Fix race condition causing highlights to not be cleared" 2022-06-21 15:41:53 +00:00
jenkins-bot 257565a5dd Merge "Tweak positioning of highlights to make them prettier" 2022-06-21 15:41:51 +00:00
jenkins-bot 58a9deb531 Merge "Set rootNode for items from in ThreadItemSet#newFromAnnotatedNodes" 2022-06-21 15:41:49 +00:00
jenkins-bot 151a140c75 Merge "topicsubscription: Reduce code duplication" 2022-06-21 15:40:58 +00:00
Translation updater bot 3c247c73ab Localisation updates from https://translatewiki.net.
Change-Id: I0571343aa3e1a7e64988a2246417f88dc50a1214
2022-06-21 08:30:32 +02:00
jenkins-bot d5d896a0dc Merge "CommentFormatter: Escape user input in generated comment" 2022-06-20 23:54:07 +00:00
Bartosz Dziewoński 1ec97b18d9 Fix race condition causing highlights to not be cleared
We cleared the highlight outside the setTimeout(), then set a new one
inside the setTimeout(). If this method was called twice quickly, two
highlights would be created, and the first one of them would become
impossible to clear.

Move the setTimeout() outside of the method to avoid this.

Bug: T311021
Change-Id: Ic8b2cf2a782a429c4ea073871efd215f4b300ed8
2022-06-20 22:51:39 +02:00
Bartosz Dziewoński d73ce24059 Tweak positioning of highlights to make them prettier
* Fix math and styling for RTL
* Make highlights for headings and framed comments cover them fully
* Align the far edges of wide comments

Bug: T309444
Change-Id: Iadbf83e02801fd9bd6336c84015994ee2819ce51
2022-06-20 19:03:50 +02:00
Bartosz Dziewoński a0750129e7 Set rootNode for items from in ThreadItemSet#newFromAnnotatedNodes
It's needed for the fix for T303396 to work correctly (in the case
where there's exactly 1 thread item on the page), and for the
highlight improvements in Iadbf83e02801fd9bd6336c84015994ee2819ce51.

Change-Id: I2b2f5535ebbf792910133622a271ac1491c74de6
2022-06-20 19:03:09 +02:00
Bartosz Dziewoński df22a66e42 topicsubscription: Reduce code duplication
Rather than making our own ThreadItem objects from scratch,
reuse those used by the rest of the code.

Change-Id: I67f5ea3ad26baffe51b66d0c75467ac00185dd0a
2022-06-20 19:02:46 +02:00
Ed Sanders d59d5e14f9 CommentFormatter: Escape user input in generated comment
Currently the only user input in a headingItem name is the username
which can't contain a '>', so the regex can't break, but this is
fragile, and we should always do our own escaping.

Change-Id: I14e5ae2dc1e9ad7639e61b5471aa9ce270137960
2022-06-20 12:09:02 +01:00
Translation updater bot c757398293 Localisation updates from https://translatewiki.net.
Change-Id: Ie3e7699ae7e84abc0b8dddf4c1228f5703164ce4
2022-06-20 08:16:44 +02:00
jenkins-bot 9058467403 Merge "ReplyWidgetVisual: Pass in memory-wrapped store to VE" 2022-06-17 22:26:06 +00:00
jenkins-bot 6c3f056904 Merge "Translate special page alias into Polish" 2022-06-17 13:31:30 +00:00
jenkins-bot 39401c4b6b Merge "ReplyWidgetVisual: Handle VE surface 'cancel' event" 2022-06-17 13:24:13 +00:00
Ed Sanders af5b9a9b46 ReplyWidgetVisual: Pass in memory-wrapped store to VE
We switched to our memory-wrapped store everywhere outside the
VE surface, but not in the VE surface itself.

Change the way we construct MemoryStorage objects so that they can
be constructed from a specific mw.SafeStorage instance.

Ensure MemoryStorage's cache is populated with initial storage object
data, and that the cache is copied over when we create derivative
objectes.

Bug: T310438
Change-Id: I652428f114dc5169195887cb8ca719ae196bb76f
2022-06-17 14:05:54 +01:00
Msz2001 64cd38c053 Translate special page alias into Polish
Change-Id: Ieac259d5cf48f786cd24f54fc40683fa254828b6
2022-06-16 10:07:17 +00:00
Translation updater bot 20c151db49 Localisation updates from https://translatewiki.net.
Change-Id: I4ea5220f0b847cf6982b5c99169569862e701c0c
2022-06-16 09:24:24 +02:00
Ed Sanders 7befd4a8fc Use new function signature for Target#initAutosave
Depends-On: I6ab00c089c9ae1a8bb05ce9405f1f1f2fd0915ca
Change-Id: I23eb131082260540d2cf5e2cad92c9514333862d
2022-06-15 23:49:49 +00:00
jenkins-bot 80173ed010 Merge "Convert more self:: to static::" 2022-06-15 19:42:57 +00:00
Bartosz Dziewoński 9eb200024e ReplyWidgetVisual: Handle VE surface 'cancel' event
Since change I29f6af4cc7c71a63a6d1bafc53d16b9abd1b60ec, VisualEditor
handles the Escape key to emit a 'cancel' event. We need to listen to
this event to allow Escape to close our editor when the surface is
focussed, in addition to the existing handling for the Escape key.

Change-Id: I8c0f2678d104a76d6a223aca9b57123b9f587ac7
2022-06-15 21:09:06 +02:00
jenkins-bot 90e1a3fbb6 Merge "Move placeholder heading level (99) to a constant" 2022-06-15 15:48:36 +00:00
Translation updater bot 7b1a5129cc Localisation updates from https://translatewiki.net.
Change-Id: Ibc66a40e8dbfa4d04c9ed1fca66187a9b9eb4d88
2022-06-15 08:41:20 +02:00
Ed Sanders 1f002f812f Convert more self:: to static::
These are from patches that were already in progress before
we did the first run of conversions.

Change-Id: Id883e693a518130cfcc80bfd0f2874cbd9593446
2022-06-14 22:53:00 +01:00
Ed Sanders 0ad9b4c6b2 Move placeholder heading level (99) to a constant
Change the HeadingItem constructor to take a 'null' headingLevel
and store this internally with the constant. Change the JSON
serializer to convert this back to null.

Change-Id: I27508eed75d94b99c5189548919309f8da7deb75
2022-06-14 22:51:49 +01:00
Translation updater bot 5da21d1b82 Localisation updates from https://translatewiki.net.
Change-Id: I6017df2176682f4693c4dca3e8845d6afd18465e
2022-06-14 08:48:02 +02:00
Translation updater bot 3800ab27e3 Localisation updates from https://translatewiki.net.
Change-Id: Ie474e844dacf4a7909cb43b29fcbb294675ac7db
2022-06-13 08:27:56 +02:00
jenkins-bot 901d822765 Merge "Clarify subject placeholder wording" 2022-06-11 22:44:31 +00:00
Ed Sanders c2535e26dc MemoryStorage: Setup this.data before calling parent constructor
The parent constructor may trigger read/writes in the future
so this.data should always exist as early as possible.

Change-Id: I79a795a26c4ce1381d2a0b15329f7df1d6ab77ca
2022-06-10 15:10:01 +01:00
Translation updater bot e8b16f67b1 Localisation updates from https://translatewiki.net.
Change-Id: I1ef4c49042b48914a2abfe01c33dcc2969fded47
2022-06-10 08:49:31 +02:00
jenkins-bot cb17181fa4 Merge "Prefer late static binding over self::" 2022-06-09 16:29:48 +00:00
Ed Sanders af54bae2ec Prefer late static binding over self::
While in many cases the class will never be sub-classed, it's easier
just to always use static:: and not worry about predicting which
classes might have problems in the future.

Change-Id: I23072a1701b5acf62bb3379a877de97627d8fcf3
2022-06-09 15:12:48 +01:00
Translation updater bot bd07028c47 Localisation updates from https://translatewiki.net.
Change-Id: I7073ccaa7227e285bf33f05e06c2ab066933418f
2022-06-09 08:16:30 +02:00
jenkins-bot 636ff45a75 Merge "TagHooks: Make static method for obtaining DiscussionTools tags" 2022-06-08 11:18:42 +00:00
Translation updater bot 277c5200e9 Localisation updates from https://translatewiki.net.
Change-Id: I737cdc50a7050395e1929e5de0ae9842785474e1
2022-06-08 08:26:56 +02:00
Ed Sanders c96c076a4e Follow-up I46a58f6a: Add missing test runner
Change-Id: I17438cf55959d146265f3aafa5940f7fe0de19e1
2022-06-07 16:09:04 +01:00
jenkins-bot 9dedb23512 Merge "Show createpage preference only when feature is available" 2022-06-07 12:52:09 +00:00
Bartosz Dziewoński bc77963180 Revert "Localisation updates from https://translatewiki.net."
This reverts commit 790ef19cd3.

Reason for revert: Removed some qqq messages, breaks CI testing.

Change-Id: I43d75beb775abebb263f957cd1c28dc9d84f7ec4
2022-06-07 12:39:38 +00:00
na1307 edb276e047
Show createpage preference only when feature is available
Bug: T310053
Change-Id: I13262ecbe2d2c45c0ffb8706da17bc806ab2a5b7
2022-06-07 18:59:15 +09:00
Translation updater bot 790ef19cd3 Localisation updates from https://translatewiki.net.
Change-Id: Ib6f5b118c7fc6772197df8ae303304e49092d13b
2022-06-07 10:00:44 +02:00
jenkins-bot b6abc80c35 Merge "Add preference for offering new topic tool when creating new talk pages" 2022-06-06 23:01:40 +00:00