Commit graph

1030 commits

Author SHA1 Message Date
jenkins-bot b1934c8a84 Merge "Don't infuse reply buttons if not in use" 2022-08-02 12:58:17 +00:00
Ed Sanders a0fa7c466f Don't infuse reply buttons if not in use
Change-Id: I704cbf3f1a681c474ce5d44b7c5af5c8dbb82f3b
2022-08-02 13:27:43 +01:00
Bartosz Dziewoński 35db93d9f5 Disable OOUI reply buttons for real, not with CSS hack
We already infuse them, so might as well do this...

Change-Id: I962c052d3f5b5c15b3a15e6e4533bd87624eb6e2
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 293df2438f Make "Add topic" button in Vector sticky header disabled after click
Bug: T307726
Change-Id: I3077357d7753d9259c5c32b71dd23a0e21bde6de
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 549fcc062b Fix focussing the reply button/link after closing the reply widget
Change-Id: I0db0fc8a93512751f8a9bcc96b048c1ab1f24f95
2022-08-02 00:32:24 +02:00
Bartosz Dziewoński 31c57d594a Do not duplicate item JSON in page HTML
Rather than setting it on both the reply link and the reply button,
set it on their parent element.

Update ReplyLinksController to handle this.

Change-Id: I650e9c0ebd354a82b8f66a63c5b4c02b2e29b105
2022-08-01 22:14:50 +00:00
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 96868976bf Merge "Re-enable keyboard sequences for template, table etc. in new topic tool" 2022-08-01 12:28:15 +00: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
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 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
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
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
Ed Sanders 2960853088 Move subscribe button up on desktop
Bug: T312674
Change-Id: I419883b5f9a4291b4bf575d57195d553fd5e291e
2022-07-27 13:55:03 +01: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
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
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
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
Bartosz Dziewoński 2d3b497a21 Avoid localized digits in internal timestamps in JS
Unlike PHP DateTime, and unlike the .toISOString() method,
the Moment.js .format() method will output localized digits.

Bug: T312828
Change-Id: I49a250b1ad74d9395bf3f994379613cc121b5be4
2022-07-13 02:33:24 +02:00
Bartosz Dziewoński f51d26fd3a Parse 'DiscussionToolsTimestampFormatSwitchTime' config value as UTC
When the input to moment() doesn't define a timezone, it
defaults to the local timezone (as defined on the device,
not in user preferences).

Bug: T312828
Change-Id: I8d2e1c2f6feb5584af4bbf9fef39567eb87780ff
2022-07-12 14:10:09 +02:00
Bartosz Dziewoński 2bc76dabd7 Enable transformations in preview mode
We remove the [reply] and [subscribe] links when they should not be
visible (controlled by 'enableSectionEditLinks' option, which is
disabled when previewing).

Bug: T309423
Change-Id: Ie0d3fba2c4d166daac3ea2e117a246c9584284ca
2022-07-07 23:37:56 +01:00
jenkins-bot caefb1ae39 Merge "Show new topic tool empty state on existing pages with no topics too" 2022-07-07 21:52:36 +00:00
Bartosz Dziewoński a98cd369ba Show new topic tool empty state on existing pages with no topics too
Bug: T312599
Change-Id: I316d2f119b9c899ffaeebc7ec288823c826db092
2022-07-07 21:45:44 +00:00
jenkins-bot 3bb23f30f8 Merge "Remove some unused or redundant styles" 2022-07-07 20:50:17 +00:00
jenkins-bot 1e479288be Merge "Prevent the "Subscribe" button focus outline from being cut off" 2022-07-07 20:50:15 +00:00
jenkins-bot 31c35992f4 Merge "CommentController: Scroll before focusing in showAndFocus" 2022-07-07 20:26:23 +00:00
Ed Sanders d367b1fc50 ReplyWidget: CSS tweaks for monobook
Use 12.8px for interface, and 12.7px for content.

Move mode tabs away from the reply body so the underline can be seen.

Change-Id: I9cb9a611ca64595152f800e1e15b640402f6cb74
2022-07-07 16:24:49 +01:00
Ed Sanders 9f670d0ee0 ReplyWidget: Don't add border-radius when hovering mode tab
Change-Id: Ied05b70119ea724c126e88d30aa62e0f7526ba12
2022-07-07 16:24:06 +01:00
Ed Sanders 2a31eed846 CommentController: Scroll before focusing in showAndFocus
This removes the need for a setTimeout before scrolling.

Change-Id: I1c47d5635f66ed523b492c384464e2e6accabf01
2022-07-07 13:43:16 +01:00
Esanders d6a8c75899 Hide the lede section on mobile when DiscussionTools is enabled (2nd attempt)
Previously this was reverted in I28a5c774f5f after the initial
commit I3736b488046 caused T312177.

Bug: T311760
Change-Id: Iba65615378b183f0c970afff565f45cc878f1d71
2022-07-06 16:03:27 +01:00
Ed Sanders 72bb4aed13 Revert "Hide the lede section on mobile when DiscussionTools is enabled"
This reverts commit 69bfc6d6a2.

Reason for revert: Caused T312177

Bug: T312177
Change-Id: I28a5c774f5f9d0391a8addf5b31b9c229fb40948
2022-07-06 00:31:54 +01:00
Bartosz Dziewoński 5c3277a196 Format number of comments in reply tool new comment warning
Bug: T312033
Change-Id: If8e95b9554eddec2f00c492885575266b02cc1af
2022-07-04 17:57:41 +02:00
jenkins-bot 00d63026a3 Merge "Halve the initial height of the reply widget on mobile" 2022-07-01 22:20:06 +00:00
jenkins-bot 4ed36bc03b Merge "Reply widget mobile: Reduce space between footer and footer-links" 2022-07-01 22:19:25 +00:00
jenkins-bot 8a0703f29d Merge "Reply widget mobile: Move reply/cancel buttons up into empty space of "advanced" bar" 2022-07-01 22:19:22 +00:00
jenkins-bot 11961a85a7 Merge "Reply widget: Simplify LESS expression" 2022-07-01 22:12:40 +00:00
Ed Sanders 9d9dc7f26a Halve the initial height of the reply widget on mobile
Vertical space is at a premium on mobile with the virtual keyboard.
The widget will auto-size when more text is entered.

Bug: T311836
Change-Id: I03ff7217f9ffe217f93a3dc95db2df018bd0d221
2022-07-01 15:05:00 +01:00
Ed Sanders 172960f887 Reply widget mobile: Reduce space between footer and footer-links
Bug: T311836
Change-Id: I6275ff67a909125398872e2f691e5b62d165d546
2022-07-01 15:05:00 +01:00
Ed Sanders 5014aa3c50 Reply widget mobile: Move reply/cancel buttons up into empty space of "advanced" bar
This reduces the overall vertical height of the tool

Bug: T311836
Change-Id: I095bff00686a54779d45efa73c3f8b74ba016702
2022-07-01 15:04:58 +01:00
Ed Sanders 1ad01e661a Reply widget: Simplify LESS expression
Change-Id: I1d00c81377cfe83167384c83d3abd3f1bcdc2497
2022-07-01 13:38:01 +01:00
Ed Sanders 98b5371a8c Have "Read as wiki page" link remove all DT content changes
As well as visual enhancements:
* Reply links
* Mobile lede section hiding

Change-Id: I14d591830620edf8bbaccb76b4bce0e87971d7c3
2022-06-30 23:02:50 +01:00
Ed Sanders 69bfc6d6a2 Hide the lede section on mobile when DiscussionTools is enabled
Bug: T311760
Change-Id: I3736b4880465359bcae9b903eecc57f1cd7674ef
2022-06-30 23:02:50 +01:00
Ed Sanders ae3be4aaf5 Always hide overflow menu when topic containers disabled
Change-Id: I05fbaa89992cfec8db50407f74061da7d1aabe2d
2022-06-30 23:02:50 +01:00