When rendering a preview of the comment in order to check whether it's
signed, use the previously acquired temporary user username for the
signature.
Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I7aeb1cc4c107ed752dc805405780a7609a6d4d3c
TODO comments suggested using the VE helper util, but
that is no longer necessary since all our browsers
support passive events.
Change-Id: I7026d4c5013857f25f4474b3bec840af6fbf9fb6
Our edit API now recognizes topic subjects in the message body,
generates edit summaries from them, and optionally returns an error
if no subject is provided.
Bug: T334163
Bug: T338390
Change-Id: Iac3778a4a88a4def234be9d10b80d9796d35bceb
I think the issues in T329299 are caused by partially autosaved
comments. We store data in multiple localStorage keys, and if some of
them are stored but others are not (due to exceeding storage quota),
our code can't handle the inconsistent state.
We already have a wrapper around localStorage that tries to cover up
these issues. Change it so that all values specific to an instance of
a reply tool are stored under one localStorage key. This ensures that
all updates consistently succeed or fail, with no partially stored
state.
One of the reasons we haven't done this is because this requires the
whole data to be serialized to JSON every time, but our experience
with VE change 4355d697aa shows that this is fast enough.
Extra changes:
* Remove storagePrefix, now redundant
* Remove use of createConflictableStorage, now redundant
* Prefix the key with 'mw' as advised by mw.storage documentation
* Use ES6 syntax for the new code (just for fun)
* Use consistent expiry (T339042)
Bug: T329299
Change-Id: I347115f7187fd7d6afd9c6f368441e262154233b
https://wikipesija.org is currently using ISO 8601 as the default date
format. The format is xnY-xnm-xnd"T"xnH:xni:xns and 'xn', 'm', and 's'
need support added.
Change-Id: I235098a578eb92ddd23ea47fa23d60df4b28f590
The wrong 'this' was being used. I don't think this additional
call is required because we have already disabled the section earlier.
Change-Id: I7c9005463223a3de94de5924bf5d5da22e7ca67c
This triggers Toggler.js in MF to open the section, which
may not be stored in sessionStorage, as DT can recover
from localStorage.
Bug: T338920
Change-Id: I695e2d423b5159ef4cdcefc0f4d4d0a05f46879b
Sometimes we call this API and then reload the page (or navigate to
another URL), without using the page content it returns. Save some
work and some data transfer and don't generate it in those cases.
Depends-On: Ic5fac61f3ef9b2dfce6ff757f1d414a9f41f217d
Change-Id: If1aea90488e3f22cc31ac1f360139ae65acf000a
Some wikis customize the 'pagetitle' in ways that are not compatible
with the client-side message parser.
Depends-On: If1979da12777e4ee4e97937640fc5e6176f9b5fe
Bug: T317600
Change-Id: Id05a08f8d350a8d8c6d301a3cb3a53f3a798fe09
This temporary message has been shown for long enough.
This mostly reverts:
* d0eec56f6d
* f24a73a05a
* bd40523843
Bug: T322495
Change-Id: Ic1762e170547fba8b5fda225eff21e515ace512d
This has been added to the core behavior of shouldAbandon as well, but
the way it's overridden here needs to be changed since the
multiple-words check would override that.
Depends-On: If130cdc1df595e6ab12d531ce603cc42c8b3b5f3
Change-Id: Ie7bdc4a4702514fcb7d500924dad18729198b9e8
Also, replace a `px` value with an `em` value in another similar case,
to support users and skins changing base font size. The exact values
don't matter that much.
Bug: T335823
Change-Id: I18778b13948abc18d67631d620be0b658d04facf
The following are now available in all browsers we support:
* mix-blend-mode in CSS
* Node#contains
Change-Id: I324948f0bceac6d86999300e2b2c8756613e56d2
Unsubscribing was already available from Special:TopicSubscriptions
when JavaScript is disabled.
* Add links to subscribe/unsubscribe in CommentFormatter
* Update links in skin navigation
* Add support for subscribing in the actions
Bug: T321431
Change-Id: If3c4bf7df309d0d98237c3b7b9c129cc2f72cda3
* Remove the hook we used to disable that feature
* Remove CSS that only applied when it was enabled
* Update code comments that referred to it
Bug: T319145
Change-Id: If21a04f6a087289d8249a786f7c991e5e12c9bed
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
skin variables – `background-color` `color`, `border-*`, `box-shadow`.
- removing skin overrides like `.skin-monobook`, they are now covered
by the skin variables.
Patch requires MediaWiki core version >= v1.41.0.
Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Change-Id: I36c7a0f5ed06c3eccd792b19b6a1972663f20df6
This can be done within sections using CSS:
* mw-notalk
Or at a page level using a magic word:
* __NOTALK__
"notalk" suppresses all comment detection, treating the content as
not containing any comments even if there are signatures present.
Bug: T295553
Bug: T249293
Change-Id: Ic1d7294bafcf7071e16838e70684ecadd7bc6fd3
This can be done within sections using CSS:
* mw-archivedtalk
Or at a page level using a magic word:
* __ARCHIVEDTALK__
"archivedtalk" still detects the comments, but disables features
as appropriate for an archived conversion, i.e. the reply tool.
Bug: T295553
Bug: T249293
Change-Id: Ic47693e9a2f53f92563ccdd50203fb55c12d0493
It demonstrates how the DiscussionTools extension recognizes
the threads and comments present on a page, to help in debugging
or understanding its behavior.
Co-Authored-By: Ed Sanders <esanders@wikimedia.org>
Change-Id: Idbc90bd8d7742615178331889daae5f94a007fcc
Minerva uses block placement for the buttons only on pages where
usability improvements are available.
Follow-up to 869520a6d0.
Bug: T325416
Change-Id: I9e828197aea7bbaff86489f3ef6e256e0a0845ff
PHP logging code is not moved.
* Use the new mw.track() handlers from WikimediaEvents
* Ensure that 'integration' and 'editor_interface' are set on init
events, since they're not hard-coded in the handler any more
* Remove the setting of 'editingStatsId' tracking parameter,
now happens in WikimediaEvents (by way of VE ArticleTargetSaver)
* Remove code connecting ve.track to mw.track, now happens in VE
This must be merged together with WikimediaEvents change
Iace4d53a972396ca5b8713000570cc47c9986034 (but we can't use
Depends-On, because CI requires code here to be removed first).
Bug: T332438
Change-Id: I0ef0a96aafdf89a4ebe32131a85b18c25744bb2c
Also make our filter function match any substring of
the suggestion index (username + display names), as display
names often contain leading punctuation.
Bug: T266401
Depends-On: I69e5f54f7a8b7ca4126cc3ea513fc96e0a8606fb
Change-Id: I4e7429f8a88c3a82e981f37eb107c2b011482d73
The ellipsis buttons in sections on mobile weren't able to properly show
their dropdowns or parts of their highlight because of the section
overflow we applied with visual enhancements. Because this was added for
a block context to contain the floating subscribe links, scope this to
mobile where that shouldn't be a concern.
Bug: T330536
Bug: T330537
Change-Id: Ic9787d6ca622a8f8bfbf9797353129e7fa40f4b7
Not used anywhere, not even in gadgets. I guess it was for other
planned features, but it can be added back when needed.
Change-Id: I858e8854567ffae6ff11ba61d99b4b09b12dc7d7
There's no need for this PanelLayout to be scrollable, as the dialog
body itself is scrollable, and this is causing an unnecessary
horizontal scrollbar to appear on some pages (for example
https://de.m.wikipedia.org/wiki/Wikipedia_Diskussion:Hauptseite).
Change-Id: I516cae8ca006b57360fe85a2eba099913b38ce84
To avoid affecting existing preload forms, the new topic tool is only
used when the 'dtpreload' query parameter is also set.
Bug: T269310
Change-Id: I4ee024cc4760542790319f302f42b1b2389ac897
These buttons require JS to do anything. We can consider
providing a fallback action for subscriptions at a later date.
Change-Id: I9da546b2968e06d80c515eb5a05656a462b8201d
Previously we only did it when re-initializing after saving a reply
using our tools, but it could happen for a different reason, such as a
NWE edit.
Bug: T317035
Change-Id: Ia8152fc83f74689802f8dbbc20607c9026a2a5ab
Previously, we would restore the title and the summary generated from
it, but we wouldn't restore `prevTitleText`, so we would lose track of
the fact that it was automatically generated, and stop updating it
because of that.
Instead of adding it to the stored data, let's instead stop storing
automatically generated summaries, and tweak the code to support
generating them when restoring.
Bug: T315730
Change-Id: I96420bc0a3e34373190d2c2c0db2e2175ad3156d
After T314714, they are no longer needed for Vector, MonoBook etc. –
the elements will just use the normal body font size.
This changes the font size slightly on some skins (MonoBook, Timeless),
but I think that's okay.
We still want to customize the font-size for mobile (Minerva), and
we can do that with `em` now.
Bug: T325104
Change-Id: I3fab8588b1b0e3a43aac4c32a3610f64fb3d3fb3
We already have code to hide it (added in a98cd369ba),
but this code (added in b132522fa9) made it reappear.
I think this rule was added in the development of that
change when the class was placed on a ButtonWidget,
to override `display: inline-block` on it, but it was
then moved to another element, removing that need.
Bug: T327536
Change-Id: I2a162dde93d04d76f6d5540edf6d3c4719a67f92
* Detect comment separators at the end of comments too
* Consider TemplateStyles associated with ignored templates
This unexpectedly improves a lot of cases other than T313097 too,
mostly where <br> or {{outdent}} was used within a paragraph:
splitting comments that were previously jumbled together, or restoring
content that was previously ignored for apps / notifications.
Bug: T313097
Change-Id: I9b2ef6b760f2ffd97141ad7000f70919aeab7803
Instead of doing them right after page load, only do them on
hover/touch/focus, when we can expect that the user is about to
click/tap/activate a reply link, but which lets us start the work a
fraction of a second earlier.
Bug: T325598
Change-Id: Ida4cb70d8e9ab423ad2dabca7258f92e9fca3157
This should avoid hitting the API if the DT JS is loaded off of talk
pages. At worst, if this is overly restrictive, later calls should still
load it when someone actually interacts with a reply widget.
Bug: T325477
Change-Id: If898dd4a21f1d2620c5a1e79908647070c441854
New config: DiscussionTools_visualenhancements_reply_icon_languages
Config is set up with a provide_default merge strategy so we can remove
items from it quickly if need be.
Bug: T323537
Change-Id: Ib748897a2162bb233000f7364e30b268932f4c4a
* Increase selector specificity to make it work
* Tweak colors, they were lighter than intended
* Use color rather than opacity on text to avoid making it blurry
(opacity disables subpixel rendering)
Bug: T324702
Change-Id: Ie32a7481ea90b983cd33e6eae981d47db8612c9f
The .always() callback can be called after .teardown(), and would
previously restart the polling.
Bug: T313096
Change-Id: I6e4c0f7d47e13bd4a259282a508afcdf0c1bd949
Can be merged once I85ee8e6ed6 has been deployed long enough
for all the caches to have been purged.
Change-Id: Ic9773c2e45a4aa796cb6bca52e58d7db1016a977
Also fix a CSS selector to handle content added in multiple
'OutputPageBeforeHTML' hook calls.
Bug: T323376
Bug: T323833
Change-Id: I480d9bf544d61f0cb7bfd04cadfbf053e7e1b70e
(Also fix some related CSS that was accidentally moved in
Ie5198e902ec3fa7a7eba56cef6c6f0ef71ef7314)
Bug: T323241
Change-Id: I1fa67965a1b6b827c500a9de63f5b5295bee840d
We wrap a `<div>` tag around the `<h2>`, and move some elements there.
The markup is inspired by and compatible with my proposal for T13555.
The "ext-discussiontools-init-section" class is moved to the `<div>`.
A small patch is needed in MobileFrontend to preserve the section
collapsing functionality: I11bff21e81046898ca63f3f432797129fa70ad88.
The following elements are now outside of `<h2>`:
* Metadata bar
* Subscribe button
* Ellipsis menu (only shown on mobile)
The following elements are sadly still inside of `<h2>`:
* Subscribe links (only shown on desktop)
* Section edit links from MediaWiki core
Trying to move them mucks up the CSS too much. I hope we can resolve
this later as a part of the work on T13555.
Depends-On: I11bff21e81046898ca63f3f432797129fa70ad88
Bug: T314714
Change-Id: I0bbdcfa02c334858737855349d7a35746de1d8f2
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
Add brackets around the existing shortcut key labels, so that they
don't look quite so out-of-place next to the automatically added
accesskey label.
Bug: T278249
Change-Id: Icc0df5ba036080807ea0eb215f5526c93da78ef1
For preview parsing, the span containers are empty.
Not sure why not strip the container along with all generated
contents, but this should be the easiest fix.
Bug: T321185
Change-Id: I9afb2d0f543b79dbac8a652236fe55284de542a8