Page MenuHomePhabricator

ButtonWidget as Link - Make the customization easy
Open, Needs TriagePublic

Description

ButtonWidget can act as a link if we set href value and make it frameless. But it has the following problems:

  1. The label text is bold
  2. Focus border is present
  3. Must set constructive flag
  4. Hover underline not present

While trying to migrate the following UI to oojs, I faced this issue.

I can do custom CSS , but that is not the point.

  1. We need to document and illustrate how to create a link widget from button widget but with a single config value(type: link?) rather than doing the above mentioned list of customization)

OR

  1. Create a LinkWidget itself.(Is there any reason for not having this?)

Or am I missing any other simple way to achieve links using OOJS UI?

Event Timeline

santhosh created this task.Feb 1 2017, 5:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 1 2017, 5:20 AM

@Pginer-WMF We should consider a distinct handling of links vs buttons. These links with icons seems like an intermediate interface element between frameless buttons already provided by OOjs UI and a link with accompying icons?
@santosh was asking me why there isn't a LinkWidget or how to make a non-bold link with OOjs UI widgets? Maybe reconsidering these as bolded elements?

Without any customization, this is the closest UI we can get from ButtonWidget

And on focus:

In my opinion, if you want a link and not a button, you should not be using OOjs UI ButtonWidget, but just a plain HTML <a> link. But others' opinions differ. See also https://gerrit.wikimedia.org/r/#/c/237640/ where I disagreed with @Esanders over the same issue.