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
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
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
Follow-up to 5b6018b244 which put an
element between the advanced box and the actions wrapper. We can have
the rule use the subsequent sibling selector rather than direct sibling.
Bug: T348143
Change-Id: Ibe1b25bf15d320b17601a0d9471d4b7e6ca4ef19
The gadget version doesn't do this, and we already have code
to prevent your scroll position from changing.
Allowing default rewrites the address bar and highlights the
copied comment.
Change-Id: I9aec2b2be7498a268d7b2eb3d2b4a4f76e658042