Page MenuHomePhabricator

VisualEditor: On "applying changes" in a reference dialog, if the contents are blank, just delete the reference
Closed, ResolvedPublic

Description

Removing the content from out of a <ref> .. </ref> should prompt the user that they need to delete the reference. Perhaps a tooltip, or this might be an opportunity to use a hover trick to give the user something to click to acknowledge they intended to delete the ref.

It shouldnt be possible to save with an empty ref, as that is an error condition.

https://en.wikipedia.org/w/index.php?title=User:John_Vandenberg/test&diff=566133128&oldid=566132993


Version: unspecified
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50609

Details

Reference
bz52182

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:57 AM
bzimport set Reference to bz52182.

According to ve.ui.MWReferenceDialog.prototype.onDocumentTransact, this apply button is supposed to be disabled when the length is less than 4. But when I empty the box, the length is 10 so nothing is done.

Anyway, I think we should either:

  • Fix that bug (if it is one) and mark this bug as invalid (or repurposed for fixing it), or
  • Replace that with this idea

length < 4 is a hack and we probably shouldn't be using it…

See Gerrit change 81438 and Gerrit change 88618

  • Bug 62399 has been marked as a duplicate of this bug. ***

So Gerrit change 136496 fixed the existing intended behaviour, but didn't go as far as this bug suggests (it just disables the apply button rather than deleting the reference) - should it be changed to delete the reference still?

Ping. Anyone want to answer my question?

Yes, sorry, this was great. Thanks!