Commit graph

3512 commits

Author SHA1 Message Date
Translation updater bot 95179859fa Localisation updates from https://translatewiki.net.
Change-Id: I33952e7feb113e2d28b9b532d52f18a705eb0835
2022-04-01 08:26:38 +02:00
Translation updater bot 925cabf21b Localisation updates from https://translatewiki.net.
Change-Id: Icba32268a4e227cfa794bd572b0a758d9d4193c8
2022-03-31 08:35:43 +02:00
Translation updater bot 134d850287 Localisation updates from https://translatewiki.net.
Change-Id: I27a19ae998d7fca5e972f49188707cde17117495
2022-03-30 08:17:59 +02:00
Bartosz Dziewoński b00b7cd5b5 debughighlighter: Fix date highlighting
Follow-up to 4c29304484.

Change-Id: Id088465c3060bcceb2c2b51d784fa60b9005e867
2022-03-29 23:52:00 +02:00
jenkins-bot eb275b7810 Merge "Use namespaced VisualEditor traits and classes" 2022-03-29 21:01:28 +00:00
jenkins-bot fd6297b8a8 Merge "Remove data-mw-comment-name attribute from subscribe links" 2022-03-29 21:01:25 +00:00
jenkins-bot f7bdbee121 Merge "ApiDiscussionToolsEdit: Use CommentParser to get name/title of last topic" 2022-03-29 21:01:23 +00:00
jenkins-bot 5d2443c4bc Merge "ApiDiscussionToolsEdit: Add $preview- prefix to variables used in parsing preview" 2022-03-29 21:01:20 +00:00
jenkins-bot 8a00babfe2 Merge "ApiDiscussionToolsEdit: Use existing $this->commentParser reference" 2022-03-29 21:01:18 +00:00
Reedy 400d6227b8 Use namespaced VisualEditor traits and classes
Change-Id: I06eefd96068675607ed66a8a307d86c24d21f916
2022-03-29 20:32:44 +01:00
Translation updater bot b799fa84c1 Localisation updates from https://translatewiki.net.
Change-Id: Iccba22d349f6ff1bf3450a677a0c4124e5dfa2a6
2022-03-29 08:05:38 +02:00
jenkins-bot 081fa1008a Merge "Use Sanitizer::stripAllTags() when generating notification snippets" 2022-03-28 22:42:39 +00:00
Ed Sanders 48fdcf1056 Remove data-mw-comment-name attribute from subscribe links
The HeadingItem's name is now present in the DOM, so just traverse
to it and use that instead.

Change-Id: If28e1588742513d606e3d8fcfb259b85acc0a873
2022-03-28 22:30:59 +01:00
Ed Sanders 43a04ab7ba ApiDiscussionToolsEdit: Use CommentParser to get name/title of last topic
This is a bit slower, but reduces logic duplication, and doesn't rely
on data-mw-comment-name, which we want to get rid of.

Change-Id: I79dc0937f3fc13677deb55b413796b54b747790e
2022-03-28 22:30:59 +01:00
Ed Sanders 5cc06baf2e ApiDiscussionToolsEdit: Add $preview- prefix to variables used in parsing preview
Avoids conflict with variables used later.

Change-Id: I0b74d4d041ae57e2ba18660da0871760bf5d5561
2022-03-28 22:30:41 +01:00
Ed Sanders 8bb41c9fb2 ApiDiscussionToolsEdit: Use existing $this->commentParser reference
Change-Id: I3e2b907103372e05de9035ab8058c0766cf39819
2022-03-28 18:30:36 +01:00
Translation updater bot f3f262a2a3 Localisation updates from https://translatewiki.net.
Change-Id: I5680453e8093bbaf9c094bacf49ae070db826ce7
2022-03-28 08:20:49 +02:00
jenkins-bot 63c6aceb2c Merge "Implement getTimestampString on CommentItem" 2022-03-26 21:25:13 +00:00
Ed Sanders 215695ad2c Refactor topic subscription logic
This will make it easier to support subscription buttons with
visual enhancements enabled.

Change-Id: I3614eada32885216358143a0cacf65966381679e
2022-03-25 11:57:58 +00:00
jenkins-bot a07871d7d7 Merge "Add item name to the JSON output of HeadingItem" 2022-03-25 11:51:42 +00:00
David Lynch 71049f4ce8 Add item name to the JSON output of HeadingItem
The name is needed for the topic subscription API

Bug: T285971
Change-Id: Iedbebdfd65d03ab01b22b35781803655749aa269
2022-03-25 11:45:50 +00:00
Translation updater bot 1fa478d5c2 Localisation updates from https://translatewiki.net.
Change-Id: I9417d4d87307d0e1738758047133dbe58d9f3584
2022-03-25 08:34:46 +01:00
Ed Sanders 579b8bb1d4 Implement getTimestampString on CommentItem
Change-Id: I1768e9993debe904d6a228942ad0188486d65c0b
2022-03-24 16:49:35 +00:00
Translation updater bot 9f8332bc68 Localisation updates from https://translatewiki.net.
Change-Id: I5eb8897d5a01c23ec746b9e32937d7cee542c01b
2022-03-24 08:34:18 +01:00
Translation updater bot 7e2502f920 Localisation updates from https://translatewiki.net.
Change-Id: I418aa8229c650e5fb1ac5582ecd0274f2351ddc3
2022-03-23 08:25:14 +01:00
jenkins-bot 7e4727ed45 Merge "ImmutableRange: Fix Phan suppression" 2022-03-23 01:16:05 +00:00
jenkins-bot 35b3fd2fc0 Merge "CommentParser: Replace uses of Title with TitleValue" 2022-03-23 01:14:16 +00:00
jenkins-bot 334e1a3f33 Merge "Fix parsing of non-English titles in tests" 2022-03-23 01:02:12 +00:00
Translation updater bot 7239aab22f Localisation updates from https://translatewiki.net.
Change-Id: I78e7d4323c78ef791aeabbfb2025569bb2ff3cf4
2022-03-22 08:29:21 +01:00
jenkins-bot d91fe7aad0 Merge "CommentUtils: Fix isSingleCommentSignedBy() with empty heading" 2022-03-21 23:45:53 +00:00
Bartosz Dziewoński c5375e05b9 CommentUtils: Fix isSingleCommentSignedBy() with empty heading
Change the order of checks to ensure that we have at least one comment
before we try comparing ranges, to avoid issues with empty headings
having collapsed ranges. It should be a tiny bit faster this way, too.

Bug: T304377
Change-Id: I59ad30cfc075dcec882e048d2d199744efec2114
2022-03-22 00:12:42 +01:00
David Lynch 7275377b3c Talk API for apps
Exposed as DiscussionToolsPageInfo prop threaditemshtml. It returns a
version of the output of CommentParser, lightly adjusted to provide a
nested comment structure rather than a pure flat list.

Bug: T285971
Change-Id: I2f8503d4ed740a04fb2f1e3a37ae4db649b3faba
2022-03-21 16:40:45 -05:00
Translation updater bot 0a68477f91 Localisation updates from https://translatewiki.net.
Change-Id: Ida65502d4ec12f56bf6f27cd014f2cb0ae2bbe7c
2022-03-21 08:14:37 +01:00
Bartosz Dziewoński 05996d71fe ImmutableRange: Fix Phan suppression
Change-Id: I9549ab3113e3255375e69e3337f3a4aadfa9b21e
2022-03-18 23:27:58 +00:00
Bartosz Dziewoński c7723baf72 CommentParser: Replace uses of Title with TitleValue
Another small step towards removing the reliance on global state.

Change-Id: Ifb4a5bcbef6606d02f1c7aa7385d72822cb0bad0
2022-03-18 18:24:34 +00:00
Bartosz Dziewoński b68832ace0 Fix parsing of non-English titles in tests
We were calling Title::newFromText() before setupEnv(), which meant
that the title for each test case was parsed using the default rules
for English, rather than the rules for the specified wiki.

This only makes a practical difference for tests with self-links.
Changed the only such test to demonstrate the fix.

Change-Id: I45561f1c9f0d149e2b743f0000b742bf6fc014af
2022-03-18 18:24:07 +00:00
Ed Sanders b4b6ae4e81 Make comment markers inline-block to fix comment wrapping in Safari
Bug: T298371
Change-Id: I40da5272fd9c44a5a81e303349d0e8fc404e344d
2022-03-18 14:31:36 +00:00
Translation updater bot aa1accebf1 Localisation updates from https://translatewiki.net.
Change-Id: I90621f8d91f70c9c7a9c5825d5e6cb5d734765a0
2022-03-17 08:36:57 +01:00
Translation updater bot 962d15df93 Localisation updates from https://translatewiki.net.
Change-Id: I7e9a38b9e65ccbbff08940b31bae2ad003dd9d39
2022-03-16 08:07:32 +01:00
jenkins-bot 0f8bd17634 Merge "Refactor highlights into a class, and add window resize listener" 2022-03-15 22:48:37 +00:00
jenkins-bot 6948f0b3f3 Merge "Move cache expiry update from ParserAfterParse to ParserAfterTidy" 2022-03-15 21:44:44 +00:00
C. Scott Ananian 8e09b67c0d Move cache expiry update from ParserAfterParse to ParserAfterTidy
The ParserAfterParse hook will likely be deprecated, as Parsoid can't
properly support it as-is.  Luckily, DiscussionTools isn't doing
anything in ParserAfterParse that couldn't happen in the (supported)
ParserAfterTidy hook.

Bug: T303630
Change-Id: If72feb1e277c09f4ea0df339f2dd097a9b329d71
2022-03-15 12:19:57 -04:00
Ed Sanders 3c66f066c2 Refactor highlights into a class, and add window resize listener
Bug: T303616
Change-Id: Id369cdfc511a7f0f5e19fff4c6424bec2f34ff55
2022-03-14 14:57:19 +00:00
Translation updater bot 8a42e67558 Localisation updates from https://translatewiki.net.
Change-Id: Ibd00de72425017d96fab51879eaed57713841fd8
2022-03-14 08:13:52 +01:00
Translation updater bot 7b471fd0f1 Localisation updates from https://translatewiki.net.
Change-Id: Iaba0b7cc4e3e0c13edd5296070781bd4feb07650
2022-03-11 08:32:28 +01:00
Bartosz Dziewoński 01b253c5b6 Don't allow the root node to be treated like a comment frame
Also fix a bug where headings would be ignored while checking for
comment frames. See task for detailed explanation.

Bug: T303396
Change-Id: I6495826b4b050ea80680e0798ac6ab4497a7c09e
2022-03-10 17:45:08 +00:00
Bartosz Dziewoński 77614a2d02 tests: Fix root node / container handling
Since times immemorial, and for reasons lost to history, our test code
was adding an extra <div> wrapper before parsing the HTML used for
tests. This wasn't a problem, until now, because I want to add some
tests for T303396 that need to check that the *real* wrappers present
in some test cases are handled correctly.

Changes to test cases mostly remove a leading "0/" from serialized
ranges, corresponding to removing the extra wrapper.

Change-Id: Ia50e3590538c8cd274b02d2a937ba1a3fbb4ac89
2022-03-10 18:43:58 +01:00
jenkins-bot dd24b0edcd Merge "Improve handling for comments after fake headings using wikitext ;" 2022-03-10 16:21:18 +00:00
Translation updater bot b486b40835 Localisation updates from https://translatewiki.net.
Change-Id: I09ad330a75bf2d8641109a644594f0b9b166c018
2022-03-10 08:19:04 +01:00
jenkins-bot d4a99f3e10 Merge "CommentModifier: Micro optimization to avoid copying" 2022-03-10 00:22:17 +00:00