Page MenuHomePhabricator

Should $wgVisualEditorUseSingleEditTab apply to mobile skin?
Open, Needs TriagePublicBUG REPORT

Description

I was working with @matmarex on https://phabricator.wikimedia.org/T346944 and one unexpected side effect of improving our API in Minerva is that the two edit tab behaviour of VisualEditor is now carried over to the mobile site. This means for wikis where $wgVisualEditorUseSingleEditTab is false, two edit icons will appear on the mobile site like in the screenshot. We reverted the behaviour for now to buy you more time to think about this.

Question

Before:

Screenshot 2023-10-06 at 1.32.23 PM.png (1×1 px, 204 KB)

After:

image.png (1×968 px, 224 KB)

Event Timeline

Change 964082 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/VisualEditor@master] Disable $wgVisualEditorUseSingleEditTab on mobile site

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: matmarex.

Change 964091 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/skins/MinervaNeue@master] Selenium tests: broaden the definition of the article page edit link

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

Change 964091 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Selenium tests: broaden the definition of the article page edit link

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

Change 964082 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Disable $wgVisualEditorUseSingleEditTab on mobile site

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

The change is undone now (so technically this bug is fixed), but I'll keep it open until Editing-team can review it, to make sure that they don't want to make this behavior consistent between mobile and desktop after all.

Jdlrobson renamed this task from Regression: $wgVisualEditorUseSingleEditTab is now applying to mobile skin to Should $wgVisualEditorUseSingleEditTab apply to mobile skin?.Oct 10 2023, 4:32 PM
Jdlrobson updated the task description. (Show Details)

@Jdlrobson I've realized that as a result of the changes in T346944, we've left MobileFrontend in an inconsistent state – we were working on changes for the mobile editor to support multiple edit links, and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/961898 (support for two edit tabs) got merged, while https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/963422 (support for two section edit links) did not.

The first of these changes can probably be reverted, it shouldn't be needed unless we add multiple tabs to MobileFrontend, and it increases the code size.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/961898 cannot be reverted without breaking the create page button (As we changed the ID for these elements) - are you talking about a partial revert of this patch? If so, I'm not sure there's much benefit - seems like a little risk for little gain. The code size gain (0.1kb) is not really an issue here, since JS is non-blocking and we're talking about bytes not kilobytes and if the editing team has plans to support two buttons in future, there is something comforting about knowing MobileFrontend knows what to do when it encounters these buttons and that the editing team can make this change without needing to go into MobileFrontend.

If we want completeness, I'm happy to merge https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/963422/1/src/mobile.init/editor.js provided it doesn't add the two buttons to the section headings.

Hmm, right, I guess it can stay then.