We support highlighter HeadingItem's despite saying CommentItem
in a bunch of places.
Also potentially show the "not found" notification if the URL hash
starts "h-" as well as "c-".
Change-Id: I51894902bfca405bbdec89806bb9c1d76e0b40ef
All features should be enabled by default for 3rd party installs.
I74ecd243 ensures this will have no effect on WMF wikis.
Depends-On: I74ecd2438c86d99b5727de488c928cc7d37da6db
Change-Id: Ia3245902abf2601f53065f1ffb94133d7b25e223
Why:
- Per T338534, we want to display the overflow menu next to topics and
comments. Supporting topic-level placement is a little more
complicated, so just go with comments for now.
What:
- Rework the is-mobile check to allow the code to run on desktop/mobile,
while excluding topic-level replacement on desktop (T342627)
Bug: T338534
Bug: T342625
Change-Id: I520c377120e16aa3a6fedcc8c39075958a942e4c
Only a fraction of a percentage of users are still using
ReplyWidgetPlain, and keeping these modules separate:
* Adds to code complexity
* Adds to ResourceLoader module bloat
* Causes bugs when we use VE dependencies in the
core ReplyWidget class
The disadvantage is that ReplyWidgetPlain will now be
loading all of the VE dependencies, but this will make
switching to visual mode faster.
Bug: T348834
Change-Id: Ifb0cfd43fdab761c3321ad01fa9fefca26473f86
Why:
- Code that interacts with DiscussionTools CommentFormatterTest may
expect a User object, instead of a UserIdentity, because OutputPage is
typed to return a User object
What:
- Change the mock to return User, not UserIdentity
Change-Id: I1354f5f8132fd0656f274cdf4f17cde7f93d9042
Why:
- We'll reuse this functionality on desktop, so it makes sense to
extract it to a standalone file
What:
- Remove relevant code from mobile.js and place in overflowMenu.js
Bug: T342251
Change-Id: I98f1253e8d6db31c1f71203b50911b6f1b92778b
Why:
- The button should only display for Minerva
What:
- Consult the skin name before adding the "Edit" button to the menu
Bug: T342251
Change-Id: I52cf2ca0663a4de0ee7add82910e745bcabf1c5f
'editable' refers to the section being editable, and is only for
use by heading items, not individual comments.
Change-Id: I3fb5841609c40a928071cea8987cf035ade464c2
Why:
- Tests may invoke code that calls `getConfig` on the ContextSource
What:
- Mock the `getConfig` method
Follows-Up: I07b312b8c00f9b5d20e285874ed0a0153949dd18
Change-Id: I5c5b0d7cef24af108aeab461ba06b533eae4b739
This avoids unexpected interactions where choosing an option in the
menu behaves like tapping the heading.
Bug: T348217
Change-Id: I7c38bb51fa99606e708d3ff5a2f3d6101dec2fae
Since 92f5cfd8 we support "mw-notalk" to suppressing comment detection
in pages or sections.
Until now, it only worked when the comment timestamp was surrounded by
a marked element. However, when a marked element was directly adjacent
to a comment, it would sometimes become a part of the comment range.
This can no longer happen now.
Existing use cases for this were the {{outdent}} and {{tracked}}
templates, which we handle specially since 50ad5bb2 and ddd391b6.
It's a bit ugly to hardcode specific templates like that, and this
provides a better solution for the future. The added test case
displays some other potential uses.
Bug: T324132
Change-Id: I7ffd299ef5957b35da8d01f9a0ed5a7a9a78be83
Only needed for phan, under php8.1 this internal
function is deprecated about null.
The property $subscriptionName is not null when $subscriptionTitle is
not null and current code is safe, but phan cannot see the dependency
between both properties
Change-Id: I9e67309ec25a70c5de91d7f3e8f18447f205a4e4
Why:
- We want to provide contextual actions adjacent to comments, not just
topic headings.
What:
- Consolidate the logic for embedding the overflow menu button HTML into
a function, and add this for both topic and comment items.
- For this patch, this is done only for mobile; in a follow-up patch, we
can add support for desktop
- This doesn't use a feature flag as 1) no one is implementing the
DiscussionTools hook yet, 2) the 'edit' menu item is disabled at the
comment level. Merging this change would be a no-op until an extension
implements the DiscussionToolsAddOverflowMenuItemsHook.
Bug: T342251
Change-Id: I15a151f151e2fa04398876b559d93d45c42f6ef6