Commit graph

2453 commits

Author SHA1 Message Date
jenkins-bot 47158f28dc Merge "Fire new 'wikipage.tableOfContents' hook to update TOC after save" 2022-08-01 19:49:39 +00:00
Ed Sanders 980b2c38bc Make reply links into buttons when visual enhancements enabled
Bug: T255560
Bug: T309904
Change-Id: I3932f576086a43df89ff97a1b3dafdc27c54f71c
2022-08-01 20:59:53 +02:00
jenkins-bot 9ceccd2d48 Merge "Fix styling of new comment notification on mobile" 2022-08-01 18:28:10 +00:00
jenkins-bot d247842772 Merge "Ignore "tracked" templates at the beginning of comments" 2022-08-01 14:52:39 +00:00
jenkins-bot 6b5352fb1c Merge "Add more tests cases using the "tracked" template" 2022-08-01 14:51:54 +00:00
jenkins-bot 96868976bf Merge "Re-enable keyboard sequences for template, table etc. in new topic tool" 2022-08-01 12:28:15 +00:00
Translation updater bot c0410ae47c Localisation updates from https://translatewiki.net.
Change-Id: I85883950669be48a65cc96c3119cc78582925edd
2022-08-01 08:22:09 +02:00
Ed Sanders 54eabe1f4f Fix styling of new comment notification on mobile
* Keep buttons on the same line
* Reduce font size to align borders

Change-Id: I1cc44ae1bd8b5e45d9a5b2ea4f9352163d12e8e6
2022-07-31 23:00:05 +01:00
jenkins-bot 437ced8e3e Merge "EventDispatcherTest: Use null instead of special placeholder file" 2022-07-31 15:52:13 +00:00
Bartosz Dziewoński ddd391b6db Ignore "tracked" templates at the beginning of comments
This improves the behavior when replying to these comments
and the message snippets shown in notifications.

Bug: T313097
Change-Id: Ia10400472c9e999fa526c7437a03b72461c37b74
2022-07-31 03:56:36 +02:00
Bartosz Dziewoński a0bcd6eb05 Add more tests cases using the "tracked" template
Change-Id: I7327cd2140fb8622f65ab8f96daba99f16f9e3af
2022-07-31 03:56:33 +02:00
Bartosz Dziewoński 612544de5f EventDispatcherTest: Use null instead of special placeholder file
It's easier to read this way, not sure what I was thinking when I wrote this.

Change-Id: Ie59f86143885593214d85ec05576212dc4624995
2022-07-31 03:29:48 +02:00
Bartosz Dziewoński e5abfdbe8a Re-enable keyboard sequences for template, table etc. in new topic tool
They were only disabled in the reply tool, because their wikitext
markup doesn't work when indented. This is not a concern in the new
topic tool.

Rename our sequences that display the wikitext warning to avoid these
items showing up in the command help dialog, and remove overrides for
global ve.ui.commandHelpRegistry. (As a result, the dialog now lists
the blockquote command, which was previously missing even though it
was enabled, but only with the 'Ctrl+8' shortcut and not 'Type ":"'.)

Also remove filtering rules for external paste.

Bug: T311653
Change-Id: I4557c376fcf099d81e91ae5c2b18301d97921180
2022-07-31 02:40:12 +02:00
Ed Sanders 434e11df87 Enable new comment notifications on mobile
Since writing this feature we added the ability to update
the page dynamically on mobile, so this shoud just work now.

Bug: T301929
Change-Id: Iceb5d8c90a892807745ba7133b7dd389293d3327
2022-07-31 00:07:14 +01:00
Ed Sanders 4da2ecf32f Hide section collapse button in preview.
In general we are hiding non-content elements in the preview
and this matches the behvaviour of the article editor.

Change-Id: I6669d8cc737214d464b662ccc6900ccce229b3d7
2022-07-29 14:09:56 +01:00
Translation updater bot ef3da04807 Localisation updates from https://translatewiki.net.
Change-Id: I7a44132e208ae9feb4bbf1bf1cd5f0a0fe3157ba
2022-07-29 08:52:57 +02:00
jenkins-bot a18c5c3e3a Merge "Don't show empty page state on redirect pages" 2022-07-28 22:26:11 +00:00
Ed Sanders fcdd6b0ed5 Don't show empty page state on redirect pages
Add the redirect check to shouldShowNewSectionTab.

Try to run cheaper checks before more expensive ones.

Depends-On: I5755863243d8ad336ad20626f439d70eb3b31f32
Bug: T312599
Change-Id: I6848e529a2537d4058613db0c3b900bc9f4f59f8
2022-07-29 00:15:42 +02:00
jenkins-bot 508e6446c5 Merge "API ThreadItemsHTML: improve generation of othercontent" 2022-07-28 21:56:56 +00:00
Bartosz Dziewoński f4a9d5b8f9 Fire new 'wikipage.tableOfContents' hook to update TOC after save
Bug: T294950
Depends-On: Icaeda68ded94a04edef7a3629385eeb232048684
Depends-On: I1644a74370b42b04d0db167879f7de2207ebfcf5
Change-Id: Ic3ef4e332ade8918778b6aaaa8eaf7e98f0a8d7d
2022-07-28 23:37:29 +02:00
jenkins-bot 6330816a1c Merge "More consistently handle new topic tool vs empty state" 2022-07-28 13:41:24 +00:00
jenkins-bot c13926de8a Merge "Don't show new topic tool empty state on existing non-talk pages" 2022-07-28 13:40:43 +00:00
David Lynch ec0e2920ae API ThreadItemsHTML: improve generation of othercontent
Othercontent would often contain the opening tag of the next heading /
section. By looking for the closest node with a previousSibling we can
more-reliably escape the heading.

Also, only add the initial placeholder if there's content before the
first heading. We do this by testing for any siblings before the
startContainer of the first heading -- if there are any, assume this
means there's some sort of content. (This can still result in a
placeholder with `othercontent:""` if there's only whitespace before
the first heading.)

Bug: T313850
Change-Id: I080205b74413c46d3cf3442e79276145aaa9439c
2022-07-28 02:51:18 -05:00
Translation updater bot ec2c4acf85 Localisation updates from https://translatewiki.net.
Change-Id: I7963edecb0b436a6c608c88766fbd4ef2f11d5ed
2022-07-28 08:56:50 +02:00
Bartosz Dziewoński e1499c0291 More consistently handle new topic tool vs empty state
We had different logic for the empty state on pages that exist and
those that don't. For the second case, we relied on the new topic tool
becoming unavailable in some cases, but that could cause complications
elsewhere (e.g. if the page also had a custom button to add a new
section).

The new topic tool is now available regardless of the page. Instead,
the empty state is controlled separately, by the same method in both
cases.

As far as I can tell, the effect is exactly the same as before.

Change-Id: I5b36e6f027cf76dd0e3a8ee3cb5156fe1eaac8a8
2022-07-28 02:16:07 +02:00
Bartosz Dziewoński 34e755c623 Don't show new topic tool empty state on existing non-talk pages
Bug: T312599
Change-Id: Ie691498f7b89cb34a414cb8dfae9337f1b706685
2022-07-28 01:57:32 +02:00
jenkins-bot 131f00c464 Merge "Add topic containers HTML to parser cache even when feature is disabled" 2022-07-27 19:19:48 +00:00
jenkins-bot 5dad5e63c2 Merge "Visual enhancements: Fix loading of icons" 2022-07-27 16:33:28 +00:00
Ed Sanders 5e2b209314 Add topic containers HTML to parser cache even when feature is disabled
Remove hacks marked as 'TEMPORARY' now that we consider the
HTML to be stable enough.

This will avoid issues with HTML/CSS being out of sync in future deployments.

Bug: T313560
Change-Id: Ie00ff38a422f241add19d500adaf22dfeee10e8c
2022-07-27 17:26:33 +01:00
Ed Sanders 06d14d8c8f Visual enhancements: Fix loading of icons
* clock, userAvatar, speechBubble were dropped before topic
  containers was merged
* Load ellipsis & edit icons on mobile only
* Load bell & bellOutline for topic subscriptions button

Change-Id: I77d1336627b564be756e3ec50b4686b8f9ac72dc
2022-07-27 18:24:54 +02:00
Ed Sanders 2f44d99184 Simplify CSS selectors for [reply] and [subscribe] links
:first-of-type selectors refer to the node name, so just
use :first-child and :last-child for the open and close brackets.

Change-Id: I2e8ca7e99d1262522ed2d3b5133093817af8ad29
2022-07-27 16:22:11 +00:00
jenkins-bot a9ad7dbb24 Merge "Move subscribe button up on desktop" 2022-07-27 14:16:14 +00:00
jenkins-bot b81e60e9cb Merge "Prepend subscribe links to headings" 2022-07-27 14:13:37 +00:00
Ed Sanders 2960853088 Move subscribe button up on desktop
Bug: T312674
Change-Id: I419883b5f9a4291b4bf575d57195d553fd5e291e
2022-07-27 13:55:03 +01:00
Ed Sanders df1cd6be80 Prepend subscribe links to headings
This ensures they stay aligned with the top of the heading when text wraps.

Bug: T313406
Change-Id: Ifd8f93f63a1b3e3e4bd38a1d74f9afed647f7e68
2022-07-27 13:48:28 +01:00
Translation updater bot 821eb1a518 Localisation updates from https://translatewiki.net.
Change-Id: I20dd03614f52838172291eddf30afed7b4f69089
2022-07-27 08:26:06 +02:00
jenkins-bot 61f76003d1 Merge "Show empty state on mobile when there is only non-discussion content" 2022-07-26 13:24:29 +00:00
Ed Sanders 1d1df63cab Show empty state on mobile when there is only non-discussion content
Bug: T313801
Change-Id: I4e9910ef7d63c6ce330da1a896f518a9a22a12cd
2022-07-26 13:52:22 +01:00
Translation updater bot 1419b79063 Localisation updates from https://translatewiki.net.
Change-Id: Id9dd8d67000382a097d2d68ac2f7bd335a173464
2022-07-26 08:25:00 +02:00
Bartosz Dziewoński e7bbc9864c ReplyWidget: Scroll save error into view after showing it
Bug: T298263
Change-Id: Ibe488bf9184dc9d9c3c8b2c3491c0baf6676ba16
2022-07-25 18:16:13 +02:00
Translation updater bot c93edc44b7 Localisation updates from https://translatewiki.net.
Change-Id: I75c18ff9a66c2c0595bdfb778523aa60690eae05
2022-07-25 09:50:22 +02:00
Translation updater bot 122972e1c2 Localisation updates from https://translatewiki.net.
Change-Id: I6de47853e045689ac68aa5b30835a3ccd31d46d1
2022-07-25 08:36:09 +02:00
Ed Sanders 6d9b0ec6b4 Show topic container even if heading is unsubscribable
Bug: T312140
Change-Id: Ie0412b9f238d5ff8e54fd2ea358c1c26e303f4e1
2022-07-23 01:21:52 +02:00
Bartosz Dziewoński dc342291b5 highlighter: Fix exception when trying to highlight an unknown comment
If some content is loaded without re-initializing DiscussionTools
(this currently happens on live preview), then a link to a comment is
clicked, we will not find the comment, which previously caused an
exception. Just ignore this, other code paths in highlighter already
handled this situation in this way.

Bug: T309423
Change-Id: Ie46fd782b8a45907dc6fc604691575c4b55d08ce
2022-07-22 17:47:09 +02:00
Translation updater bot f484a708c4 Localisation updates from https://translatewiki.net.
Change-Id: I8eb820f72d1a7bed69491f693ed19f0e7238fb81
2022-07-21 09:03:35 +02:00
Translation updater bot ef82e80ca6 Localisation updates from https://translatewiki.net.
Change-Id: I3b64feedfef6177b6889e421f85c81ef335d846a
2022-07-20 08:27:34 +02:00
jenkins-bot d15a8c931a Merge "Separate ContentThreadItem and DatabaseThreadItem etc." 2022-07-19 16:03:02 +00:00
Translation updater bot 419f48bab8 Localisation updates from https://translatewiki.net.
Change-Id: I1b5731e8683331e0609b4c21d61f24658c3eb68f
2022-07-19 08:16:22 +02:00
jenkins-bot 6e57e3ba78 Merge "Show a "Return to reply/new topic" button when widget is scrolled off the screen" 2022-07-18 16:09:54 +00:00
Ed Sanders 2c2e57fd47 Show a "Return to reply/new topic" button when widget is scrolled off the screen
Bug: T310967
Change-Id: I3d1626162eb5c66ac35560792a81ce09455e86a8
2022-07-18 13:20:12 +01:00