Page MenuHomePhabricator

[STORY] MUL - While editing, make Wikibase label fallbacks or the `mul` language code default clearly visible
Closed, ResolvedPublic13 Estimated Story Points

Description

As a Wikibase editor, while editing I can clearly see in the terms section if a missing label already falls back to a label in a particular language or to the mul language code. This will help me to decide whether a suitable fallback already exists or if I need to input a new one.

Mockups:

If NO mul label is available:

Screenshot 2023-07-13 195448.png (246×922 px, 29 KB)

If mul label is available:

Screenshot 2023-07-13 195408.png (246×921 px, 28 KB)

Acceptance criteria:

  • When the Wikibase Entity is opened for editing on desktop, the first Wikibase language fallback label is used as a placeholder - without being truncated - for all empty Labels.
  • If no fallback label is available, the mul label is used as a placeholder.
  • If there is no mul label to be used as default, "Enter a label in <language>" (the current placeholder) should be displayed
  • The en label is not used as the default placeholder for any empty labels, unless it is part of the Wikibase language fallback.
  • The acceptance criteria above can be validated on test.wikidata.org

Notes:

  • As of this task, the editing interface does not need to be reactive. i.e. the placeholder will not change while entering a label. Only after submit and refresh.
  • We can ignore ULS-added languages for now: Wikidata adds languages from ULS (for non-logged-in users, for logged-in users with fewer than 4 UI/Babel-specified languages), it is okay to only apply MUL placeholders for these (where available).
  • T340832 is implementing this for the reading UI.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Hey @Manuel. I have a couple of clarifying questions:

  1. What is it meant by "WHEN an empty Label/Alias is edited on desktop (or mobile), THEN the placeholder value disappears"? Does this refer to the fact that the MUL placeholder is replaced if a label is manually entered for a specific language? I think this should be made clearer in the tasks' descriptions.
  1. I believe that, in this task and the mobile one (which appears to group viewing and editing?), it should be documented at which point the new MUL label or alias is added to all languages. The BDDs seem to only capture the scenario in which the label already exists, leaving out the addition of a new MUL label. If my notes are correct, I think that what was agreed in our last conversation was:

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

We might need to investigate how technically feasible and costly this might be as part of this group of tasks.

Hey @Sarai-WMDE, thank you for looking into this! I tried to clarify things based on your comment. What do you think?

Sprint Planning Notes

  • If there is no mul language, the old placeholder should be kept
  • There is no intention to make the editing experience reactive, if during the same edit the mul label is removed, then the placeholder will only update post publishing changes
ItamarWMDE set the point value for this task to 8.Jun 13 2023, 10:23 AM

Some context for this task:

Lydia, Sarai, and I are still discussing if we want to...

A. Show placeholders for Aliases if in edit mode. In this case there would be an additional AC: Placeholders for Aliases can only take 2 lines + ellipsis (mockup will be updated soon)

B. Never show placeholders for Aliases (also not in edit mode). As this would be a UI change independent of mul, we would present a separate task for this.

You can expect an update on this from us later today.

We are going with placeholders for Labels AND Aliases in the editing mode. I have clarified the task accordingly.

Also, we have added limiting the placeholders for Labels and Aliases in both viewing and editing modes to take max 2 lines as a separate task (T340133).

As discussed, I closed the separate task T340133: MUL - Truncate placeholders for Aliases and instead added the specifications to this task.

@Sarai-WMDE: Would it be appropriate to move the mockup from the other task? Also, if we do not truncate Labels, maybe we should also not truncate Alises for now. This would mean striking the "Aliases (tbc)" AC (plus the respective description in the notes section).

Task breakdown notes:

  • This will probably touch some of the same files as related changes (see T338302, T339103), i.e. somewhere in view/resources/jquery/wikibase/.
  • We expect that the Labels and Aliases parts can be done separately (see subtasks), but it might make more sense to finish the Labels part before starting the Aliases part, so that we can use what we learned about how best to implement this. We might not work on the tasks in parallel. Aliases no longer in scope.
  • For the ellipsis, we can use the ellipsis message in MediaWiki core. (We’ll probably need to add it to our ResourceLoader module to have it available in JS, but we don’t need a new message for it.) Aliases no longer in scope.

Questions:

Release to test.wikidata.org

@Manuel does this mean you want a separate feature flag for this? Or can it just roll out with the train? (The whole mul feature will still be disabled on Wikidata.)

Hi @Lucas_Werkmeister_WMDE, I just wanted to make sure that this is released only on a test system and not yet on Wikidata. So we will need no separate feature flag for this. Thank you for asking!

See T307274: Display fallback labels and descriptions as placeholder in termbox, which proposes:

  1. The label placeholder should be the nearest label fallback of the term (e.g. if an item have both German and mul label and one who want to add a Bavarian label, the German label will be displayed as fallback)
  2. Same fallback also applies to descriptions

Hi @Bugreporter, thank you for the suggestion! We'll investigate!

Manuel changed the task status from Open to Stalled.Jun 29 2023, 8:17 AM
Manuel changed the task status from Stalled to Open.EditedJul 3 2023, 11:50 AM

I opened this task again: We decided to aim at generally representing the fallback chain in the placeholders (see separate task T340832). This task (as described here in T338330) will be the basis for this.

Manuel changed the task status from Open to Stalled.Jul 3 2023, 12:59 PM
Manuel changed the task status from Stalled to Open.Jul 4 2023, 11:47 AM
ItamarWMDE renamed this task from MUL - Use `mul` Labels and Aliases as placeholders for missing values in the desktop termbox [part 2 of 2: when editing] to [STORY] MUL - While editing, make Wikibase label fallbacks or the `mul` language code default clearly visible .Jul 13 2023, 4:07 PM
ItamarWMDE updated the task description. (Show Details)
ItamarWMDE removed the point value for this task.
ItamarWMDE set the point value for this task to 13.Jul 17 2023, 10:10 AM

Post re-scope task breakdown:

  • Whoever picks this task up coordinates with the engineer assigned to T340832 to identify dependencies between the stories.

Change 942627 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Show fallback labels as placeholders while editing

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

Change 942627 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Show fallback labels as placeholders while editing

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

You should now be able to verify the fallback when editing an Item on beta, for example: https://wikidata.beta.wmflabs.org/wiki/Q522693

This should now be ready to be verified by product on test.wikidata.org

Manuel updated the task description. (Show Details)

Thank you, @Michael, it's working great! \o/