Page MenuHomePhabricator

Convert UniversalLanguageSelector (ULS) controls to using mediawiki.ui
Closed, ResolvedPublic

Description

Author: swalling

Description:
ULS looks and works great for me, after trying it on my home wiki (enwiki) and others. Major kudos!

I noticed that ULS currently has button styles that very closely match the standard used in mediawiki.ui. Both seem to be based on the "Agora" guidelines from Pau and the design team, so it would probably save you from having to use custom styles if you convert to using the mediawiki.ui library.

We're already standardizing on it in Echo, GuidedTour, GettingStarted, as well as login and account creation in core, so if you need support or have feedback on how reusable the styles are, others folks in features engineering are available to advise.

I noted only converting the controls (i.e. buttons) in this enhancement request, because while the current version of mediawiki.ui specifies a font family stack, we're eventually going to phase that out in favor of applying any new font stack to skins, where they properly belong.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:03 AM
bzimport set Reference to bz50599.
bzimport added a subscriber: Unknown Object (MLST).

The Agora styles mw-ui-button, mw-ui-primary (for the blue) and mw-ui-button-group get most of the way there. The larger font in ULS makes the buttons pretty big so Agora needs a modifier or a rethink, and perhaps the "down" state should be moved into Agora as mw-ui-down.

Bug 48067 enumerates all our inconsistent close icons, including this one.

I support this, but there is a constraint that ULS has to support MediaWiki 1.20 and newer still. That is likely to complicate or slow down the process.

(In reply to comment #2)
ULS in 1.20 and 1.21 could require Extension:Agora (where the CSS was originally developed). https://gerrit.wikimedia.org/r/#/c/69458/ makes Extension:Agora a backport of the mediawiki.ui module for earlier releases.

I would prefer to just backport mediawiki.ui. It has no dependencies, so this should be relatively straight-forward.

This is a little bit complicated by the fact that bug 54485 (converting SASS to LESS is almost finished). That means to do a simple backport we'd also have to backport the LESS infrastructure.

But I think it's okay to backport the compiled CSS files to the old versions. The CSS files would only be accepted in the old release branches, and only direct compiles from the LESS files could be committed.

It depends how important this consistency is. The simplest solution is to wait for ULS to drop support for 1.20 and 1.21, tolerating a little temporary inconsistency.

Siebrand what do you say, We'd like to get all the extensions on board with the mediawiki.ui work but i don't want to do anything that is throw away. Could you weigh in on whether you want to go ahead with what Matt suggests or wait till the branch is updated(?)

ULS has compatibility with MediaWiki 1.20. I don't plan on making it incompatible with 1.21 until 1.23 has been released. Compatibility with 1.20 will probably be removed a month after the 1.22 release.

Matt, given that 1.20 and 1.21 will need support for some time more, what do you recommend?

I recommend we wait until ULS requires 1.22+.

Currently, mediawiki.ui is not in 1.20 or 1.21 at all. If we later decide to backport mediawiki.ui in some form (either with the LESS infrastructure, or just the compiled CSS), we could reconsider. However, I'm okay with waiting for this.

I'd also suggest not backporting mediawiki.ui (and thus waiting for ULS to drop support for older MediaWikis to implement this in it) – such a large change in a point release (minor version) would likely be a pain to manage for people installing extensions and wondering why the styles don't show.

In T52599#574556, @Mattflaschen wrote:

I recommend we wait until ULS requires 1.22+.

ULS is now documented to require 1.22+, so it can start using mediawiki.ui features (at least the early ones), even if ULS master needs to retain compatibility with 1.22.

Change 193327 had a related patch set uploaded (by McIntireEvan):
Update inputs to use mw-ui styles

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

Change 193327 merged by jenkins-bot:
Update inputs to use mw-ui styles

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

Nemo_bis subscribed.

Approved. I think expansion of mediawiki.ui to new places is announced on Tech/News? Or maybe that's only for MediaWiki core?

I had to revert the patch because it was incomplete. A few more steps need to be done. You can see issues in this screenshot

Screenshot5.png (347×512 px, 37 KB)

Rever commit : https://gerrit.wikimedia.org/r/#/c/200508/

It's not obvious from the screenshot only. You wrote in the revert

  • Large font sizes
  • Buttons missing colors(green, blue, red)
  • Language name buttons breaking to two lines
  • Unnecessary button.css not removed

  • Large font sizes

Looks normal to me, will check.

  • Buttons missing colors(green, blue, red)

Which ones exactly? I believe some of these were intentional. Do note that mediawiki.ui uses colors differently.

  • Unnecessary button.css not removed

It's not unused. Translate still uses it. This was mentioned in the review of the patch, but not clearly in the patch summary.

I agree the font size should be more balanced. In the screenshot, the Display/Input tabs are much smaller than the text of the respective sections. Should also be tested with languages which have a longer list of options.

A few notes…

  1. The entire layout should use the booklet style layout (see expanded transclusion dialog in VE) (also attached below)
  2. "language used for writing" should probably be a segmented/toggle control since only one can be selected, this will also save space
  3. Cancel and Apply Settings should be at the top left and right (respectively) of the dialog
  4. The intention (color) of the apply button should be green (constructive)
  5. X icon should be removed (since it will be replaced with "cancel" in top left corner)
  6. Input methods array of radio controls looks weird, A. why isn't the wrapped text indented? B. Why do the lines appear to be wrapping at an inconsistent length?

We're deprecating "small" and "large" style controls, so please don't use those.

Screenshot_2015-03-30_19.43.05.png (524×728 px, 83 KB)

If the radio array wrapping issues is a problem with the OOUI controls, please log a blocking but so the UI-Standardization team can take a look. feel free to add me and @Prtksxna to any control blocker related blocker issues.

Also its great to see more UI being converted. Thanks all!

ULS, as part of MediaWiki Language Extension Bundle, is targeted for non-WMF users as well. We cannot just adopt the newest available style/interfaces unless they are optional.

The idea was to convert to MediaWiki UI as a intermediate step and that was partly done. The patch got reverted for some (easy to fix) issues, and then Jared asked for more changes (relatively complex to implement) to be done, for which nobody currently has time to implement.

Since the current interface is not bad, just inconsistent, this is likely to be postponed for a quite while, as many tech dept stories are, and because OOjs UI cannot be depended on yet (see list below).

master "oojs/oojs-ui": "0.11.3",
REL1_25 "oojs/oojs-ui": "0.11.3",
REL1_24 OOjs UI v0.1.0-pre
REL1_23 OOjs UI v0.1.0-pre (different version from above)

Nemo_bis changed the task status from Open to Stalled.Jun 5 2015, 9:06 AM

ULS, as part of MediaWiki Language Extension Bundle, is targeted for non-WMF users as well. We cannot just adopt the newest available style/interfaces unless they are optional.

The alternative possibility is to only support older release of core with the corresponding older release branch of ULS.

For example, say core REL1_23 can only be used with ULS REL1_23.

(Related question, does ULS master really still support 1.22 as suggested at https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector? I note that @Nikerabbit only went back to REL1_23 in his discussion above.).

The alternative possibility is to only support older release of core with the corresponding older release branch of ULS.

This model was explicitly discarded in the past as too expensive, perhaps the [[MLEB]] talk page is a better place to propose a new process?

Change 220751 had a related patch set uploaded (by Santhosh):
Update ULS settings UI style mediawiki.ui style

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

Volker_E renamed this task from Convert ULS controls to using mediawiki.ui to Convert UniversalLanguageSelector (ULS) controls to using mediawiki.ui.Jan 19 2016, 12:12 AM
Volker_E added a subscriber: Mattflaschen-WMF.

Change 220751 merged by jenkins-bot:
Update ULS settings UI style to mediawiki.ui style

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

Nikerabbit changed the task status from Stalled to Open.Apr 7 2016, 2:07 PM
Nikerabbit assigned this task to santhosh.
Nikerabbit edited projects, added Language-Q4-2016-Sprint 1; removed Patch-For-Review.
Nikerabbit updated the task description. (Show Details)
Nikerabbit moved this task from Backlog to QA on the Language-Q4-2016-Sprint 1 board.
Nikerabbit moved this task from QA to Done on the Language-Q4-2016-Sprint 1 board.
Nikerabbit removed a subscriber: wikibugs-l-list.

This is already done, how can it be blocked by anything?