Page MenuHomePhabricator

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


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)


  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

@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 where I disagreed with @Esanders over the same issue.