Page MenuHomePhabricator

Create button abstraction
Closed, ResolvedPublic

Description

Wherever we use mw-ui-button we should replace this with a class which works in a similar way to Icon.js
This will help us transition to OOJS UI more easily.

Note where a button is also an Icon we should use a ButtonIcon abstraction which merges both concepts.

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Readers-Web-Backlog.
Jdlrobson moved this task to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Jdlrobson.

Why not directly transition to OOJS UI instead of this intermediate step?

We need to be using more of OOJS UI library before migrating over to it imo, it's not fair on our users to have an increased payload with duplicate infrastructure. With an abstraction this makes it a lot easier. Currently it should be very trivial to migrate over too oojs ui for icons for example. I would suggest:

  • Adding abstractions everywhere
  • In alpha/beta use OOJS ui for these abstractions
  • When all abstractions have been ported to OOJS ui migrate to stable, taking care not to break display for cached pages and avoid/perform cache flushes.

Change 204408 had a related patch set uploaded (by Jdlrobson):
Add button abstraction

https://gerrit.wikimedia.org/r/204408

Change 204408 merged by jenkins-bot:
Add button abstraction

https://gerrit.wikimedia.org/r/204408

bmansurov claimed this task.