Commit graph

1910 commits

Author SHA1 Message Date
Ed Sanders a86d308d66 CommentItem.php: Store timestamp object instead of string
We do something similar in CommentItem.js with a moment object.
The object can be converted to a string when required.

Change-Id: Id7221e9201db0d89c3b771574634c878c9515ca0
2021-11-09 16:37:45 +00:00
jenkins-bot 2446d91af7 Merge "build: Update eslint-config-wikimedia to 0.21.0" 2021-11-09 14:00:04 +00:00
Ed Sanders dbe900b08c Handle window resize in debug mode
Change-Id: I1fdefd40b02a7d188c09b754b76aa658e7a18b76
2021-11-09 13:38:48 +00:00
Translation updater bot 9fb04a89b0 Localisation updates from https://translatewiki.net.
Change-Id: Ib50b438239bc69b43fefe73b52a451e9ab966bab
2021-11-09 07:28:51 +01:00
Ed Sanders 7c3e583bec build: Update eslint-config-wikimedia to 0.21.0
Change-Id: I72de463d5a878e555eeed0e7ce2772e1d3a46f06
2021-11-08 19:03:40 +00:00
Translation updater bot 9836d75a0c Localisation updates from https://translatewiki.net.
Change-Id: Ia2342595ed2bfd1310093dc29e88a7447d0e6de8
2021-11-08 08:16:50 +01:00
jenkins-bot 3861aadbb3 Merge "Add links to Special:TopicSubscriptions in preferences" 2021-11-07 12:10:44 +00:00
jenkins-bot 779c5acd4f Merge "Fix layout of [subscribe] links on desktop Minerva" 2021-11-05 23:29:41 +00:00
Bartosz Dziewoński 9daf5e1202 Fix layout of [subscribe] links on desktop Minerva
This is the minimal fix, they still look out of place, but they don't
break layout of the whole page.

Bug: T292241
Change-Id: I1538962dd266fb455051e4dfe2680e47c4d1bb4c
2021-11-05 23:24:28 +00:00
Bartosz Dziewoński 578be2f91e ReplyLinksController: Update teardown code
Follow-up to de4d4bfb21.

Change-Id: Ibc3293a43befbbb0af400b197993135d4492fe35
2021-11-05 20:21:22 +01:00
jenkins-bot 22f48be13b Merge "Support new topic tool on mobile" 2021-11-05 16:01:14 +00:00
Translation updater bot 91fa55cb9b Localisation updates from https://translatewiki.net.
Change-Id: If7396ed8d5d457b32ebda51816035c2cb6b345c3
2021-11-05 08:17:04 +01:00
jenkins-bot 28885e81aa Merge "Enable DiscussionTools mobile by default for ease of testing" 2021-11-05 00:01:08 +00:00
Ed Sanders 93c75c1521 Enable DiscussionTools mobile by default for ease of testing
Disabled on Wikimedia wikis in configuration:
I83845fb3f22f6c91bd277461598e9ebac42aa16a

Bug: T270536
Change-Id: I937f6e9e89a5bb1728db055d3ec3e12a50c91ef9
2021-11-04 23:54:42 +00:00
Bartosz Dziewoński d52e87a5d1 Fix default value of wgDTSchemaEditAttemptStepSamplingRate, tweak docs
Bug: T295052
Change-Id: I91974c3c6ef4810ab303907017ec45c43defe635
2021-11-04 19:23:52 +00:00
Bartosz Dziewoński 312cce03db Add links to Special:TopicSubscriptions in preferences
Bug: T294994
Change-Id: Ifd564f435e300232d220896e5a29bd8f43db326c
2021-11-04 19:51:08 +01:00
Ed Sanders de4d4bfb21 Support new topic tool on mobile
* Use featuresEnabled.newtopictool to decide when new topic
  links might exist on the page, instead of relying on
  `#ca-addsection` existing. Change the logic of that feature
  flag to check if __NONEWSECTIONLINK__ is on the page.
* Render the add-topic button locally in a hook to replace
  the one suppressed by onMinervaNeueTalkPageOverlay. Do so
  whenever the newtopictool feature is enabled (see above).

Bug: T270537
Change-Id: I3e3f7403b3b86bb84fcb75a8833919512519b70f
2021-11-04 18:19:40 +00:00
Bartosz Dziewoński 2d5af9608a Fix saving edit mode on mobile in reply tool
When this code was added in 5feb69612f,
it was inside the `if ( this.modeTabSelect ) { … }`, because switching
was an experimental option and could have been unavailable.

Switching is always available now, but the `modeTabSelect` widget
doesn't exist in the mobile version (because switching interface is a
part of the toolbar there), so this line should be outside the `if`.

Bug: T270536
Change-Id: I7c5959281e77558bfe82bd39d38ba4dda36d590c
2021-11-04 18:19:30 +00:00
Bartosz Dziewoński 4912a1bf5c Reload the page after posting a comment on mobile
MobileFrontend does not use the 'wikipage.content' hook, and its
interface will not re-initialize properly after we update the page
contents with the new comment. Reload the whole page instead.

Bug: T270536
Change-Id: I3f81e4d77faed367606e47678b8896051982359d
2021-11-04 18:19:06 +00:00
jenkins-bot 3104c94e9d Merge "Use MinervaNeue hook to disable talk overlay if DT mobile enabled" 2021-11-04 17:34:10 +00:00
jenkins-bot f2bd9e84b4 Merge "Support reply tool on mobile" 2021-11-04 17:06:32 +00:00
jenkins-bot 9a677a9da0 Merge "UsernameCompletion: Disable fragment auto-select" 2021-11-04 16:57:20 +00:00
David Lynch 7588a393e4 Use MinervaNeue hook to disable talk overlay if DT mobile enabled
Bug: T280051
Change-Id: I6a52adcfd8030b26649b609ca99902ff840e8fdf
2021-11-04 16:46:42 +00:00
Translation updater bot 53a864f0bc Localisation updates from https://translatewiki.net.
Change-Id: Ie90bf444781c3e3e5ba86911185040f54afee0b2
2021-11-04 10:07:58 +01:00
Bartosz Dziewoński d0f8794388 Handle JS exceptions in API error logging
When an exception is thrown by our code elsewhere, and caught by the
promise mechanisms, it bubbles up here in the `code` variable, and
`data` is undefined.

Change-Id: I8a0ac49d22d254f353797fc8978871502ae8b9de
2021-11-03 22:21:18 +01:00
Ed Sanders 900a01772f Support reply tool on mobile
Bug: T270536
Change-Id: I94d04e9cd442f9a4e0c5924da67c43a768417a8b
2021-11-03 17:49:06 +00:00
Translation updater bot 6cb595296f Localisation updates from https://translatewiki.net.
Change-Id: I8b8d65bd5a300c545b801d02c3f77ccc0f151f44
2021-11-03 08:20:33 +01:00
Ed Sanders 54471b5037 UsernameCompletion: Disable fragment auto-select
This causes the username to be selected on mobile, when
we want to place the cursor after it.

Bug: T294616
Change-Id: I29012ecd04cd553bf78ffff477babafacfeabb31
2021-11-02 23:35:29 +00:00
Translation updater bot 11d4c397bf Localisation updates from https://translatewiki.net.
Change-Id: I8487db1a4c2d0ccbc8529f69748b40c6fee01461
2021-11-02 08:06:51 +01:00
Ed Sanders 9b902bc46a UsernameCompletion: Fix limit parameter
`this.limit` is never set, which mean the API default of 10
was used.

The client limit is actually `defaultLimit` which is set to 8.
Double this so we can filter blocked users and still probably
have some results.

Change-Id: I8184fa0ce1527280f4503bcf638372421287f51a
2021-11-01 17:25:15 +00:00
Ed Sanders 62bc24cb86 UsernameCompletion: Filter out users with indefinite sitewide blocks from API results
Such users will never be able to reply to you on most pages,
so we shouldn't suggest pinging them. The may be able to reply
on their own user talk page, but in that case they will be
included in localUsers.

In the best case they just clog up your search results, in the
worst case they are offensive names which haven't yet been hidden.

Bug: T294783
Change-Id: I2445ed6dc98c10f8580b2c36106dd3e98bb876d6
2021-11-01 17:25:01 +00:00
Translation updater bot 5006e938fb Localisation updates from https://translatewiki.net.
Change-Id: I72ea77f58b2e3e6ed0b7cb8520ffea2fa89eddca
2021-11-01 09:33:31 +01:00
Amir E. Aharoni cc865692f1 Remove "successfully" from a message
This word is usually unnecessary in messages. See
https://www.mediawiki.org/wiki/Localisation#Avoid_jargon_and_slang

Change-Id: I54a11d4e18365209ff198a45e5e3c1c20e8353c4
2021-10-31 10:16:12 +02:00
jenkins-bot 10111ea872 Merge "Generate form tokens in the client to prevent double posting" 2021-10-29 22:32:47 +00:00
Ed Sanders 19a9070a59 Add dependency on mediawiki.user, required by logger.js
For the method mw.user.generateRandomSessionId

Change-Id: I7b3b6fdf7200ae2f580bb5eeb1bd25ca380a5800
2021-10-29 15:05:19 +01:00
Translation updater bot ff9512178f Localisation updates from https://translatewiki.net.
Change-Id: Ia9ac49eba82e57f4f2a0892034c5c79907b0cc03
2021-10-29 08:21:41 +02:00
Ed Sanders 6022982eb9 Generate form tokens in the client to prevent double posting
Store used tokens in session storage.

Bug: T286409
Change-Id: I88c81689d9cf3447f6cc77c849a84d52c8b2c0db
2021-10-29 00:17:14 +01:00
jenkins-bot 37397e1769 Merge "Logging for new comments" 2021-10-28 21:54:38 +00:00
David Lynch df47f9fda3 Logging for new comments
Bug: T286076
Change-Id: Ic78a49aedcb03d160d74ba3fa9660f3583f0e568
2021-10-28 21:50:23 +00:00
jenkins-bot 5bccc9452c Merge "TopicSubscriptions: Rename 'actions' column and unframe button" 2021-10-28 21:05:43 +00:00
jenkins-bot 93e7f10e68 Merge "TopicSubscriptions: Hide broken "Topic" sort" 2021-10-28 21:05:40 +00:00
jenkins-bot 9a8e33369b Merge "Allow more flexible overrides for the terms-of-use messages" 2021-10-28 15:05:16 +00:00
Translation updater bot e4b305d529 Localisation updates from https://translatewiki.net.
Change-Id: Ia009a206a0deb01dd820c4e48573763f1a457724
2021-10-28 08:27:39 +02:00
jenkins-bot 950d442501 Merge "Add [reply] link brackets during postprocessing after parser cache" 2021-10-27 16:42:23 +00:00
jenkins-bot 9ea6eaf459 Merge "Move body classes code to BeforePageDisplay hook" 2021-10-27 16:42:21 +00:00
Translation updater bot 4a5b1874f7 Localisation updates from https://translatewiki.net.
Change-Id: Iace040cd46e1f089d1a0dc9c874a9563ee99bdbd
2021-10-27 08:22:01 +02:00
Bartosz Dziewoński 98bba62e5d Add [reply] link brackets during postprocessing after parser cache
This should avoid them showing up in unexpected contexts where parser
output is used (e.g. API T292345, search T294168, action=render).

Also rename some variables to be directionality-neutral.

Bug: T292345
Bug: T294168
Change-Id: Ibcac44ee10f0842e205d9dd9a7f3a935ce0c690b
2021-10-26 19:55:09 +00:00
Bartosz Dziewoński 884d1f6ec6 Move body classes code to BeforePageDisplay hook
Seems like a better place and it avoids duplication.

Change-Id: I26643c42cb7aa19cf0dfae449347f2fec2f8bc61
2021-10-26 17:42:39 +02:00
Translation updater bot 7ee34804ac Localisation updates from https://translatewiki.net.
Change-Id: I1c265dce272bac7dd92e625ff763c416a6a25586
2021-10-26 08:17:12 +02:00
Ed Sanders f0149541b0 Update watchlist checkbox when main watchstar is changed
Bug: T294122
Change-Id: If50d5596fd86ed273658a275c9b3be31f39eaad7
2021-10-25 15:27:04 +01:00