Page MenuHomePhabricator

Page tools change does not work together with Content Translation Beta
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
https://en.wikipedia.org/wiki/Special:MyContributions

Screenshot 2023-01-23 at 22.41.15.png (1×3 px, 863 KB)

QA Results - Prod

ACStatusDetails
1T327715#8576414

Event Timeline

TheDJ triaged this task as High priority.Jan 23 2023, 9:43 PM

This seems like high prio to me, we can't show this to all logged in users like this (and another reminder as to why eternal beta's are bad).

This is also happening with the LintHint tool (https://en.wikipedia.org/wiki/User:PerfektesChaos/js/lintHint). Its output, which is supposed to appear in the grid section that contains the article title, is appearing in the upper right. Something has maybe changed in the grid; I can't tell if the grid has a bug or if all of these tools need to be told to put their output in a new place.

LintHint box in the wrong part of the grid.png (743×1 px, 239 KB)

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

[mediawiki/skins/Vector@master] Add extra grid-area for content translation extension

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

Jdlrobson added subscribers: Pginer-WMF, santhosh.

Hi @Pginer-WMF @santhosh relatively urgent ping here - the contributions page seems to add 2 headers to the page and that's causing some issues with the latest iteration of the layout, which we missed in QA due to the fact ContentTranslation is in beta and this was a very specific page. This is not compatible with our current direction with the Vector skin and we'd like to discuss this more and understand more about what would be a better approach going forward, preferably using our existing APIs.

Several options that come to mind:

  • prepend the existing title to the content area (mw.util$content) and modify the existing page title, use mw.util.addPortletLink to add the existing buttons
  • Remove this code in favor of the work we've been doing in the Special:Contribute page - perhaps enabling that on English Wikipedia Vector 2022 skin
  • Not modifying the title, but adding the buttons to a more appropriate place in the page.
  • Using mw.util.addSubtitle to add these under the existing title.

In the short term we've arranged a short term fix to keep the status quo which we'll backport tomorrow, but we'd prefer this not to become the long term solution.

Thanks in advance!

Hi @Pginer-WMF @santhosh relatively urgent ping here - the contributions page seems to add 2 headers to the page and that's causing some issues with the latest iteration of the layout, which we missed in QA due to the fact ContentTranslation is in beta and this was a very specific page. This is not compatible with our current direction with the Vector skin and we'd like to discuss this more and understand more about what would be a better approach going forward, preferably using our existing APIs.

Several options that come to mind:

  • prepend the existing title to the content area (mw.util$content) and modify the existing page title, use mw.util.addPortletLink to add the existing buttons
  • Remove this code in favor of the work we've been doing in the Special:Contribute page - perhaps enabling that on English Wikipedia Vector 2022 skin
  • Not modifying the title, but adding the buttons to a more appropriate place in the page.
  • Using mw.util.addSubtitle to add these under the existing title.

In the short term we've arranged a short term fix to keep the status quo which we'll backport tomorrow, but we'd prefer this not to become the long term solution.

Thanks in advance!

Thanks @Jdlrobson for flagging this. The intention is to replace this with the new Contribute entry point (T322740) as you mentioned in your 2nd bullet point above. That will provide a more clean, extensible and consistent integration.
In terms of next steps, once instrumentation is in place (T321386) we plan to do a small launch on mobile (T319362), and consider enablement on desktop after it (using the responsive adjustments from T321550).

I am creator of lintHint mentioned above. This tool, some more of mine and I guess a pile of other tools are affected by the Vector 2022 change.

First thing to remedy all these issues is to agree upon a long-term method supported by all skins and mobile how to place any large message in full width of content area on top of every content.

  • Which needs to be repeatable; several tools may feel urged to provide such box in any sequence.
  • mw.util.addSubtitle() has been mentioned.
    • Maybe, but I fail to see a precise purpose description.
    • The naming of this method does not suggest that it will serve the new demands.
    • At least documentation at mw: will need to permit such usage and clarify that it is not supposed to show a one-liner only.
  • mw.util.addPortletLink() (or its predecessor) has been introduced ages ago. If developers are at lowest level of brightness they will use this function to insert a tool link rather than touching the selector of a toolbox directly and inserting something into HTML DOM.
    • That should ensure global maintenance to get such link provided at the right place, in any element below which selector ever, on every skin and actually on mobile as well.
  • mw.util.$content would be a very bad idea, since I learnt recently that this could appear on the right hand side of a split LivePreview area within wikieditor 2010 toolbar, changing at real time.

In earlier times there has been some mw.util.message() feature (or something like that, IIRC) which did exactly what is required now, but it has been removed many years ago in favour of mw.notification() (or something like that).

Change 882749 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add temporary extra grid-area for content translation extension

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

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

[mediawiki/skins/Vector@wmf/1.40.0-wmf.19] Add temporary extra grid-area for content translation extension

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

Jdlrobson moved this task from Incoming to Code Review on the Web-Team FY2022-23 Q3 Sprint 1 board.

Jan to backport later today.

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

[mediawiki/skins/Vector@wmf/1.40.0-wmf.20] Add temporary extra grid-area for content translation extension

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

Change 883217 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.40.0-wmf.20] Add temporary extra grid-area for content translation extension

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

Change 883212 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.40.0-wmf.19] Add temporary extra grid-area for content translation extension

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

Mentioned in SAL (#wikimedia-operations) [2023-01-24T22:37:56Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:883212|Add temporary extra grid-area for content translation extension (T327715)]], [[gerrit:883217|Add temporary extra grid-area for content translation extension (T327715)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-24T22:39:43Z] <samtar@deploy1002> jdrewniak and samtar: Backport for [[gerrit:883212|Add temporary extra grid-area for content translation extension (T327715)]], [[gerrit:883217|Add temporary extra grid-area for content translation extension (T327715)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-24T22:47:01Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:883212|Add temporary extra grid-area for content translation extension (T327715)]], [[gerrit:883217|Add temporary extra grid-area for content translation extension (T327715)]] (duration: 09m 04s)

Edtadros added subscribers: Jdrewniak, Edtadros.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Buttons appear above the user contributions title.

Screenshot 2023-01-31 at 2.18.08 PM.png (673×1 px, 247 KB)

Screenshot 2023-01-31 at 2.13.36 PM.png (674×1 px, 245 KB)