Show the Delete context menu entry even when disabled
ClosedPublic

Authored by thsurrel on Nov 19 2018, 1:14 PM.

Details

Summary

This is consistent with the HIG, and the 'Rename' entry in
the context menu already behaves like that.

Test Plan

Right click on /home. The context menu should contained
the 'Delete' entry, but it should be disabled.

Diff Detail

Repository
R318 Dolphin
Branch
arc_hide_rename (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5137
Build 5155: arc lint + arc unit
thsurrel created this revision.Nov 19 2018, 1:14 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptNov 19 2018, 1:14 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
thsurrel requested review of this revision.Nov 19 2018, 1:14 PM

From a Ux point of view Ui elements should be disabled instead of hidden if they are not available but the user expects them to be there. The "Rename" entry currently gets disabled. You think it makes more sense to hide it instead?

'Delete' and 'Rename' entries are in the same section, but one gets disabled when the other one is hidden. I think they should behave the same way.
But should we disable (but show) 'Delete' or hide 'Rename', I can fix the patch to go one way or the other.

I agree it is usually better to only disable an entry that is not available. One argument in favor of hiding is that lot of things are already disabled usually in that situation (Cutting, Create new), it makes the context menu a bit cluttered.

ngraham requested changes to this revision.Nov 19 2018, 2:38 PM
ngraham added a subscriber: ngraham.

Yeah, we prefer to disable inapplicable menu items rather than hiding them. See https://hig.kde.org/components/navigation/menubar.html#appearance

My vote is to re-work this patch to do that instead.

This revision now requires changes to proceed.Nov 19 2018, 2:38 PM

My vote is to re-work this patch to do that instead.

Dolphin does this already. Might be an idea to only disable the Delete or Move to trash entry though. Not sure.

thsurrel updated this revision to Diff 45813.Nov 19 2018, 2:55 PM

Show Delete entry instead of hiding Rename

thsurrel retitled this revision from Hide the Rename context menu entry when impossible to Show the Delete context menu entry even when disabled.Nov 19 2018, 2:57 PM
thsurrel edited the summary of this revision. (Show Details)
thsurrel edited the test plan for this revision. (Show Details)
ngraham accepted this revision.Nov 19 2018, 3:08 PM

Perfect, much better now!

This revision is now accepted and ready to land.Nov 19 2018, 3:08 PM
This revision was automatically updated to reflect the committed changes.