Page MenuHomePhabricator

Expand "unsaved changes" logic for template dialog: confirm before close when all parameter values are deleted
Closed, ResolvedPublic3 Estimated Story Points

Description

Edge case of T297792.

Steps to reproduce:

  • Open a page with visual editor.
  • Edit an existing template invocation.
  • Delete all parameter values.
  • Click close box or type <esc>.

What should happen: Confirmation dialog for unsaved changes.

What happens instead: Immediately closes dialog.

We probably want the unsaved changes detection to catch this case, only when editing an existing template. For a new template, it's correct to go back immediately without prompting.

Event Timeline

Change 755958 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Confirm before close when all parameter values are deleted

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

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

[mediawiki/extensions/VisualEditor@master] Refactor confirmation logic

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

Change 756539 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Refactor confirmation logic

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

Change 755958 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Confirm before close when all parameter values are deleted

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

thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2022-01-19 board.