Bug 413434

Summary: QtQuick dialog: Close button is not really needed, and the row it sits in could be removed
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: Nate Graham <nate>
Component: generalAssignee: Jeremy Whiting <jpwhiting>
Status: RESOLVED FIXED    
Severity: normal CC: admin, bizyaev, bugseforuns, kde, kdelibs-bugs, popov895
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=416354
https://bugs.kde.org/show_bug.cgi?id=415606
https://bugs.kde.org/show_bug.cgi?id=434517
https://bugs.kde.org/show_bug.cgi?id=434519
Latest Commit: Version Fixed In: 5.97

Description Nate Graham 2019-10-25 12:58:44 UTC
The window's titlebar will have a close button. So there's not really a need for there to be a close button at the bottom of the window with a whole row of its own.
Comment 1 Dan Leinir Turthra Jensen 2019-11-06 10:54:06 UTC
I'm mostly worried about consistency here - do we not usually show close buttons on our dialogues? (which is what this is - the button specifically only exists in the KNSQuick Dialog, not in the Page)
Comment 2 Nate Graham 2019-11-06 16:26:33 UTC
Yeah that's true. However this window somehow doesn't feel very dialog-ish to me. It offers rich interactivity far in excess of the kind of simple questions asked by most dialogs.

However in the interests of consistency, I can accept the button, but in that case the visuals need to be improved. so there isn't a weird row on the bottom of the window with only one button in it and a different background color and no separator between it and what's above it.
Comment 3 David Edmundson 2020-01-21 15:43:04 UTC
I can't think of another dialog without a close button.
Comment 4 Nate Graham 2020-01-21 17:08:10 UTC
All dialogs have a close button in the titlebar.

Dialogs that use the ok/apply/cancel paradigm have buttons in the bottom to answer in the affirmative (Accept, OK, etc), and one to cancel the operation. This makes sense because those dialogs don't actually do anything until closed, so the dialog needs to know how you want to proceed.

However this dialog currently uses the instant apply paradigm, rather than the ok/apply/cancel paradigm. Instant apply dialogs don't need OK and Cancel buttons because there is nothing to affirm or cancel. When you're done with the dialog, you just close it. Because the titlebar already has a close button, it's redundant to add a second one in the bottom.
Comment 5 Dan Leinir Turthra Jensen 2020-01-27 10:32:37 UTC
Right, i'll just say this again: If there are /no other/ dialogues in our software which use a singular close button, then i'm perfectly fine with getting rid of this one (since of course in that case there's nothing to be inconsistent with, or even worse, this one is inconsistent). However, if there is, then this one stays until there is a decision within the community that we get rid of all of them (at which point i'd be quite happy for KNSQuick to be a trailblazer ;) ). It's one of those options; i will not make this different just for the sake of making it different.

That is to say, i do not particularly disagree with your argumentation, i just think this is the wrong place to be making the argument :)
Comment 6 Nate Graham 2020-01-27 17:18:07 UTC
Fair enough. I'll be on the lookout, but I haven't seen a KDE dialog with only a close button on the bottom row. Nearly all of them instead have one of the following:
- Yes/No (which is wrong, see https://hig.kde.org/components/assistance/message.html#appearance)
- Ok/Cancel
- Ok/Apply/Cancel

Are you aware of any KDE dialogs that have only a "close" button on the bottom row?

And FWIW we already do have this paradigm of "you can close it with an x in the corner but there's no explicit 'close' button at the bottom" in notifications and Kirigami sheets. So I don't think it's really very weird or unfamiliar.
Comment 7 Dan Leinir Turthra Jensen 2020-02-06 14:00:39 UTC
(In reply to Nate Graham from comment #6)
> Fair enough. I'll be on the lookout, but I haven't seen a KDE dialog with
> only a close button on the bottom row. Nearly all of them instead have one
> of the following:
> - Yes/No (which is wrong, see
> https://hig.kde.org/components/assistance/message.html#appearance)
> - Ok/Cancel
> - Ok/Apply/Cancel
> 
> Are you aware of any KDE dialogs that have only a "close" button on the
> bottom row?
> 
> And FWIW we already do have this paradigm of "you can close it with an x in
> the corner but there's no explicit 'close' button at the bottom" in
> notifications and Kirigami sheets. So I don't think it's really very weird
> or unfamiliar.

Sorry it took a while to get back on this one, have been busy with other things... A quick look around says that yes, we have quite a lot of them. The most prominent examples are the About dialogues, and the bits underneath that (like the License description), but also things in KSysGuard uses it, as well as plenty of our applications.

This is a non-exhaustive (and also somewhat polluted, as it's not entirely straightforward to create a good search for that that only shows those that're creating such a thing, but it's a start) list of instances of the explicit mention of the standard Close button in our codebase's c++ bits (be ware long load times): https://lxr.kde.org/search?_filestring=&_string=QDialogButtonBox%5C%3A%5C%3AClose&_casesensitive=1

As i said above, i'm not in principle against getting rid of it, and even agree that it would perhaps not be a silly idea to do so (based in part on the bits you mention), but this is not a decision that can be made in a random KNewStuff bug, this must be considered by at least the VDG's HIG people... In other words: we'll need to move this to a more reasonable product (not sure which), so a decision can be made on a HIG level, at which point i'd be more than happy to get rid of it in any software i'm involved with.
Comment 8 Nate Graham 2020-02-06 15:55:04 UTC
All right, I'll open a VDG/HIG discussion.

In the meantime, can you fix the bug that makes the background of the bottom row use the wrong color? Even if it's just a matter of putting a Rectangle the window background color under everything. With that bug fixed, there isn't so much pressure to remove the row and its button.
Comment 9 Nate Graham 2020-02-06 16:00:30 UTC
Started a Phab task here: https://phabricator.kde.org/T12655
Comment 10 Dan Leinir Turthra Jensen 2020-02-06 17:19:00 UTC
(In reply to Nate Graham from comment #8)
> All right, I'll open a VDG/HIG discussion.
> 
> In the meantime, can you fix the bug that makes the background of the bottom
> row use the wrong color? Even if it's just a matter of putting a Rectangle
> the window background color under everything. With that bug fixed, there
> isn't so much pressure to remove the row and its button.

Absolutely, i'll get a patch worked up for that tomorrow (and the Rectangle's probably going to be the most reasonable workaround for now, since as David identified, changing the Dialog to a Window would annoyingly break bci...)
Comment 11 Nate Graham 2020-02-06 18:15:05 UTC
Cool, thanks. The bug report tracking that one is Bug 415606.
Comment 12 Nate Graham 2021-03-18 16:49:01 UTC
*** Bug 434520 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2022-07-10 13:52:59 UTC
Fixed by Felipe Kinoshita in version 5.97 with https://invent.kde.org/frameworks/knewstuff/-/commit/d3a3a2ae6a3d49c65ed547ef041ad7927824d8f4!