Page MenuHomePhabricator

“Change reference type” button should still be displayed for template-based citations
Closed, ResolvedPublicBUG REPORT

Description

Regression of: T71498

List of steps to reproduce:

  • Open a page with VisualEditor
  • Click on actual template-based citation (reference which use {Cite web}, {Cite book} or other template configured for Citoid)
  • Click on Edit button to edit this citation.

What happens?:
There is no more “Change reference type” button.

What should have happened instead?:
This button, added with T208981 and T71498, should still be visible.

Note it is still accessible for Basic citation (without Citoid-configured template).

Regression origin:
Probably with WMDE-Templates-FocusArea, maybe in T291241

Event Timeline

Caused by ca2ffa4853ed525a318000f2a80194898b7f61ca.

This line hides all actions: (Cite) ve.ui.MWCitationDialog.js#L47 – it should probably only hide the 'mode' action. Probably the same should be done here for consistency: (VisualEditor) ve.ui.MWTransclusionDialog.js#L338.

The extra action is added here: (Citoid) ve.ui.Citoid.init.js#L234 – this code is in the Citoid extension, so you had no way to know about it while working on the Cite extension. That's my fault, but there isn't a good way of doing it otherwise, because of how the code is split between the two extensions. :/

@matmarex Thanks for the debugging!

Note to implementor, there's an established pattern for modifying single actions, I'll copy it here because it's a bit unusual:

	this.actions.forEach( { actions: [ 'done' ] }, function ( action ) {
		action.setLabel( ve.msg( 'visualeditor-commentannotationcontextitem-comment' ) );
	} );

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

[mediawiki/extensions/Cite@master] Only the \"show/hide options\" button should be hidden

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

Change 731034 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Only the \"show/hide options\" button should be hidden

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

thiemowmde claimed this task.
thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-10-13 board.