Page MenuHomePhabricator

OOjs UI: Need a way to add a non-functional label to the top of a popupToolGroup (within the popup)
Closed, ResolvedPublic

Description

See design mock-up at https://trello.com/c/xCo6uLAZ/9-5-references-dropdown-from-toolbar-styling.

Right now, I can give a popupToolGroup a label by using the 'label' param in a toolbarGroup definition:
{

'label': 'Cite',
'type': 'list',
'icon': 'reference',
'title': OO.ui.deferMsg( 'visualeditor-toolbar-cite-label' ),
'include': [ { 'group': 'cite' } ]

}

However, this puts the label above the popup (in the popupToolGroup-handle) rather than within the popup itself (as needed by the design linked to above).

I can imagine two different ways of providing this functionality:

  1. Add a new type of param for toolbarGroups called something like 'inner-label'
  1. Allow creating non-functional labels from the on-wiki group definition, for example:

[

{ "label": "cite" },
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }

]


Version: unspecified
Severity: enhancement

Details

Reference
bz65377

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:15 AM
bzimport added a project: OOUI.
bzimport set Reference to bz65377.

After discussing with Trevor we decided the best way to implement this would be to have a parameter like 'label-position' which controls where the label appears.