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
Why:
- We want to allow extensions to register interactive menu items in the
overflow menu.
What:
- Create a PHP hook to allow extensions to provide menu items
for rendering in the overflow menu
- The hook allows for registering resource loader modules required by
the menu item
- The hook passes in some contextual information, like the thread
item data, context source object, and if the page is editable
- Create a JS hook that fires when a user selects one of the menu items
- Example implementation: Ie9afbedb4f24cbd75eb48bb21dc9f6d8d732d853
Misc:
- Remove b/c code that existed to handle a transitional period where
JSON encoded overflow menu data did not necessarily exist in the
parser cache
- Rename code instances of ellipsis button / data / menu to refer to
"overflow menu"
- Some renames will have to wait until parser cache is updated; these
are noted with TODOs
Bug: T342251
Change-Id: I5f2a51791f8ba7619d1399a4b93111e9bb44e172