Page MenuHomePhabricator

"Edit interlanguage link" is styled incorrectly with page tools enabled
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
Jdlrobson
Jan 26 2023, 6:58 PM
Referenced Files
F36921055: Screenshot 2023-03-20 at 4.38.30 PM.png
Mon, Mar 20, 11:42 PM
F36921048: Screenshot 2023-03-20 at 4.37.25 PM.png
Mon, Mar 20, 11:42 PM
F36921046: Screenshot 2023-03-20 at 4.36.22 PM.png
Mon, Mar 20, 11:42 PM
F36921044: Screenshot 2023-03-20 at 4.35.28 PM.png
Mon, Mar 20, 11:42 PM
F36916069: Video_230317094937.webm
Fri, Mar 17, 9:11 AM
F36911269: Wbc-editpage-bug.png
Tue, Mar 14, 2:39 PM
F36908322: Screenshot 2023-03-12 at 4.33.36 PM.png
Sun, Mar 12, 11:34 PM
F36908320: Screenshot 2023-03-12 at 4.33.26 PM.png
Sun, Mar 12, 11:34 PM

Description

Broken out from T327719

  • The "Edit interlanguage links" (EIL) link text wraps onto a second line when expanded
  • The EIL link text size is different to all other links (And is too small to read when collapsed)
  • The EIL link pencil icon appears hard against the border when collapsed

Screen Shot 2023-01-26 at 10.57.08 AM.png (75×177 px, 7 KB)

Screen Shot 2023-01-26 at 10.56.59 AM.png (696×1 px, 398 KB)

Developer notes

This code is inside resources/skins.vector.js/languageButton.js - it will need to be modified to account for page tools enabled AND disabled

QA

Event Timeline

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

@Jdlrobson sorry for not providing mockups earlier on.

dropdownpinned
Screenshot 2023-02-06 at 4.18.28 PM.png (842×723 px, 166 KB)
Screenshot 2023-02-06 at 4.19.38 PM.png (918×659 px, 132 KB)

Change 887381 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/Vector@master] Refine styles for linterlanguage links button.

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

Looks like I did miss a use-case with patches above (as Jon identified in code review)

Screen Shot 2023-02-07 at 3.51.57 PM.png (326×299 px, 17 KB)

Jdlrobson added a subscriber: ovasileva.

@ovasileva this was removed from the sprint as we felt we were oversubscribed in sprint 3 and weren't show how priority for this aligned with existing priorities. This task if important can be swapped in for another task in next team standup if needed.

With the activation in all wikis last night it is shown in the German Wikipedia with German as user language this way:

grafik.png (373×349 px, 28 KB)

With English as user language it looks better:

grafik.png (360×289 px, 13 KB)

Yes, for Russian we have the same problem:

image.png (682×346 px, 30 KB)

Today on itwiki the link is styled incorrectly but in a different way, see
élément, @media screen, display: flex;

Screenshot 2023-02-16 at 08-28-42 Blank Generation (film) - Wikipedia.png (734×154 px, 16 KB)

Today on itwiki the link is styled incorrectly but in a different way, see
élément, @media screen, display: flex;

Screenshot 2023-02-16 at 08-28-42 Blank Generation (film) - Wikipedia.png (734×154 px, 16 KB)

This seems due to the padding left, see @media screen .vector-pinned-container .vector-pinnable-element .vector-pinnable-header, .vector-pinned-container .vector-pinnable-element .vector-menu-heading, .vector-pinned-container .vector-pinnable-element .mw-list-item
with and without padding-left: 0; selected on frwiki:

Screenshot 2023-02-17 at 11-13-31 Vauzy de Saint-Martin — Wikipédia.png (658×140 px, 13 KB)

Screenshot 2023-02-17 at 11-13-08 Vauzy de Saint-Martin — Wikipédia.png (692×154 px, 14 KB)

On es.wp and pt.wp we seem to have the same problem:

image.png (1×390 px, 84 KB)
image.png (1×386 px, 103 KB)

While you are changing that could you add a span element to the link? That would make things more uniform. Thanks :)

obraz.png (1×1 px, 114 KB)

Also note that due to gadgets the tools list can be rather long. And as the font is bigger then it was on the left sidebar, then the list is quite high, too high in fact.

left sidebar, small font, underlinebig font, overlinesmall font, overline
obraz.png (1×1 px, 440 KB)
obraz.png (1×1 px, 299 KB)
obraz.png (1×1 px, 279 KB)

Notice how on the old sidebar (left screen) the menu is the same height as the same menu items split in two (middle screen). So the menu is almost double in height.

Also not sure why are going with overlines. I think you will be opening another front of controversial changes. Headers are prominently underlined on Wikipedia from like... always. I think changing that is a mistake. Also note that the page is now very inconsistent.

  • page title - underlined
  • left actions - underlined
  • right actions - underlined
  • left sidebar title - underlined
  • left sidebar header items - overlined
  • right sidebar title - underlined?
  • right sidebar header items - overlined

You have over and underlined headers right next to each other. For me it looks bad (and not only because I'm editing Wikipedia for 17 years).

obraz.png (1×1 px, 362 KB)

But if you are going to force overlined headers please at least make those headers in the menu more distinct and make the font for items smaller. Which will also be beneficial because the page tools will have a smaller height.

This is how it looks on 15,6" notebook (cs.wikipedia.org).

image.png (1×1 px, 774 KB)

  1. Overlapped text.
  2. I don't like also the second sliding bar but it is probably necessary for smaller displays.
  3. Cat-a-lot overlaps V22 button.

Per chat with @Urbanecm.

This is how it looks on 15,6" notebook (cs.wikipedia.org).

image.png (1×1 px, 774 KB)

  1. Overlapped text.
  2. I don't like also the second sliding bar but it is probably necessary for smaller displays.
  3. Cat-a-lot overlaps V22 button.

Per chat with @Urbanecm.

I filled T330068: Incorrect padding and lack of design in the scrollbar for tools.

@alexhollender_WMF (and other's listening who have opinions) I want to play devils advocate here since this is not proving as trivial as first expected. If we want to keep iterating on this fine, but I am curious about what the long term solution is here. If we are expecting the language button to indefinitely appear in the sidebar, I'd rather spend time with the Wikidata developers working on a proper fix and removing our workarounds.

As I understand it, the existing code was meant to be a temporary workaround while the language team incorporated the feature in the language selector (that's what the code documentation says).

The language team already incorporated this feature into the language button for pages with language.

Screen Shot 2023-02-27 at 4.57.08 PM.png (580×472 px, 46 KB)

Screen Shot 2023-02-27 at 4.57.45 PM.png (264×382 px, 21 KB)

although they still need to incorporate it for pages with no languages:
Screen Shot 2023-02-27 at 5.01.52 PM.png (410×494 px, 34 KB)

Despite this, for some reason we still have this duplicate link and we're trying to add an icon to a menu that doesn't currently support icons on a solution that is already a workaround (e.g. we're adding workarounds to our existing workarounds). This is adding technical debt and IMO a weird inconsistency with other menu items that we'll have to revisit at some later date. The edit icon is also a little confusing as it suggests that you are going to open the editor, which is not what happens - an overlay is opened.

(FWIW Jan's current patch iteration looks like this):

Screen Shot 2023-02-27 at 4.53.03 PM.png (354×233 px, 24 KB)

Do we have any plans to address the fact the link spills out onto 2 lines as part of this task? This seems more of a concern to me right now.

I think you are right and we need to remove this link from the menu and move it to the first level of ULS. Smth like that:

image.png (424×865 px, 39 KB)

The link to the element in the wikidata is still in the menu and in general nothing will change.

Note that the same link is also for connecting to an existing WD item when there is no WD connected yet.

link-buttondialog
obraz.png (583×206 px, 13 KB)
obraz.png (337×549 px, 13 KB)

From: https://test.wikipedia.org/wiki/Test

Ok just a note here, given the conversation above, we know that currently:

  1. The ULS doesn't yet support the use-case where pages have no languages
  2. The Tools menu doesn't support icons yet (given the layout issues & multiple language bugs)

So temporarily, I'll remove the icon from this link and leave it in the tools menu.

Longer-term, we hope to move this link to the ULS entirely and remove it from the menu.

Change 887381 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove skinStyles for wikibase.client module

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

Also not sure why are going with overlines. I think you will be opening another front of controversial changes. Headers are prominently underlined on Wikipedia from like... always. I think changing that is a mistake. Also note that the page is now very inconsistent.

  • page title - underlined
  • left actions - underlined
  • right actions - underlined
  • left sidebar title - underlined
  • left sidebar header items - overlined
  • right sidebar title - underlined?
  • right sidebar header items - overlined

You have over and underlined headers right next to each other. For me it looks bad (and not only because I'm editing Wikipedia for 17 years).

obraz.png (1×1 px, 362 KB)

But if you are going to force overlined headers please at least make those headers in the menu more distinct and make the font for items smaller. Which will also be beneficial because the page tools will have a smaller height.

@Nux thanks so much for pointing this out. There is clearly more work to be done to achieve consistency here (and thank you for noting the established patterns that have existed for quite some time). Since the Main menu and Tools menu have titles, and I put an underline under those titles, I wanted to avoid a sort of double underline situation where the section headings of the menus also had underlines. In any case there's definitely room for improvement. @KieranMcCann, as well as the Design-Systems-Team, will be working on a variety of improvements to menus, and will be sure to include this in that work.

Edtadros added a subscriber: Edtadros.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: On beta cluster use https://en.wikipedia.beta.wmflabs.org/wiki/Related_test. Verify that the text size of the "Add interlanguage links" menu item is the same as the rest of the menu (per task description) and the icon is removed (per T328069#8669501)

@ovasileva I went through the task comments and above is my best guess as to what the validation criteria are. Please confirm before moving to QA in Prod.

Screenshot 2023-03-12 at 4.33.26 PM.png (974×1 px, 228 KB)

Screenshot 2023-03-12 at 4.33.36 PM.png (923×1 px, 226 KB)

Message from a German user on MediaWiki, March 13th:

The entry "Edit interlanguage links" in the tools navigation is cut off at the front due to an invisible edit-icon.

Wbc-editpage-bug.png (439×756 px, 37 KB)

Message from a German user on MediaWiki, March 13th:

The entry "Edit interlanguage links" in the tools navigation is cut off at the front due to an invisible edit-icon.

Wbc-editpage-bug.png (439×756 px, 37 KB)

@Edtadros - can you double-check this in production?

I can replicate the issue on German Wikipedia (https://de.wikipedia.org/wiki/Chris_Hipkins?useskin=vector-2022&uselang=de). A fix was merged March 7th so this should be fixed on March 16th when the fix hits production.

Hi, the cropped text of "Edit interlanguage links" I noticed in T328069#8620884 is resolved for me on itwiki, frwiki and enwiki.
But now I'm experiencing that the link "Edit interlanguage links" ("Modifier les liens interlangues" on frwiki in the video) is displayed a few fractions of a second later then other links in the menu, at the same time of other elements of the page, when purging the cache or opening a new page.

But now I'm experiencing that the link "Edit interlanguage links" ("Modifier les liens interlangues" on frwiki in the video) is displayed a few fractions of a second later then other links in the menu, at the same time of other elements of the page, when purging the cache or opening a new page.

This is expected as this is a temporary workaround while ULS is updated where we use JavaScript to inject the link which would otherwise be missing. I'll create a ticket when this is signed off to capture the remaining work.

Test Result - Prod

Status:
Environment: enwiki, mediawiki
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: While logged in check
https://en.wikipedia.org/wiki/Chris_Hipkins

Screenshot 2023-03-20 at 4.35.28 PM.png (932×1 px, 370 KB)

https://en.wikipedia.org/wiki/Chris_Hipkins?vectorpagetools=0

Screenshot 2023-03-20 at 4.36.22 PM.png (934×1 px, 395 KB)

https://de.wikipedia.org/wiki/Chris_Hipkins?useskin=vector-2022&uselang=de

Screenshot 2023-03-20 at 4.37.25 PM.png (932×1 px, 350 KB)

❌ AC2: Check sidebar of https://www.mediawiki.org/wiki/Reading/Web
Add links is a larger font size. This occurs when logged in. And similarly when the link is "Edit links"

Screenshot 2023-03-20 at 4.38.30 PM.png (1×1 px, 421 KB)