Page MenuHomePhabricator

In Wikifunctions, the "Cancel" button in "Publish your changes" launched from the About dialog loses all the changes
Open, HighPublicBUG REPORT

Description

In Wikifunctions, if you change something, such as the description, click "Continue to publish", and then click the "Cancel" button in "Publish your changes", it loses all the changes. It doesn't even warn the user that the changes are going to be lost.

It would be much nicer to let the editor simply go back to editing, similarly to how it is in Visual Editor. If you can reuse Visual Editor's "Save your changes" dialog box as much as possible, it will be ideal. If that's difficult, then at least warning the user about losing the changes would be great.

Event Timeline

Can you give a link to where you see this happening, and step-by-step instructions? I can't replicate.

  • Go here: https://www.wikifunctions.org/view/en/Z10123
  • Click the pencil next to "About"
  • Change the "labels" field to "Much better Sandbox-Implementation 2 that took me 2 minutes to come up with"
  • Click "Continue to publish"
  • Click "Cancel"
  • You're immediately back to square one, and have lost the cleverly crafted label you came up with.

I've replicated the behavior according to the steps provided and I'm interested in working on this task. Should we consider implementing a warning, such as a popup, before proceeding with the cancellation?

IMO that does not solve the problem. What if you genuinely don't want to publish yet (so you want to cancel the publish), but you still want to work on your edited label and description a bit more before you publish? I think it should revert to exactly what you had before you pressed the "Continue to publish" button.

Jdforrester-WMF renamed this task from In Wikifunctions, the "Cancel" button in "Publish your changes" loses all the changes to In Wikifunctions, the "Cancel" button in "Publish your changes" launched from the About dialog loses all the changes.Mar 18 2024, 4:17 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF moved this task from To triage to Backlog on the Abstract Wikipedia team board.
  • Click the pencil next to "About"

Aha, this was the undocumented part of the bug report. Yes, this needs fixing, indeed.

@99of9, do you mean to go back to the dialog box where the description will be seen?

Yes, I think that is what the user means when they cancel publishing.

Got it! I would like to work on this issue.

Hi and thank you for your interest! Please check thoroughly https://www.mediawiki.org/wiki/New_Developers (and all of its communication section!). The page covers how to get started, assigning tasks, task status, how to find a codebase, how to create patches, where to ask general development questions and where to get help with setup problems, and how to ask good questions. Thanks a lot! :)

This is not a bug but a Design/Product decision to provide a editing label feature on view pages.

In the "Edit" page:
https://www.wikifunctions.org/wiki/Z10123?action=edit

There is a page-wide "Publish" action, and it is possible to make multiple edits, accumulate them, and press "Publish" when ready to submit.

However, this tasks is about the "Read" page, where there is no page-wide "Publish" action.
https://www.wikifunctions.org/view/en/Z10123

We decided to create an editing experience only local to metadata edits (Name, Description, Alias...), and that's limited to the About dialog flow. I can see the use of having a dialog communicating the user that they will be discarding the changes made in the dialog if they "Cancel".

There are plans to improve the About dialog so that the contributors can accumulate different label changes within the About dialog flow, but when going back to the View page (by clicking Cancel) those changes would be discarded.

Maybe @AAlhazwani-WMF can add more context here.

@gengh , do you suggest having a dialog in case the user clicks on cancel which will alert the user about the step he is gonna perform?

there might be a couple of options to address this. when someone clicks on "cancel" button in the publish dialog, what is their expectation? are they cancelling the publishing step (to go back to their edits/changes), or are they cancelling "everything" (similarly to refresh/close the tab of the browser)?

some early ideas, after clicking on "cancel" in the publish dialog, we could:

  1. go back to the about dialog, edits are not lost, and if people want to really cancel "everything" they can click on the "cancel" button in the about dialog (2 clicks to cancel everything)
  2. display a cancelling confirmation dialog, eg. are you sure? you're about to lose your edits/changes (still 2 clicks to cancel everything), but there's no way to go back to your edits.

if someone is clicking on "cancel" in the publish dialog, my assumption is because they want to re-iterate on their edits, not because they want to cancel "everything". hence i'd suggest to go back to about dialog when contributors click on the "cancel" button in the publish dialog. would that be possible @gengh?

there might be a couple of options to address this. when someone clicks on "cancel" button in the publish dialog, what is their expectation? are they cancelling the publishing step (to go back to their edits/changes), or are they cancelling "everything" (similarly to refresh/close the tab of the browser)?

some early ideas, after clicking on "cancel" in the publish dialog, we could:

  1. go back to the about dialog, edits are not lost, and if people want to really cancel "everything" they can click on the "cancel" button in the about dialog (2 clicks to cancel everything)
  2. display a cancelling confirmation dialog, eg. are you sure? you're about to lose your edits/changes (still 2 clicks to cancel everything), but there's no way to go back to your edits.

if someone is clicking on "cancel" in the publish dialog, my assumption is because they want to re-iterate on their edits, not because they want to cancel "everything". hence i'd suggest to go back to about dialog when contributors click on the "cancel" button in the publish dialog. would that be possible @gengh?

Proposal #1 makes more sense, but as I wrote in the original description, the best thing is to replicate the behavior from editing other wikis. Originally, I wrote Visual Editor, and it may still be OK. In the Visual Editor, the save dialog can be used for writing an edit summary and viewing a diff. It has a close button; when it's closed, the user just goes back to editing. If the user wants to discard the edit, it's possible to use the browser's "Back" button, and the visual editor asks: "Are you sure you want to leave editing mode without publishing first?"

Now that I think of it, however, Wikidata may be an even better model, because it is conceptually closer to Wikifunctions—the page is a form and not a long-form text. Edits in Q and P pages don't have a save dialog at all, and they add automatic edit summaries. It has a "cancel" button next to the "publish" button. It doesn't ask for confirmation when canceling; it never bothered me, perhaps the "publish" and "cancel" buttons are close to the thing being edited, and the edits are usually clearly seen. In Wikifunctions currently, the save dialog is separate, and the edits are hidden.

I think option 1 is totally feasible, yeah!

So, would the flow would be something like this?

  • View page
  • About widget --> edit (pencil) button
  • Make some changes --> click "Continue to publish"
  • Publish dialog --> click "Cancel"
  • Back to About widget with previous changes --> click "Cancel"
  • Confirmation dialog "Your changes will be discarded" --> reiterate cancellation, click "Discard changes and go back to page" (whatever is called)
  • Back to View page in the initial version