Page MenuHomePhabricator

MUL - Use `mul` Labels and Aliases as placeholders for missing values in the mobile termbox
Open, Needs TriagePublic

Description

Problem:
Instead of adding identical values for many languages, editors will soon be able to add a mul Label and Alias in the termbox. It is, however, not immediately obvious, that the mul entries will work as fallbacks. Editors will only see "No label defined" which might convince some editors to add the redundant Labels again. We need to make this more intuitive.

Notes:

  • T329655 does the same thing on desktop
  • The reason is that we only allow the language code mul for Labels and Aliases and not for descriptions (T313027).
  • We only consider mul values as intentional fallbacks. So we only use mul values as placeholders and not en values.
  • The placeholders could update live, on publish, or on reload (not ideal, but ok for now).

Solution:
If a mul label is available, use it as a placeholder for all other existing languages with an empty value.

Mockups:

Screenshot 2023-05-16 at 09.52 1.png (1×798 px, 64 KB)

BDD:
Adding mul Label/Alias: The mul Label/Alias is used as a placeholder for all empty Labels/Aliases after a mul value is published on (desktop and) mobile.

GIVEN an Item without a mul Label/Alias
WHEN the mul Label/Alias is added on desktop (or mobile)
AND the user publishes their changes to the termbox
THEN the default Label/Alias placeholder value of all languages is replaced by a placeholder that matches the new mul Label/Alias

Removing mul Label/Alias: The old placeholder for empty Labels/Aliases returns after a mul value is removed on (desktop and) mobile.

GIVEN an Item with a mul Label/Alias
WHEN the mul Label/Alias is removed on desktop (or mobile)
AND the user publishes their changes to the termbox
THEN the default Label/Alias placeholder value of all languages is replaced by a placeholder that matches the old copy

Existing mul Label/Alias: The mul Label/Alias is used as a placeholder for all empty Labels/Aliases when the Item is opened for viewing or editing on (desktop and) mobile.

GIVEN an Item with a mul Label/Alias specified
WHEN the Item is opened for (viewing or) editing on desktop (or mobile)
THEN all empty Labels/Aliases are shown with the mul Label/Alias as a placeholder (in gray, see mockups)

Considerations:
The current placeholders included in the mobile Termbox present a red color. We guess this decision had to do with making missing information more visible and motivate edits. Nevertheless, once the Multiple languages' functionality is introduced, this doesn't apply anymore: the 'No label defined' copy will be replaced by the MUL label, which might not require any user action. In order to make apparent to editors that this is a placeholder, the color of these texts in the mobile termbox should be updated to #72777d (the standard placeholder color in our products). In order to ensure enough contrast, there are other visual changes that need to be applied to the mobile Termbox. These are all specified in Figma.FYI, we used this opportunity to apply the styles of the upcoming Codex Accordion component for future consistency and scalability.

Acceptance criteria:

  • The mul Label/Alias is used as a placeholder for all empty Labels/Aliases when the Item is opened for viewing or editing on mobile (see mockups and BDD).
  • When an empty Label/Alias is edited the placeholder value disappears on mobile (see mockups and BDD).
  • Release to test.wikidata.org

Event Timeline