Page MenuHomePhabricator

[Regression pre-wmf.8] Typing in any fields for Cite>Web/Book etc. disables the "Insert" field
Closed, ResolvedPublic

Description

Steps to replicate:

  1. Open VE
  2. Go to Cite>Manual>Web/Book/Journal/News etc.
  3. Type something in any of the fields

The "Insert" button which was initially active gets disabled.

Event Timeline

Ryasmeen triaged this task as Unbreak Now! priority.Nov 29 2018, 12:12 AM

Thank you for noticing this. This is probably a regression from T209661: The transclusion/template dialog's Apply changes action is always enabled. Cite dialog internally uses the template dialog, and I should have tested it instead of assuming it works.

ve.ui.MWCitationDialog has a bunch of weird code calling this.actions.setAbilities() (added in rEVEDda5398909e3b: Don't allow inserting blank citations), which seems to conflict with ve.ui.MWTemplateDialog's setApplicableStatus() calling the same method.

At a glance, I suspect we can remove all of that, and instead override setApplicableStatus() to not allow inserting blank citations.

Actually, nevermind. It was broken by rECITfdde5b71af7c: Update eslint-config-wikimedia to 0.9.0. But we should file a tech debt that for the other thing.

Change 476443 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/Cite@master] ve.ui.MWCitationDialog: Fix condition for enabling insert/apply action

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

Change 476443 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] ve.ui.MWCitationDialog: Fix condition for enabling insert/apply action

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

ve.ui.MWCitationDialog has a bunch of weird code calling this.actions.setAbilities() (added in rEVEDda5398909e3b: Don't allow inserting blank citations), which seems to conflict with ve.ui.MWTemplateDialog's setApplicableStatus() calling the same method.

At a glance, I suspect we can remove all of that, and instead override setApplicableStatus() to not allow inserting blank citations.

Actually, nevermind. It was broken by rECITfdde5b71af7c: Update eslint-config-wikimedia to 0.9.0. But we should file a tech debt that for the other thing.

Filed T210796: The citation (with template) dialog's Apply changes action is always enabled.

marcella claimed this task.