Commit graph

6 commits

Author SHA1 Message Date
Fomafix b06b96b915 Inject services into DiscussionToolsHooks
Change-Id: If15fd7cca27832ed8ff6738c90556be701be269f
2024-07-03 15:00:54 +00:00
Umherirrender 3dc5e88842 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I492ddae3c3e9f81d551ea8b348b7148893f4f590
2024-06-09 00:02:35 +02:00
Ed Sanders a86897f890 Comment thanking
Bug: T249893
Change-Id: I64f7abc26bfc3e7b226340934a637a555edf754f
2024-05-28 17:47:09 +02:00
Ed Sanders f8b76afef3 [BREAKING CHANGE] Remove isSectionEditable from overflow hook
Instead make isUneditableSection an optional property of
ContentHeadingItem.

Change-Id: Icfddf28aa789b5014ac183ff9f9699f38d78c121
2023-10-18 12:56:46 +01:00
Kosta Harlan ead2baf0f1 overflow menu: Only show edit button in mobile
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
2023-10-12 06:03:03 +00:00
Kosta Harlan c6c7dd2fb0 overflow menu: Add hooks for registering and interacting with items
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
2023-10-05 15:50:33 +01:00