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
The VisualEditorFeatureUsage instrument is a candidate for migration to
the Metrics Platform [0]. The first step of the migration is to log
events both using the Event Platform directly (i.e. via
mw.eventLog.submit()) and using the Metrics Platform client (i.e. via
mw.eventLog.dispatch()).
The Metrics Platform Client can mix in additional information -
so-called context attributes [1] - based on the stream configuration.
The majority of the default values mixed into each event via the
mw.eventLog.Schema defaults mechanism are already known to the Metrics
Platform Client.
Note well that the Metrics Platform client will not log an event without
one or more streams being configured to receive that event. Therefore,
this change is a NOP.
An example stream configuration is given in [2].
[0] https://wikitech.wikimedia.org/wiki/Metrics_Platform
[1] https://gerrit.wikimedia.org/g/mediawiki/libs/metrics-platform/+/aed6738b845/js/src/StreamConfig.d.ts#31
[2] https://phabricator.wikimedia.org/T309602#7973206
Bug: T309602
Change-Id: Ib919ae0e3f404c85cef17637ea91bb95d5030cf1
... for the sampling rate for the VisualEditorFeatureUse schema.
Bug: T312016
Depends-On: I259757db0c4441a3fcfce505d5bc82dcf2acf58c
Change-Id: I1c7f9c06384549deac2787f5df93c0078b6402af
Pages can be empty (blanked) without outputting the noarticletext
class, so just suppress the top border if the banner is the first
child of the document.
Change-Id: I808160a7f73a9a976d25e77f4bd47727a57b70c0
If the widget has just been opened, it should already be in view,
but when we are recovering from auto-save it might not be.
Scrolling it into view lets the user know sooner that a draft is
about to be recovered.
Change-Id: I2b8232edc20e71b04a3f106107c0c7bc6333f66a
Also ensure that when we click the button, we scroll the widget fully
into view below the sticky header.
Bug: T318474
Change-Id: I394f02912cd6ab2773552a7364691ef89a17369c
Computing the name, for headings, requires determining the oldest
comment. This must not be done before all the replies are added to the
thread.
Follow-up to e24550fae9. It was
already *technically* incorrect before then because it was generating
the name based on the first comment in the thread, but that was only
not the oldest in very unusual cases so it was fine. That commit caused
the thread summary to be cached when first requested, however, which
made future requests for oldest/newest comment and authors to be
incorrect.
Bug: T318057
Change-Id: If0bd6caf88e72cd3f91e7f0633c40b445f5e2246
* Make "X comments" appear on a new line deliberately
* Remove parentheses around "X comments"
Bug: T309463
Change-Id: I803eee9db59c633f129f15e436242a12bcc627f0
When using ReplyWidgetVisual, this would just crashes in #getValue.
When using ReplyWidgetPlain, if the timing is right, this might update
our auto-save after the value was cleared in the teardown code,
breaking the way we restore the reply after showing new comments.
Bug: T316074
Change-Id: I23c5f17a6ff9a6ec9c73a176e4cc60e3ad96e7f1
The implementation in Parser doesn't descend into sub-thread.
Re-use the getThreadSummary method in ThreadItem and traverse
the thread properly.
Bug: T298617
Change-Id: I318d9012eb83f37ccbe463923524ef2e9f995ced
We already do this while editing so that users can quickly see which
tabs they are actively working on.
This extends the functionality to the reply and new topic tools.
Bug: T262066
Change-Id: Iae662ad26072617aad71e519bb6c3cbb19ef1246
The subtitle prop and some others were missing from the action=parse
request. Use the same props as the VE edit API.
Change-Id: I8e9cc735d3ee50dfe0fbe0349713d88654ad9fd1
We can no longer change IDs so easily, because they're stored in the
permalink database, so remove this mechanism to make sure it's not
accidentally used in the future.
Change-Id: I392ee1f49c48fc2f23d05e9a37c643438b4f2b9a