Page MenuHomePhabricator

componentize compact personal bar code into general list control
Closed, DeclinedPublic

Description

Take compact personal bar code and integrate generalized version as mediawiki.ui component


Version: unspecified
Severity: enhancement

Details

Reference
bz70433

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:50 AM
bzimport set Reference to bz70433.
bzimport added a subscriber: Unknown Object (MLST).

Please provide documentation for this and examples of where it is being used outside this project.

  • Is this mw-ui-menu?
  • When does one use this element?

Flow has menus and it would be good to understand if they are different and if so why they are different.

With small changes (click rather than hover), this is the start of the dropdown list control, which is required extensively in preferences and special pages.

gryllida wrote:

How does this overlap with list controls OOjs UI already has?

(In reply to Jon from comment #1)

Flow has menus and it would be good to understand if they are different and
if so why they are different.

It seems to be mostly the same as the Flow Newest topics/Recently active topics menu. Although the Compact Personal Bar has a lot more items, it's more similar than different:

  • Drop down menu
  • Multiple choices
  • One of the choices shows when the menu is not being hovered/clicked. (For the sort menu, the current selection shows. For CPB, your username link shows)
  • There is an icon on the left

The only noticeable difference (other than styling) is that the CPB has special behavior if you click the displayed item (rather than hovering). I.E. it goes to your user page.

The Flow ... menus are different.

Matt, I think we're saying the same thing, the CPB *is* a dropdown list, for mw.ui we just need to remove the hover expand behavior (but keep a hover behavior to be consistent with other controls) and expand the menu on click. My point was that its up to the devs to decide if it makes sense to bring it in to core and make some changes to it or make a new component from scratch with the same styling.

Deploying a new select box control everywhere will be complex.

It can't be done with just "normal" styling and the standard element (e.g. <input>) like textboxes were. I'm pretty sure it can't be done with even tricky styling like the checkboxes (CPB doesn't use <select> + tricky styling, but a nested structure with multiple elements per option, built around <li>).

Also, CPB doesn't have to deal with the issue of actually submitting a <select> control. Although it's an drop-down, you don't actually submit a form; you're just clicking a well-styled link.

Other drop downs/lists in core (the preferences and special pages you mentioned) do have to submit.

Thus, I don't think it should block setting the global to true.

Mattflaschen-WMF claimed this task.

OOjs UI has this (or at least something close, DropdownWidget), and we're moving to that. See T100270: Replace use of jQuery UI and MW UI with OOUI across all Wikimedia-deployed extensions and core.