Page MenuHomePhabricator

Show a dialog when user clicks "cancel" while editing a function
Closed, DeclinedPublic

Description

As a user I would like to be notified while trying to cancel all changes I made while editing the function.

This ticket requires:

  • Show a Dialog with the provided text
  • if the use clicks "continue editing" close the dialo
  • If the user clicks discard, navigate to the view page.
NOTE: if we just navigate using the router, the changes may not actually be discarded. Test it properly by editing, going to view and going back to edit and see if the changes made persist. It may be beneficial to do a full redirect or implement a "reset/diuscard) action.

image.png (765×1 px, 61 KB)

// replaced by the publish dialog component

Event Timeline

SimoneThisDot renamed this task from Show a tooltip when user clicks "cancel" while editing a function to Show a dialog when user clicks "cancel" while editing a function.Feb 9 2022, 10:29 AM
SimoneThisDot created this task.

Change 762516 had a related patch set uploaded (by Jkieserman; author: Jkieserman):

[mediawiki/extensions/WikiLambda@master] Add dialog component and use a dialog when abandoning function edits

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

Change 762516 had a related patch set uploaded (by Jkieserman; author: Jkieserman):

[mediawiki/extensions/WikiLambda@master] Add dialog component and use a dialog when abandoning function edits

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

Is this something we definitely want to do? Normally we're very careful for accessibility reasons to not over-ride the browser's built-in feature for this.

Change 762516 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add dialog component and use a dialog when abandoning function edits

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

I tried two things

First thing

  1. Clicked create new function
  2. Added input and output type
  3. Clicked on Main page in the left sidebar but the popover didn't appear

Second thing

  1. Selected existing object
  2. Tried editing object by changing it's input type from String to Boolean
  3. Clicked on Main page in the left sidebar but the popover didn't appear

This task will be affected by the Publish Component work (Design: T270304, Development: T321381)

gengh changed the task status from In Progress to Stalled.Oct 24 2022, 9:49 AM
JKieserman updated the task description. (Show Details)