Page MenuHomePhabricator

reconsider whether Common.js should run in Special:ContentTranslation
Closed, DeclinedPublic

Description

Common.js runs in all pages. It assumes a lot of things: that a skin is fully loaded (see T86850), that the sidebar is visible, and so on. It applies changes to articles and common special pages, but ContentTranslation is a very different special page - practically no skin, no side bar, no usual elements, and so on. The only significant element that it has in common with other special pages is the top personal bar.

Common.js can run conditionally using

mw.config.get( 'wgCanonicalSpecialPageName' ) === 'ContentTranslation'

But maybe it's even better not to run it on ContentTranslation at all. There is a precedent for this already - MobileFrontend has its own JS file.

This issues already caused problems in es.wikipedia and eo.wikipedia, and may cause more issues in other projects where CX will be deployed in the future, so we should think about this soon.

Event Timeline

Amire80 raised the priority of this task from to Needs Triage.
Amire80 updated the task description. (Show Details)
Amire80 added a project: ContentTranslation.
Amire80 subscribed.

... And there are issues in id.wikipedia, too.

I don't recommend this. Common.js is essential feature and it is better to support it. If we see some site having buggy Common.js, that need fix. In near future, we do have a plan to support translation tools by communities written in Common.js to extend CX translation tools.

Just tangentially, MobileFrontend is a pretty bad precedent for anything. It does all manner of crazy things that it shouldn't be doing.

Arrbee claimed this task.

@Arrbee why? Adding links to the top personal bar is indeed a use case for the Common.js, and it could even extend CX as Santhosh wrote.
The only desktop special pages forbidding Common.js do so for security reasons AFAIK.

@Ricordisamoa, By declined, @Arrbee meant "Common.js will continue to executee in Special:CX as it is doing now." :)
The bug was whether we need to disable it? Of course we wont disable it.

@Ricordisamoa, By declined, @Arrbee meant "Common.js will continue to executee in Special:CX as it is doing now." :)
The bug was whether we need to disable it? Of course we wont disable it.

I'm sinking through the floor... :-<