Commit graph

17 commits

Author SHA1 Message Date
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
Bartosz Dziewoński 0c1ec851bf Fix interaction of "Add topic" button with categories
For real this time. I hope.

Follow-up to 52de4b0b1b.

Bug: T335219
Change-Id: I0f073cf660f221c1e996f7f46d161316e0b0b79e
2023-09-17 23:49:14 +02:00
Ed Sanders 16924515df Use passive event listeners for window scroll events
TODO comments suggested using the VE helper util, but
that is no longer necessary since all our browsers
support passive events.

Change-Id: I7026d4c5013857f25f4474b3bec840af6fbf9fb6
2023-08-09 16:43:39 +01:00
David Lynch 83236058d5 Trigger a MobileWebUIActions show event for lede-button
Bug: T314596
Change-Id: I388873329e0dcb74633d81ca7ea633958ac3e56a
2023-05-04 11:25:40 -05:00
Bartosz Dziewoński 3c8bd658cf Close mobile lede section dialog when opening a tool
Bug: T327574
Change-Id: Icdf9ca05d3a1dec189cf4604a01141b07363dec3
2023-04-18 21:21:48 +02:00
Bartosz Dziewoński 6a7d949703 Remove integration with removed MobileFrontend talk page tools
* Remove the hook we used to disable that feature
* Remove CSS that only applied when it was enabled
* Update code comments that referred to it

Bug: T319145
Change-Id: If21a04f6a087289d8249a786f7c991e5e12c9bed
2023-04-04 17:17:49 +02:00
Bartosz Dziewoński 8eadff3b0d Optimize selectors in mobile hacks
See T328452#8587912

Bug: T328452
Change-Id: I584ef836d84cfa52ed003aae217c5c3b4e4ddbdd
2023-02-07 02:56:05 +01:00
Bartosz Dziewoński 579766b5ab Fix detection for the sticky "Add topic" being stuck
This fixes some animations when scrolling.

Change-Id: I5ed4a066436f673732227612c5b393ea47e16c45
2023-02-01 20:09:28 +01:00
Bartosz Dziewoński 52de4b0b1b Fix interaction of "Add topic"/"Read as wiki page" buttons with categories
Bug: T328452
Change-Id: Iabb52c73e4b4a83175d95d8d542ef752f6f961dc
2023-02-01 20:09:28 +01:00
David Lynch 0db7b997f3 Log an event when the lede button is clicked
Bug: T314596
Change-Id: Ifb5c9eb3cfac8b217546d4945e6f39ce38251e1e
2022-12-15 11:27:26 -06:00
jenkins-bot 8a6bc91f46 Merge "Consider MediaWiki:Talkpageheader message when adding "Learn more" button" 2022-12-05 19:04:35 +00:00
Bartosz Dziewoński 74fbe19838 Consider MediaWiki:Talkpageheader message when adding "Learn more" button
We also need to move the code to the other hook to avoid adding it twice now.

Bug: T324046
Change-Id: I186d15f6e6537b47b019c9707d7ae8ef080f4ae2
2022-11-29 18:46:40 +00:00
Ed Sanders 79537c9892 Ignore negative page scroll values on iOS
Bug: T323400
Change-Id: Id37f3da183a08f936c6b6d11ed7307bb9d8bd28b
2022-11-29 14:29:50 +00:00
Ed Sanders b132522fa9 Make "Add topic" button sticky
Bug: T316175
Change-Id: Ie5198e902ec3fa7a7eba56cef6c6f0ef71ef7314
2022-11-16 12:23:34 +00:00
Ed Sanders e0855e4f41 Make virtual keyboard detection into a body class
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
2022-11-10 23:30:53 +01:00
Ed Sanders 79521f89cf Add button to reveal lede section on mobile
Bug: T312309
Depends-On: I9c3035c9dbe7545a05efb2286dffe0145d3557b4
Change-Id: I9d74914ddbcc9def74e85106a68574a807b0b731
2022-11-10 22:10:04 +00:00
Ed Sanders d0cd0e57a1 Separate out mobile init from controller.js
Change-Id: I2dfafc1d816c5cae97fd51bc11de9aefbdd73ee8
2022-10-14 17:38:19 +01:00