Page MenuHomePhabricator

Label of hide unused fields is overflowing
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • go to german wikipedia (live or beta)
  • add or edit a template with more than 3 parameters
  • check out the label for unused fields

What happens?
The text of the label is overflowing in 18 of the current 27 translations, see: https://translatewiki.net/wiki/Special:Translations?message=MediaWiki%3AVisualeditor-dialog-transclusion-filter-hide-unused&namespace=8

Screenshot from 2022-01-25 10-46-53.png (427×1 px, 81 KB)

Requirements

  • Adjust label to "Hide unused" (remove "field" or "parameter"). Note: Translations will be updated via translatewiki.net.
  • Make the button label wrap if the button would be longer than the search field above it

German example with shorter label:

Screen Shot 2022-03-28 at 18.38.42.png (182×310 px, 15 KB)

Design follow-up ticket: investigate if expanding sidebar width makes sense and determine how that affects the responsive behavior/ ratios

Event Timeline

Aklapper removed a subscriber: WMDE-TechWish.

[Please avoid adding project tags as subscribers, as it won't make tasks show up on those boards. Thanks!]

Pols12 subscribed.

I18n issue, since English version is fine.

Other possibility: allow line break with white-space: pre-wrap; CSS rule.

Related issue: having only a link-style text, without any icon, seems me a strange design for a switch button.

Change 775299 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Nudge translators to make this message short

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

Sorry for insisting, but you can’t just ask to translators to find another way to phrase. Languages do not have the same concision: “Messages are often longer than you think!”.

Based on KDE translation stats, we probably need to allow 32 characters to cover 90% of usual cases.
In 28 current translations, 32 characters limit would already exclude 5 languages (Greek, Indonesian, Twi, Ukrainian, and Uzbek).

white-space: pre-wrap; CSS rule is a minimal requirement to enhance this issue.

Thanks @Pols12 - very helpful. Will take another look to come up with a more universal solution!

thiemowmde set the point value for this task to 3.Apr 6 2022, 2:19 PM
thiemowmde updated the task description. (Show Details)

Change 786946 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Stop hide unused label from overflowing

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

@ECohen_WMDE One question to the exact margin/width because it showed up during code review:

We can either align the buttons border with the search field's border:

wrap label1.png (550×908 px, 88 KB)

Or we align the buttons text with the search field's border:
wrap label2.png (550×900 px, 88 KB)

Also note, that too long words will break in the middle of the word. I guess that's also what we want 🤔

@WMDE-Fisch Good catch! Let's align the border with the search border (option 1).

Also note, that too long words will break in the middle of the word. I guess that's also what we want 🤔

Agree, this is ideal

Change 786946 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Stop hide unused label from overflowing

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

Change 775299 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/VisualEditor@master] Nudge translators to make this message short

Reason:

Obsolete via I37505af.

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

Change 775299 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/VisualEditor@master] Nudge translators to make this message short

Reason:

Obsolete via I37505af.

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

While it's true that the burden should not be on translators to fix a UI issue, ideally wrapped text shows up as little as possible and if there are two different options for translation, I think it's still helpful to have a note mentioning that the space is small and shorter is better. I'm not sure if this message has now been removed?

While it's true that the burden should not be on translators to fix a UI issue, ideally wrapped text shows up as little as possible and if there are two different options for translation, I think it's still helpful to have a note mentioning that the space is small and shorter is better. I'm not sure if this message has now been removed?

The message never made it in, so just the patch got abandoned. But I think we can add a little hint still.

Change 775299 restored by WMDE-Fisch:

[mediawiki/extensions/VisualEditor@master] Nudge translators to make this message short

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

Change 775299 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Nudge translators to make unused toggle button label short

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

In demo, we found that extremely long words are not hyphenated.

Change 790619 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Update CSS to force word wrap in unused parameters button

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

Change 790619 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update CSS to force word wrap in unused parameters button

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