Improve confirmation dialog when closing multiple tabs
Closed, SealedPublic

Description

Background

D7714 sparked a discussion about the wording and handling of the confirmation dialog shown when closing applications with multiple tabs still open, and its consistent use within KDE. Pain points where the use of a warning icon, ambiguous checkbox wording, inconsistent warning messages, HIG violation of button wording and a redundant middle button. It was concluded to model a better dialog after the dialog Firefox uses.

Suggested wording

(as concluded in D7714#145582, comment below if you have improvements)

  • Window title: "Confirm Close — <app name>"
  • Icon: question mark
  • Message: "You are about to close a window with <n> tabs. Are you sure you want to continue?"
  • Checkbox: "Warn me when I attempt to close a window with multiple tabs" (should be aligned horizontally below text like in Firefox)
  • Buttons: "Close Window" and "Cancel"

Remarks

  • I guess Firefox chose "Close tabs", because the dialog is also used for protecting the "Close other tabs" function. I prefer "Close Window", as in the end there is no empty shell with 0 tabs left.
  • "Close" instead of "Quit", because the action closes only one window and does not actually also quit all other windows
  • Only two buttons, because "Close tab" should normally be triggered by other means
  • "Do not ask again" does not make sense for "Cancel" (see also bug 202106

Open Questions

  • Which button should be made default? Needs balancing between primary use cases and destructiveness of the action.

Screenshots

Firefox (slightly different wording)

Okular (proposal for patch that sparked the discussion)

Konsole and Dolphin (current implementation)

Action Items

Outreach

  • review by VDG / UX experts (partially done in D7714#145298)
  • buy-in from other application developers (suspended for now, because of D7714#146282)

Decide on implementation

  • (1) custom KMessageBox::createKMessageBox (example: Dolphin) → no changes in KMessageBox and no KF5 version bump needed, but code is uglier
  • (2) standard KMessageBox::questionYesNo (example: Konsole) → needs support for custom "Do not ask again" message in KMessageBox, but code is nicer (custom message could even be added later)

Bugfixes/Features

(optional, i.e. non-blocking)

Porting

(independent, i.e. non-blocking)

  • Okular: D7714 (not yet ported to new dialog)
  • Konsole
  • Dolphin
  • Yakuake (feature broken?)
  • More?
rkflx closed this task as Wontfix.Sep 18 2017, 7:52 AM
rkflx claimed this task.
In D7714#146347, aacid wrote:

i'm not sure i totally agree with all your points there either.

I'm putting work for this on hold (maybe I'll resume later, maybe not), as a different patch for Okular is committed now (with the review not accepted yet, different wording, grammar mistake) and it seems very unlikely any further improvements will ever be accepted in Okular (after recent experiences with some of my other patches).

Albert doesn't tell us what he still disagrees with and why, which makes it very hard to find something everybody can live with. If that changes, I'll reconsider, but just committing without agreement is not my style of working.

In D7714#146596, aacid wrote:

I'm going to commit this since it seems Henrik has a plan for the bigger thing.

I expected support, but all I get is ridiculing.

Just for the record: it wasn't me who suggested to do all of this work, I merely hinted at just copying what Dolphin already has.

aacid added a subscriber: aacid.EditedSep 18 2017, 7:56 AM
In T7022#110786, @rkflx wrote:
In D7714#146347, aacid wrote:

i'm not sure i totally agree with all your points there either.

I'm putting work for this on hold (maybe I'll resume later, maybe not), as a different patch for Okular is committed now (with the review not accepted yet, different wording, grammar mistake) and it seems very unlikely any further improvements will ever be accepted in Okular (after recent experiences with some of my other patches).

Which patches?

Albert doesn't tell us what he still disagrees with and why, which makes it very hard to find something everybody can live with. If that changes, I'll reconsider, but just committing without agreement is not my style of working.

What? I commited exactly what you wanted and you say "Albert disagree"?

In D7714#146596, aacid wrote:

I'm going to commit this since it seems Henrik has a plan for the bigger thing.

I expected support, but all I get is ridiculing.

Just for the record: it wasn't me who suggested to do all of this work, I merely hinted at just copying what Dolphin already has.

Well, you have my support, i exactly commited the code because you had opened this task for "further work", i don't see how you can suggest that i am ridiculing you.

rkflx reopened this task as Open.Sep 18 2017, 8:00 PM
rkflx added a subscriber: ngraham.

Thanks, I'm grateful for any support. Nevertheless, let's compare where suggestion and commit differ:

Message: "You are about to close a window with <n> tabs. Are you sure you want to continue?"

i18n("You have about to close %1 tabs. Are you sure you want to continue?", m_tabs.count())

Checkbox: "Warn me when I attempt to close a window with multiple tabs"

i18n("Warn me when I attempt to close multiple tabs")

Buttons: "Close Window" and "Cancel"

KGuiItem(i18n("Close Tabs")

That's not "exactly" the same like you try to picture it (I acknowledge it's better than the original patch from reviewboard). I justified my suggestion above, you did not reply to that but just committed something different anyway.

I'm willing to find a good solution via discussion (maybe it turns out "Close Tabs" is better, but there were no arguments in favour so far), not by forcing my opinion on people via commits. That's where I feel getting ridiculed and lose motivation. Putting something on Phabricator means working with your reviewers, not sneaking in changes behind their back.


I'll leave this alone from my side for the next 1 – 2 weeks. In the meantime (this applies to everyone reading this), feel free to

  • get someone else to comment on "Close Tabs" vs. "Close Window" (preferably addressing my reasoning from above)
  • decide on implementation (1) or (2)
  • state whether the offer to help adding a custom "Do not ask again" message in KMessageBox itself still stands
  • clarify whether Okular is willing to accept further changes beyond what is already committed, in case those are required to make Dolphin and Konsole happy (i.e. is Okular willing to compromise for the sake of unification within KDE)
aacid added a comment.Sep 18 2017, 8:31 PM
In T7022#110866, @rkflx wrote:

Thanks, I'm grateful for any support. Nevertheless, let's compare where suggestion and commit differ:

Message: "You are about to close a window with <n> tabs. Are you sure you want to continue?"

i18n("You have about to close %1 tabs. Are you sure you want to continue?", m_tabs.count())

Ah yes, i made a typo, thanks for noticing.

Checkbox: "Warn me when I attempt to close a window with multiple tabs"

i18n("Warn me when I attempt to close multiple tabs")

Buttons: "Close Window" and "Cancel"

KGuiItem(i18n("Close Tabs")

That's not "exactly" the same like you try to picture it (I acknowledge it's better than the original patch from reviewboard). I justified my suggestion above, you did not reply to that but just committed something different anyway.

Ah sorry, yes, not exactly like you suggested, exactly like the usability expert suggested. He said "Let's use the same than Firefox, they've researched that enough so no need to research more than them" (paraphrasing) so i went with what Firefox uses.

I'm willing to find a good solution via discussion (maybe it turns out "Close Tabs" is better, but there were no arguments in favour so far),

Close Tabs is simply much better because the question is about tabs. If we were to change the question about window, then yes the button should change to window.

not by forcing my opinion on people via commits. That's where I feel getting ridiculed and lose motivation. Putting something on Phabricator means working with your reviewers, not sneaking in changes behind their back.

You don't understand, you opened a task named "improve confirmation dialog" so that was clear you accepted there would be a confirmation dialog to improve, so i commited my non perfect confirmation dialog so it can be improved.


I'll leave this alone from my side for the next 1 – 2 weeks. In the meantime (this applies to everyone reading this), feel free to

  • get someone else to comment on "Close Tabs" vs. "Close Window" (preferably addressing my reasoning from above)
  • decide on implementation (1) or (2)

Not sure what you mean by (1) or (2), do you mean tabs vs window?

  • state whether the offer to help adding a custom "Do not ask again" message in KMessageBox itself still stands

This needs thinkign as to what new API is needed since once you add API to KMessageBox it'll have to stay "forever", so one better gets it right :)

  • clarify whether Okular is willing to accept further changes beyond what is already committed,

You're more than welcome to work on any improvements you may find necessary.

in case those are required to make Dolphin and Konsole happy (i.e. is Okular willing to compromise for the sake of unification within KDE)

There's no really a need for unification in applications developed inside the KDE project, it may happen that different use cases actually need different wordings.

rkflx added a comment.Sep 19 2017, 7:44 AM

was clear you accepted

For the future: Just ask "I <made a change> for <some reason>. Could you mark this Diff as accepted, we could improve it later.". I'd gladly do that as that'd be clear communication as well as documented in Phab.

Nevertheless, you said "Sorry" and I'm fine now.

Not sure what you mean by (1) or (2)

See above for the two options in the section titled "Decide on implementation". Might also depend on timing. Could you tell me where I can look to find out which KF5 version KDE Apps 17.12 can depend on? Whatever the release schedule says?

This needs thinkign as to what new API is needed since once you add API to KMessageBox it'll have to stay "forever", so one better gets it right :)

I'll glady tap into your experience here, that's why I asked. No need to rush…

You're more than welcome to work on any improvements you may find necessary.

I'll quote you on that :)

"Close Tabs" vs. "Close Window"

In Firefox, you always have at least one tab, but in Okular you can have an empty shell with no tab and no document. That's where there is a difference between "Close all tabs" and "Close all tabs as well as the window". I'm not sure colomar had that in mind yet and as you say, not all apps are equal. Firefox also uses the dialog for "Close other tabs" and a completely different dialog for the "Quit" menu entry, so blindly following that 100% might not be the best idea.

Currently it's very confusing for the user in Okular: You choose "Quit" from the menu, the button asks "Close Tabs", what you actually see is "Tabs and only one Window get closed". Don't you think that should be unified? "Close Window" in the menu, in the dialog description, on the button and as the final action would be an ideal solution here, as it works even for the one-tab case. (Also note how Konsole is already using "Close Window" in the menu and on the button, probably for that exact reason.)

It would be nice if you could at least try to consider the possibility of implementing it like this. I'm willing to handle all additional work this entails, all I ask you is to give the idea a fair chance instead of dismissing it within seconds. Please take your time and maybe also let others comment (as I said, I'll have to leave this alone for a while anyway).

It needs patience, but I believe we'll get there.

aacid added a comment.Sep 19 2017, 7:51 PM
Could you tell me where I can look to find out which KF5 version KDE Apps 17.12 can depend on? Whatever the release schedule says?

Whatever one they want that was released before the dependency freeze.

Currently it's very confusing for the user in Okular: You choose "Quit" from the menu, the button asks "Close Tabs"

Exactly the same as in firefox. If they have decided hundred millions of users are ok with that wording, i'm ok with that wording too.

rkflx added a comment.Sep 20 2017, 6:54 AM

Exactly the same as in firefox.

Except that's not what's happening "exactly" in Firefox, as I said above already. Try Ctrl+Q or FileQuit. It will not display the dialog in question (it will quit without confirmation and you get the offer to restore the session on the next start). If you set browser.showQuitWarning = true, this is shown:

Do you notice how the menu action corresponds directly to the wording of the button, like I'm proposing?

I'm not suggesting we implement two different dialogs or a session-saving function (even if wanted by millions of Firefox users). If we simply used "Close Window" in menu and button, it would be consistent everywhere. Do you see any actual problem we create by using "Close Window"? I don't, I see a problem we solve, namely the inconsistency.

Let's use common sense, not the number of users (otherwise we would follow Chrome and have no confirmation dialog at all).

aacid added a comment.Sep 20 2017, 5:58 PM
In T7022#111114, @rkflx wrote:

Exactly the same as in firefox.

Except that's not what's happening "exactly" in Firefox, as I said above already. Try Ctrl+Q or FileQuit. It will not display the dialog in question (it will quit without confirmation and you get the offer to restore the session on the next start).

Very confusing, i did not expect Firefox to behave differently when choosing File->Quit than when doing Alt+F4 or pressing the window [x]

Do you plan on continuing work on this @rkflx? KDE Apps seem to often miss a strict policy on unified design in small details. So a push for a same looking "Do you want to close all tabs" dialogs everywhere would be a welcomed start to change that.

How I would like to see the dialog pattern:

  • Window title: "Confirm Close — <app name>" — no change
  • Icon: warning — It is a warning. Albert's checkbox text in the first Okular version and yours one even say it's one.
  • Message: "You are about to close <n> tabs. Are you sure you want to continue?" — The warning is about the tabs, not the window. That the user wants the window to be closed is known from his manual interaction, that led to the showing of this warning.
  • Checkbox: "Warn me when I attempt to close multiple tabs at once" (should be aligned horizontally below text like in Firefox) — Same reasoning as above. Also there might be situations where multiple tabs are closed without closing the window. It is very likely that in this situation we want to show the same warning.
  • Buttons: "Close tabs" and "Cancel" — Same reasoning as above. And yes the button to only close the current tab has to go away.

For implementation go with (1). Avoid a Frameworks change! But there is also the KMessageBox::messageBox method. Could this be used? How is this different from the two you proposed?

rkflx lowered the priority of this task from Normal to Low.Oct 26 2017, 9:52 PM

Thanks for commenting Roman, support and interest for unification is always appreciated even if I do not agree with every point you make.

Do you plan on continuing work on this @rkflx?

Currently working on clearing my review and patch queues, after this we'll see when I find the time. My vision for unifying tab handling (not just the tab close dialog) for KDE's pillar apps still stands, however I probably should not prototype this in Okular seeing how hard it is to get UX changes (this one, but also other issues I proposed a patch for) approved compared to other apps/libs I contributed patches to.

If you want immediate changes for 17.12, feel free to take over or pick an action item. From my side, I'm not in a hurry – it's just a dialog, after all…

Icon: warning

Well, it's both a warning and a question :) Not sure what is more important, but this may need more research so this is not an adhoc decision, but has a well-founded reasoning.

You are about to close <n> tabs. Are you sure you want to continue?
Buttons: "Close tabs" and "Cancel"

I strongly disagree. If the user closes the window, the text and the button should state the same. That's what research in cognitive psychology (for a start, ref. "eye mind hypothesis" by Just and Carpenter) and in usability (e.g. Nielsen's usability heuristics) tell us, as this decreases cognitive load and improves usability metrics (if you think of its dimensions learnability/efficiency/memorability/satisfaction/errors). In some situations (e.g. Save/Discard/Cancel dialog) this is not possible for space reasons, but here it is so we should choose the more "ideal" solution.

Also there might be situations where multiple tabs are closed without closing the window. It is very likely that in this situation we want to show the same warning.

On the contrary. It is important to show a different wording in this situation, so it is very clear whether all tabs or all tabs and the window are going to be closed (think about a shortcut triggered by accident, something like Ctrl+XX vs. Ctrl+Q – you won't know what happens until afterwards unless the wording is explicit enough).

Avoid a Frameworks change!

But why? In general, for code reuse and consistency this should be preferable, shouldn't it? It would be easier for me to decide if your recommendation included a short justification :)

KMessageBox::messageBox

Did not try, but API docs suggest this is a 3-button dialog, i.e. not what we want. I'll make a mental note to look at the internal implementation, though.

TL;DR: It's not forgotten, but incubating :)

rkflx updated the task description. (Show Details)Mar 13 2018, 5:52 PM
rkflx updated the task description. (Show Details)Mar 13 2018, 6:03 PM
rkflx closed this task as Sealed.Aug 24 2018, 6:55 AM

Abandoning after reassessing priorities.