Commit graph

3540 commits

Author SHA1 Message Date
Ed Sanders f2265f918f highlighter: Show a different message for missing heading links
These are not widely used anywhere, but linking to an #h- heading ID
that doesn't exist should say "topic not found" rather than
"comment not found".

Change-Id: Ifd269cc72e640f36431f85c751874ca06229ba9f
2023-10-28 15:28:30 +01:00
Translation updater bot cb26bb912f Localisation updates from https://translatewiki.net.
Change-Id: Ic67ee305cea1a87d8fd78f8b6507e4fb548dfffc
2023-10-27 09:20:02 +02:00
jenkins-bot ee8a898f69 Merge "Use VE shortcut-generation code for replywidget button labels" 2023-10-26 16:47:18 +00:00
jenkins-bot 8ca33158c3 Merge "Use type hints for properties, remove PHPCS overrides" 2023-10-26 16:42:10 +00:00
David Lynch 0b64a1a52c Use VE shortcut-generation code for replywidget button labels
Now that the base ReplyWidget depends on VE.

Change-Id: I6bd2bf1b0867a0aeae8e94e35a2e765cad3e72f4
2023-10-26 16:29:08 +00:00
Translation updater bot e628cb0b03 Localisation updates from https://translatewiki.net.
Change-Id: I07ed65b8ffa75f6b25c90ba57ff83720ef05a18d
2023-10-26 11:03:54 +02:00
jenkins-bot c3269996a3 Merge "styles: Use new forward-facing breakpoint tokens" 2023-10-25 13:06:30 +00:00
Translation updater bot 62b93381bd Localisation updates from https://translatewiki.net.
Change-Id: If7c3b458f920aad281f7760a0e0d83c8f98a7749
2023-10-25 09:02:11 +02:00
Volker E 728db90e88 styles: Use new forward-facing breakpoint tokens
Replacing legacy breakpoint variables with new Codex
design system `@max-width-breakpoint-*` tokens.

Bug: T331403
Change-Id: Ib1ff07a7692948b1fd22e9620c132133d392dab9
2023-10-24 23:43:06 -07:00
Translation updater bot 47bbd11b10 Localisation updates from https://translatewiki.net.
Change-Id: I218768a0968b8f9a0addeb8a90a9ebf4cc547810
2023-10-24 09:37:01 +02:00
jenkins-bot 176e8f5ad2 Merge "highlighter: Replace "comment" with "thread item" in several places" 2023-10-24 01:48:30 +00:00
jenkins-bot 107382b53c Merge "persistRevisionThreadItems: Use SQL expression builder" 2023-10-23 12:43:12 +00:00
Translation updater bot f33114c445 Localisation updates from https://translatewiki.net.
Change-Id: If68015456ad1b5ef241d47c15d26d7a6f26c6297
2023-10-23 09:50:33 +02:00
Bartosz Dziewoński 2fc7f17bc0 persistRevisionThreadItems: Use SQL expression builder
Change-Id: I9dc94b9d3ad927eab81abf9d3aef782c20eaa482
2023-10-21 23:22:34 +02:00
Bartosz Dziewoński e5b44868f8 SubscriptionStore: Use InsertQueryBuilder for upsert
Change-Id: I66bc1de818eb367e5aa5adde7619a8ce6930bfc8
2023-10-21 23:12:17 +02:00
Ed Sanders 7aee0a48f0 highlighter: Replace "comment" with "thread item" in several places
We support highlighter HeadingItem's despite saying CommentItem
in a bunch of places.

Also potentially show the "not found" notification if the URL hash
starts "h-" as well as "c-".

Change-Id: I51894902bfca405bbdec89806bb9c1d76e0b40ef
2023-10-21 15:54:25 +01:00
jenkins-bot d501467802 Merge "Use ParserOutputAccess flags instead of ParsoidOutputAccess flags" 2023-10-20 17:44:31 +00:00
Subramanya Sastry 95c93adf40 Use ParserOutputAccess flags instead of ParsoidOutputAccess flags
ParsoidOutputAccess constants are deprecated and we want to remove them.

Change-Id: I105dbb1c599107d96111273ab106056090250984
2023-10-20 14:56:18 +00:00
Ed Sanders 7215fd0d7b Make 'any' the default for DiscussionToolsAutoTopicSubEditor
All features should be enabled by default for 3rd party installs.

I74ecd243 ensures this will have no effect on WMF wikis.

Depends-On: I74ecd2438c86d99b5727de488c928cc7d37da6db
Change-Id: Ia3245902abf2601f53065f1ffb94133d7b25e223
2023-10-20 14:50:41 +00:00
Translation updater bot c0faf5ed52 Localisation updates from https://translatewiki.net.
Change-Id: I90a4d55ca52bbfc60e373632e4e5f59e38d23c02
2023-10-20 09:19:43 +02:00
Bartosz Dziewoński 781a33357b Use type hints for properties, remove PHPCS overrides
MediaWiki's PHPCS plugin requires documentation comments on all
properties, unless those properties are typed.

This has potential to introduce bugs – in particular, because typed
properties without a default value will throw an exception if their
value is accessed before it's defined, while previously they defaulted
to null. I fixed this when I found it (making them nullable and null
by default), but I may have missed some cases.

Change-Id: If5b1f4d542ce3e1b69327ee4283f7c3e133a62a0
2023-10-19 19:31:02 +00:00
Translation updater bot 0312df9e72 Localisation updates from https://translatewiki.net.
Change-Id: Iab67c676d0a832d0eb7e9965b9af1273a308bd19
2023-10-19 08:41:44 +02:00
Ed Sanders f8b76afef3 [BREAKING CHANGE] Remove isSectionEditable from overflow hook
Instead make isUneditableSection an optional property of
ContentHeadingItem.

Change-Id: Icfddf28aa789b5014ac183ff9f9699f38d78c121
2023-10-18 12:56:46 +01:00
Kosta Harlan 36c0b20c66 overflow menu: Display next to comments on desktop
Why:

- Per T338534, we want to display the overflow menu next to topics and
  comments. Supporting topic-level placement is a little more
  complicated, so just go with comments for now.

What:

- Rework the is-mobile check to allow the code to run on desktop/mobile,
  while excluding topic-level replacement on desktop (T342627)

Bug: T338534
Bug: T342625
Change-Id: I520c377120e16aa3a6fedcc8c39075958a942e4c
2023-10-18 11:37:18 +00:00
jenkins-bot 2cca063357 Merge "Distinguish between MobileFrontend and Minerva" 2023-10-17 20:24:28 +00:00
jenkins-bot 4729a2757d Merge "Fix topic subscription icon in Minerva" 2023-10-17 19:49:34 +00:00
Translation updater bot f99300440d Localisation updates from https://translatewiki.net.
Change-Id: Ie9a30067c6db120091803ec642646ed5baf5be71
2023-10-17 09:34:12 +02:00
Translation updater bot f4c86a56e5 Localisation updates from https://translatewiki.net.
Change-Id: Ib2b2eee874a5da732f06d44d1fd2e369f59a1122
2023-10-16 09:15:40 +02:00
jenkins-bot eca326ede5 Merge "Support ignoring "mw-notalk" before/after/between comments" 2023-10-13 17:44:20 +00:00
jenkins-bot f669b6365d Merge "Don't clear comment highlight when clicking on another link" 2023-10-13 17:44:19 +00:00
jenkins-bot df863ad3b5 Merge "Fix truncating multibyte chars in section names" 2023-10-13 17:42:53 +00:00
jenkins-bot 0b7b34616f Merge "Avoid a Chrome bug causing text to be cut off in topic subject input" 2023-10-13 17:40:07 +00:00
jenkins-bot eb6071816a Merge "Merge ReplyWidget[Plain/Visual] modules" 2023-10-13 16:22:50 +00:00
Ed Sanders 81e690df8c Distinguish between MobileFrontend and Minerva
Change-Id: I7490190a6ddd3def502335b6dc2ec0d39477256b
2023-10-13 14:39:17 +01:00
Ed Sanders 2095c5113b Fix topic subscription icon in Minerva
Change-Id: Ic8940696fcabd677e896aeeb7c14cdc2a5df1382
2023-10-13 14:23:10 +01:00
Ed Sanders 185396a8e5 Merge ReplyWidget[Plain/Visual] modules
Only a fraction of a percentage of users are still using
ReplyWidgetPlain, and keeping these modules separate:
* Adds to code complexity
* Adds to ResourceLoader module bloat
* Causes bugs when we use VE dependencies in the
  core ReplyWidget class

The disadvantage is that ReplyWidgetPlain will now be
loading all of the VE dependencies, but this will make
switching to visual mode faster.

Bug: T348834
Change-Id: Ifb0cfd43fdab761c3321ad01fa9fefca26473f86
2023-10-13 11:58:12 +01:00
Kosta Harlan 7b336049d0
CommentFormatterTest: OutputPage returns a User, not UserIdentity
Why:

- Code that interacts with DiscussionTools CommentFormatterTest may
  expect a User object, instead of a UserIdentity, because OutputPage is
  typed to return a User object

What:

- Change the mock to return User, not UserIdentity

Change-Id: I1354f5f8132fd0656f274cdf4f17cde7f93d9042
2023-10-13 09:17:39 +02:00
Translation updater bot 0fff06e6c6 Localisation updates from https://translatewiki.net.
Change-Id: I8c87055c1c3c56b48f3d6b85ced5e9426ae1ac68
2023-10-13 08:55:50 +02:00
jenkins-bot 67cb2ee5b6 Merge "overflow menu: Factor code into its own file" 2023-10-12 17:37:16 +00:00
jenkins-bot b4a95a6b5a Merge "overflow menu: Only show edit button in mobile" 2023-10-12 17:33:54 +00:00
jenkins-bot d92515b731 Merge "OverflowMenus: Don't pass 'editable' data to reply button overflows" 2023-10-12 15:26:02 +00:00
Translation updater bot b7a31aa5e5 Localisation updates from https://translatewiki.net.
Change-Id: Ib18fa08fe82b1bcdde650cd96b88f99e6c9a9316
2023-10-12 09:29:08 +02:00
Kosta Harlan 60bcf84dbb overflow menu: Factor code into its own file
Why:

- We'll reuse this functionality on desktop, so it makes sense to
  extract it to a standalone file

What:

- Remove relevant code from mobile.js and place in overflowMenu.js

Bug: T342251
Change-Id: I98f1253e8d6db31c1f71203b50911b6f1b92778b
2023-10-12 06:03:11 +00:00
Kosta Harlan ead2baf0f1 overflow menu: Only show edit button in mobile
Why:

- The button should only display for Minerva

What:

- Consult the skin name before adding the "Edit" button to the menu

Bug: T342251
Change-Id: I52cf2ca0663a4de0ee7add82910e745bcabf1c5f
2023-10-12 06:03:03 +00:00
Ed Sanders 52db0af5cf OverflowMenus: Don't pass 'editable' data to reply button overflows
'editable' refers to the section being editable, and is only for
use by heading items, not individual comments.

Change-Id: I3fb5841609c40a928071cea8987cf035ade464c2
2023-10-11 16:55:46 +01:00
Translation updater bot fb8aaca7a7 Localisation updates from https://translatewiki.net.
Change-Id: I008d70230f9d79b3895666d4e1cc4c442dcdbbac
2023-10-11 08:45:22 +02:00
Translation updater bot 7c5d3db814 Localisation updates from https://translatewiki.net.
Change-Id: I61f76bfeff070c0754e462b5ab4d2d3766aa2d36
2023-10-10 08:51:57 +02:00
Kosta Harlan 4c7ba1ba0e
CommentFormatterTest: Mock getConfig method
Why:

- Tests may invoke code that calls `getConfig` on the ContextSource

What:

- Mock the `getConfig` method

Follows-Up: I07b312b8c00f9b5d20e285874ed0a0153949dd18
Change-Id: I5c5b0d7cef24af108aeab461ba06b533eae4b739
2023-10-09 21:37:53 +02:00
jenkins-bot f9f9bf11f3 Merge "Always pass whole OutputPage (as IContextSource) to postprocess functions" 2023-10-09 18:05:54 +00:00
jenkins-bot db961ecd24 Merge "Put mobile ellipsis button menu in an overlay" 2023-10-09 17:27:22 +00:00