• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3532: "You have unsaved changes" warning box has a Bad user interface

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension KupuContrib Normal No Action Required A better idea n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Another user-unfriendly thing. When you are editing a page and you try to leave without saving, TWiki can pop up with a message box. The first two lines are "You have unsaved changes." and "Are you sure you want to navigate away from this page?". If you click "cancel" it will go ahead an loose those changes. This is the opposite of most (user friendly) software. And cosistency is important to a good UI. If the warning is "Are you sure you want to navigate away from this page?", I want to "Cancel" loosing those changes. I think the last line of the warning box should be something like "Do you want to loose these changes?", in which case, "OK" and "Cancel" do not need to be explained.

-- TWiki:Main/EricWoods - 30 Jan 2007

Which skin is this?

-- TWiki:Main.ArthurClemens - 30 Jan 2007

This is the Wysiwyg feature that has this

-- TWiki:Main.KennethLavrsen - 30 Jan 2007

This has been the subject of much to-ing and fro-ing. I originally coded the behaviour as Eric expects, but was asked to change the sense by the sponsoring client to the current behaviour. I do not intend to do anything on this, but I'm happy for anyone else to try their hand at a fix.

leaving as confirmed, and correcting atrtribution (it's the KupuContrib that is at fault)

CC

The alert box on twiki's WYSIWYG editor for the abandon changes button is quite peculiar...

"Are you sure you want to navigate away from this page? Cancel will DISCARD your changes (forever!). OK will SAVE your changes. [cancel] [OK]"

1. user is clicking "abandon changes", he presumes that the message will say something like "are you sure?" and that OK will abandon changes, and cancel will stop it and do nothing.

2. the first phrase confirms that fist assumption for the user. (giving the buttons the meanings "OK, i'm sure i want to navigate away from this page" and "cancel my request of navigating away from this page")

3. then, the two instructions contradicts everything. (at least they are very clear)

4. and the OK saving the data makes it worse since it's taking an action that the user didn't even think about. (to confirm leaving the page and to cancel that is one think. now to confirm leaving the page or to saving everything, is very different)

-- TWiki:Main.GabrielB - 06 Feb 2007

I followed what i believe a click in the "cancel" button should do, and ended up at: cancelEdit() ---> window.document.location = conf.cancel; ---> window.unload ---> navigatingAway() ---> TWikiVetoIfChanged(kupu, true);

what i belive would solve that:

// untested code
    var navigatingAway = function () {
         var ok = false;
         if( kupu.content_changed ) {
            var msg = 'You have unsaved changes.\n'+
               'Are you sure you want to navigate away from this page?\nOK will DISCARD your changes (forever!).';
            ok = confirm(msg);
         }
         return ok;
// i don't recall if returning true or false on the unload handle allows the page to change or the oposite... just tweak here.
    }

-- TWiki:Main.GabrielB - 06 Feb 2007

the problem i belive, is that the on[Before]Unload event hanlder should return true or false, to allow or cancel the unload. It's a browser feature. But the function the event points to, just call another function, and have no return value. instead, that other function issue a form.submit() to save or not the data.

The Unload event should just receive a true or false to move on (loose changes) or cancel the unload (stay on the page, editing).

-- TWiki:Main.GabrielB - 06 Feb 2007

Changed to waiting for feedback, because I'm not going to change the behaviour unless someone comes up with a better way to do it.

CC

This is probably never going t get fixed now we have TinyMCE, so discarding.

CC

ItemTemplate
Summary "You have unsaved changes" warning box has a Bad user interface
ReportedBy TWiki:Main.EricWoods
Codebase 4.1.0
SVN Range TWiki-4.1.0, Mon, 22 Jan 2007, build 12595
AppliesTo Extension
Component KupuContrib
Priority Normal
CurrentState No Action Required
WaitingFor A better idea
Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2007-11-10 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback