Page MenuHomePhabricator

Update documentation for addPortlet API
Open, Needs TriagePublic

Description

From https://meta.wikimedia.org/w/index.php?title=Talk:MoreMenu&oldid=26506053#c-Xover-20240329161100-Jdlrobson-20240324141900 and T359110 there is some confusion around the addPortlet API.

  • Should be announced in Tech News given we have evidence it is now useful and should solicit feedback.
  • Fix the documentation for the before argument ("selector of the element preceding the new portlet" should presumably be "selector of the element the new portlet should precede"). I've tried adding some docs about the dropdown use case at #Dropdowns (Vector-only)
  • Document the skin specific behaviours.
  • Consider providing further abstractions that specifically create a dropdown (where supported) but add addPortlet