Page MenuHomePhabricator

Consolidate differences between ButtonWidget (icon only, framed)‎ and ButtonWidget (indicator only, framed)‎
Closed, DeclinedPublic

Description

A question to start: how do they differ? Visually they look alike, should they remain as one kind of component?

Screenshot 2015-09-28 15.18.40.png (148×249 px, 15 KB)

Event Timeline

violetto raised the priority of this task from to Needs Triage.
violetto updated the task description. (Show Details)
violetto added subscribers: violetto, Volker_E.

@matmarex Could you shed some light here? When/where is the indicator-only ButtonWidget used?

How would I know where it is used? It's you who are looking at a tech demo and trying to engineer uses of its pieces, not me.

An indicator-only ButtonWidget is shown in the demo because, from the features that were implemented for practical use cases, it followed that such a ButtonWidget was possible. Therefore we put it there, as a minimal test case, to look at when we change things and ensure it does not break. Regression testing is literally the only reason it was brought to existence.

The difference between icon and indicators, as used internally in the OOjs UI library, is explained at https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Icons,_Indicators,_and_Labels. For the purposes of graphical design they're basically the same thing, but indicators have tighter space constraints.

@matmarex I thought that all widgets available got included into the demo, because they were already used somewhere in production. We should first of make sure, that all use cases are well-designed, not all technically possible outcomes.
@violetto I think, best would be to arrange a certain min-width and min-height to these two button types and also try to clarify that icons/indicators should be centered horizontally and vertically (when possible; like in current state) and don't touch anything else on those for now.

No, the demo examples are usually written before any of the code is used anywhere else. Like I mentioned, it's used for testing.

Closing this task as there doesn't seem to be a real world use of ButtonWidget (icon-only) and (indicator-only). A possible approach for future possible regressions would be to define another class like oo-ui-iconOnlyElement.