Page MenuHomePhabricator

Ensure changes to VE template dialog are working in VE citation dialog
Closed, ResolvedPublic1 Estimated Story Points

Description

We noticed that the MWTemplateDialog class is reused by the VE citation dialog and our changes to it should be reviewed and possibly adjusted for that context, as well as any other dependent context.

  • Make citation dialog work with the sidebar always open (aim to use most trivial fix). Note: Some of this code is implemented as a VE plugin in the Cite extension.
  • Investigate other dependencies (Signature Tool, anything else?) and what is reused there.

Discussed in story time.

Outcome

It was possible to carry over all new sidebar behaviors, while leaving the old workflow unchanged.

There are no other subclasses of either MWTemplateDialog or MWTransclusionDialog.

Event Timeline

Dev notes: Setting up the service is annoying, I set up Citoid and its service, and the VE citation tool. Currently crashes after I click any of the citation types, seems we already have some incompatibilities:

Uncaught TypeError: dialog.bookletLayout.outlinePanel is undefined
    getSetupProcess http://.../extensions/VisualEditor/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js?04fb3:570
awight moved this task from Doing to Sprint Backlog on the WMDE-TechWish-Sprint-2021-09-15 board.
awight subscribed.

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

[mediawiki/extensions/VisualEditor@master] Fix Cite dialog failing with new sidebar

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

Change 721820 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix Cite dialog failing with new sidebar

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

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

[mediawiki/extensions/Cite@master] [WIP] Make citation dialog behave more like VE

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

With the above fix merged, we haven't damaged the old workflow:

image.png (445×506 px, 40 KB)

There's an opportunity to split the feature flag here, but I'll go ahead and put behind the VE configs (mainly $wgVisualEditorTransclusionDialogNewSidebar) for now. It's easy to add a new config later, if we're asked to selectively disable the Cite changes on some sites, and simplifies deployment and rollback.

Here's what the interface looks like with new sidebar changes applied,

image.png (910×913 px, 124 KB)

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

[mediawiki/extensions/VisualEditor@master] Make function overridable by subclasses

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

Change 722271 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Make citation dialog behave more like VE

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

Change 722274 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Make function overridable by subclasses

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

awight changed the point value for this task from 3 to 1.Sep 29 2021, 8:26 AM
WMDE-Fisch claimed this task.
WMDE-Fisch moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-09-15 board.