Page MenuHomePhabricator

Widen / tweak the "Time zone" user preference to work in languages with longer labels
Closed, ResolvedPublic

Description

The “Time difference” dropdown currently has a lower-than-usual max-width applied, which fails in language like German:

As its only valid input is a timezone offset, we could limit the width of the input much more.

  • Add placeholder to extra visible input field
  • In non-JS version, it's always visible and could gain from above's adding placeholder

Event Timeline

Change 393777 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mw.special.preferences: Widen the dropdown of the "Time zone" field

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

matmarex renamed this task from Widen / tweak the "Time difference" user preference to work in languages with longer labels to Widen / tweak the "Time zone" user preference to work in languages with longer labels.Nov 28 2017, 3:31 PM

A placeholder could easily be defined in Preferences.php (search for $defaultPreferences['timecorrection'], and just add 'placeholder' => 'whatever' or 'placeholder-message' => 'whatever' to the array underneath), but I'm not sure what it should actually be or if it would be useful.

Change 393777 merged by jenkins-bot:
[mediawiki/core@master] mw.special.preferences: Widen the dropdown of the "Time zone" field

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

@Volker_E, do you think it's worth tweaking the form with a placeholder as you suggested?

@Jdforrester-WMF What values does it accept? The old version is showing a “+00:00”. I think it could be hard for a user to surely know what kind of value is expected, even if the user willingly chooses the option. Therefore a hint as placeholder seems useful.

This is fixed in the latest version of the OOUI branch, and it doesn't apply to the non-OOUI version, so mark as fixed?

@Jdforrester-WMF What values does it accept? The old version is showing a “+00:00”. I think it could be hard for a user to surely know what kind of value is expected, even if the user willingly chooses the option. Therefore a hint as placeholder seems useful.

From reading the code, it accepts either a signed two-digit hours offset (-99 – +99) or a signed two plus two digit hours:minutes offset (-99:59 – +99:59).

matmarex closed this task as Resolved.Apr 5 2018, 3:05 PM