Commit graph

60 commits

Author SHA1 Message Date
Ed Sanders d31254005f Update linters
Autofix some stylelint inssues

Change-Id: I5200899d253724a61bde127ccb00d8c0108af205
2023-03-22 22:38:41 +00:00
Umherirrender b7c74a34f4 build: Remove unneeded inline stylelint-disable-next-line
modules/dt.ui.ReplyWidget.less
  39:39  ✖  Needless disable for "no-duplicate-selectors"
--report-needless-disables
  65:2   ✖  Needless disable for "no-descending-specificity"
--report-needless-disables
 205:2   ✖  Needless disable for "no-descending-specificity"
--report-needless-disables

Change-Id: I233fdfbed46a9f8e75629d827b00007679063c29
2023-03-22 21:43:31 +01:00
Bartosz Dziewoński 46a9a13116 Remove dd overflow hack
No longer needed after I73d654d1f9127e22365d94909681c1c5f5f39597.

Change-Id: I2a16b725fca512ccbb72f493fd7db28836341e24
2022-11-23 11:28:14 +00:00
Ed Sanders e0855e4f41 Make virtual keyboard detection into a body class
This allows it to be re-used for other features, such as the
upcoming floating "Add topic" button.

Add some support for Android, although not used in this patch.

Change-Id: Ibd1e1ee087ac607c88a7402d0422c633700d1992
2022-11-10 23:30:53 +01:00
Ed Sanders 8cd239b0b4 Move ...-replylink-open class to <body>
This allows elements outside the page container to respond to it.

Change-Id: Id880ada0e24cb803e7b992284a1a95950f3da36f
2022-11-10 23:30:10 +01:00
Ed Sanders 481b687c35 Follow-up I394f02912: Use existing class API to move button away from sticky header
Bug: T318474
Change-Id: Iab3a817e305d48e922499aad3620d93cf8aa165e
2022-10-17 14:49:36 +01:00
Ed Sanders 688cdc24ae Move "Return to comment" below sticky header when present
Also ensure that when we click the button, we scroll the widget fully
into view below the sticky header.

Bug: T318474
Change-Id: I394f02912cd6ab2773552a7364691ef89a17369c
2022-09-25 13:28:12 +01: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
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
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 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
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 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 32e306f6e1 Hide icon in anon warning below tablet width
Bug: T307709
Change-Id: I800153cabc1ba14fd249c106d57162fd0cd9dbe1
2022-06-03 16:33:26 +01:00
Bartosz Dziewoński d7209b13b9 CommentTarget: Clean up toolbar actions
When moving the edit mode switcher outside of the toolbar actions,
we apparently forgot that we can disable this feature entirely.

Also remove $overlay: true, which isn't needed after the changes
from T307849.

Change-Id: I005cf18853305edd162c613f60b1ac45f42c3093
2022-05-21 20:28:54 +00:00
Ed Sanders cf3e7c49d8 Redesign "new comments" warning
Bug: T300560
Change-Id: I5abf22b5a11c2639392a3d571c987ed5afaac2d6
2022-05-12 18:02:32 +01:00
Ed Sanders 4fb474d611 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I164d6175f8077487e2d8dfbf0bcfbd13f1545cae
2022-05-04 23:25:06 +01:00
Bartosz Dziewoński 0c6013c582 ReplyWidget: Fix text-align when content and user language have different direction
Bug: T306137
Change-Id: Ibb0accc210f3cd922ddfb4f0d95df2f98f684425
2022-04-19 22:05:09 +02:00
Ed Sanders da49448f43 Poll for new comments in the section you are replying in
Bug: T300504
Change-Id: I3a887ab2f5260bb4893a3d680103c9d8ec767f45
2022-03-04 00:40:29 +00:00
Bartosz Dziewoński f9f7aeb295 Prevent floated content from leaking out of the preview container
Change-Id: Ic4c5267cbe44fa22537a708f66e08503d0c1f816
2022-02-14 20:47:39 +01:00
Bartosz Dziewoński b019196e7a When using bullet syntax, hide the marker next to the reply tool
Bug: T259864
Change-Id: I47097c2b06f9deade7c234f08ebacb83d16a1d6d
2022-01-19 23:05:05 +01:00
Bartosz Dziewoński faf6da62cc Ensure the marker appears in a reasonable place when replying with a bullet
Bug: T259864
Change-Id: I782460797ea78ab689cbab19c631f651315d2c8f
2022-01-12 22:57:48 +01:00
Ed Sanders 900a01772f Support reply tool on mobile
Bug: T270536
Change-Id: I94d04e9cd442f9a4e0c5924da67c43a768417a8b
2021-11-03 17:49:06 +00:00
Bartosz Dziewoński ca8781a3a0 Add a link to preferences within the Reply and New Discussion Tools
Bug: T291002
Change-Id: Id99f77d3a181aedd23305b7afa61a0a3fb6dabb7
2021-09-27 21:52:07 +00:00
Bartosz Dziewoński 90fdd12efd Swap DOM order of summary and watch checkbox
This is to achieve the same tabbing order as the wikitext editor.

Bug: T271773
Change-Id: I7e167ed8a5aa9b9862f215cba7539b7f79315037
2021-05-27 23:24:25 +02:00
Bartosz Dziewoński 0968d2203b Allow the widget to be squished next to floating elements
Bug: T278476
Change-Id: I8e997bbd9ee7bc50baf4e69bde2dda286505b006
2021-05-25 18:44:43 +00:00
Bartosz Dziewoński 58c078437d Improve mode selector keyboard interactions
When there are just two modes, using arrow keys to switch between
them is not intuitive. The focus moving from the selector to the
body widget afterwards is even less intuitive.

Override default TabOptionWidget to allow options to be highlightable
(not just immediately selectable), and mark the current mode's tab as
disabled instead of selected (but make it look selected).

This results in intuitive keyboard interactions (tabbing to the widget
highlights the other tab rather than the current one, pressing enter
switches to it).

Bug: T274423
Change-Id: I9d358d5f301cbf081380ef5d34ccc8c4e146652e
2021-03-18 15:15:40 +01:00
Ed Sanders ece8ff69ff Change dt- class prefix to ext-discussiontools-
Longer, but follows the style guide and less likely to conflict.

We need to account for init classes in the cache being around for
a while.

Change-Id: I738bc93393850db320fdbda2b003ca8ac40556da
2021-03-13 14:42:39 +00:00
Ed Sanders 665f68f838 Fix toolbar dialog placement
There are no available tools that use this, but it
can be tested using:

ve.init.target.surface.executeCommand('specialCharacter')

Change-Id: I853e6a3b9bd3caff018b6fe22cea9b1c6a428dff
2021-02-28 22:18:58 +00:00
Bartosz Dziewoński d76143bc08 Ability to add new discussion sections
1. Extend the JS modifier to allow adding top-level comments
   (that is, replies to headings). PHP modifier doesn't do this
   because we'll save the changes using paction=addtopic instead.

2. Subclass CommentController to allow adding a new heading and a
   top-level comment underneath it at the same time.

3. A lot of ugly code in ReplyWidget to customize the interface
   for this case. Much of it should probably be moved to
   CommentController/NewTopicController.

Bug: T267595
Change-Id: I9c707bb7f7aae1b92c72fb4dee436490f8c8409b
2021-01-12 20:15:28 +00:00
Bartosz Dziewoński f44806c0c8 ReplyWidget: Ensure scrollbar doesn't appear in source mode (for real)
Follow-up to d5a1b7bc2b.

The rule hiding the scrollbar was applied to the wrong element.

Bug: T267609
Change-Id: I596f29ba191032a82c579c63e9aa526eb4e887aa
2021-01-03 17:22:13 +01:00
Ed Sanders b8be2e352d Follow-up I6f6a869: Apply flex wrapping of actions in anon mode as well
Bug: T259320
Change-Id: I6e0a275d4b45f1ce8661729313a159060c259ae1
2020-12-17 22:24:18 +00:00
Bartosz Dziewoński 95f8a4a8db Restore correct height of "Advanced" button
Looks like something changed in OOUI?

Change-Id: I383329a36212b1ab66eb563175ad14fa1965b7e4
2020-12-15 15:55:59 +01:00
Ed Sanders a082535e02 Fix styling of error/captcha MessageWidgets
Change-Id: I592c1a08238dc46ee342672be29a8070b495f3dd
2020-12-11 16:27:07 +00:00
Bartosz Dziewoński d5a1b7bc2b ReplyWidget: Ensure scrollbar doesn't appear in source mode
Even though the field is supposed to resize itself to match the text
inside, vertical scrollbar would sometimes appear when the user has
zoomed in. Some calculation probably handles fractions of pixels
incorrectly (might be a bug in OOUI or a browser bug).

Since this field has no limit on max rows, we can just hide the
scrollbar. This can't be fixed in OOUI itself, since its autosize text
fields usually have a limit to how tall they are allowed to grow
before a scrollbar is used.

Bug: T267609
Change-Id: Id36ed417c4678e469a6c05715404e330064c2017
2020-11-10 12:20:30 +01:00
Ed Sanders 06d42957a5 Fix vertical alignment of action buttons when logged out
Bug: T263871
Change-Id: Id2c39b630ddbbd6232f67a161de3f74f36a7cd6b
2020-09-25 17:54:00 +00:00
Ed Sanders ebaa132ebf Edit summary in advanced mode
Bug: T249391
Change-Id: Ibfd1cf77293d30b8e0d9869bbdc9aae2aa830a06
2020-09-14 22:29:54 +01:00
Bartosz Dziewoński 74560f216e Allow reply widget header and footer to wrap when it's narrow
The footer was already laid out using flexbox and just required some
CSS tweaks to enable wrapping.

The header required some DOM changes, now also uses flexbox, and wraps
in a similar manner.

Bug: T259320
Change-Id: I6f6a86932a108037bf1d70f077c372654318be26
2020-08-07 20:25:23 +00:00
Ed Sanders 3ea1a721be Swap toolbar and mode switcher
Bug: T257280
Change-Id: I436da21ea038ddf369f82c58756342b38d9b3b8a
2020-07-31 20:12:05 +00:00
Ed Sanders b1fe481324 Increase padding around warning icon
Bug: T255558
Change-Id: Ie9c384a3233e5079dcb49fbf295a8c81596dc83d
2020-06-30 15:19:13 +01:00
Ed Sanders de84a27e88 Tweak appearance of find-and-replace toolbar
Change-Id: Ia61e765217ee9d4c249af0a2494ba427e29a0d54
2020-06-11 16:02:37 +01:00
Ed Sanders 56d8721fd7 Switching between VE & wikitext (plain)
Bug: T234403
Change-Id: I84a639ab8e31ec9f683a63b0ecf184f426df09dd
2020-05-06 18:03:36 +01:00
jenkins-bot 922443f68f Merge "ConfirmEdit CAPTCHA support" 2020-04-29 12:04:44 +00:00
Ed Sanders cd7acc741b Move VE toolbar to top right
Change-Id: I97b322ded505df608eda73a7c6a04157e993d73b
2020-04-27 16:42:35 +01:00
Bartosz Dziewoński 40c18508ec ConfirmEdit CAPTCHA support
Depends-On: I6605017fd31a4f96c529dd0beb69e9f4433cebc1
Bug: T247513
Change-Id: If9b3162969aa6ee67baff80aa84fa719bd3c3720
2020-04-21 18:55:38 +02:00
Ed Sanders 0f7eb2e36a Add "watch this page" checkbox
Bug: T245222
Depends-On: I1e0e9bb9da53a62f8a20126e579dcd6300bd2376
Change-Id: If966d2fa97648452a50a2318988a8b64d7c449cd
2020-04-20 12:40:44 +01:00