Bug 462980 - In Panel Edit Mode, "Maximize" button is inappropriately enabled while Panel is already maximized
Summary: In Panel Edit Mode, "Maximize" button is inappropriately enabled while Panel ...
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.26.4
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
Keywords: usability
Depends on:
Reported: 2022-12-12 23:42 UTC by Andrew Brouwers
Modified: 2023-11-06 20:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Brouwers 2022-12-12 23:42:10 UTC
Today, I tested the floating panel.  Not liking it, I went to undo this; trying again to edit, I was presented with "Maximize," "Floating Panel" (which was highlighted/active), and the option to remove.  Intuitively, I tried "Maximize" to return to a full-width panel.  It LOOKS like I'm clicking a button, but takes no action.  Instead, I had to click "Floating Panel" again, which made the maximize text/button active.

Instead, I'd propose the "maximize" button actually do something, or remove the response when I click the text.

1. Right click -> More Options -> Floating Panel
2. Right click -> More Options -> "Maximize"
Comment 1 Nate Graham 2023-01-03 21:40:25 UTC
That's because the panel was already maximized when you clicked it.

What we can do here is disable the button when clicking it would have no effect.
Comment 2 Andrew Brouwers 2023-01-04 13:52:33 UTC
Ah, then I misunderstood.  Because of the alignment and presentation of the buttons, I assumed "Maximize" meant "full width, no gaps" (ie, the normal/default layout, fully expanded).  It's really confusing if "maximize" is actually an option of "floating," but the "Maximize" button exists above the "floating" button, with the same alignment, etc.
Comment 3 Nate Graham 2023-01-04 13:54:50 UTC
Maximize isn't an option specific to the floating panel mode; it can be used for all panels. It's just what when a panel is floating, it has gaps around it (or else it wouldn't be floating, right?) so a maximized floating panel will still have those visible gaps.
Comment 4 Andrew Brouwers 2023-01-04 14:24:53 UTC
Yeah, I understand that - I'm just saying "Maximize" and "Floating Panel" (and, Remove) are presented with the same alignment, font size, etc, making them look like they all perform separate tasks.  It's pretty confusing that one would select the second button on the list, and then understand that the button above it actually can be a sub-option of the second button.
Comment 5 Nate Graham 2023-01-04 14:27:08 UTC
But one is not a sub-option of the other; the two buttons trigger features that are independent of one another.
Comment 6 Andrew Brouwers 2023-01-04 14:30:12 UTC
OK, I guess I won't argue about the UX; I think it's not discoverable and poorly laid out.  But, perhaps just disabling "maximize" when the panel is already in a "maximized" state (be it floating or not) would "nudge" the user in the right direction, and allow them to figure it out.
Comment 7 Nate Graham 2023-01-11 22:39:14 UTC
This seems like it should work:

diff --git a/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml b/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml
index 8469bb803..87ed41eaf 100644
--- a/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml
+++ b/desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml
@@ -175,6 +175,7 @@ PlasmaCore.Dialog {
             Layout.fillWidth: true
             text: i18nd("plasma_shell_org.kde.plasma.desktop", "Maximize Panel")
             icon.name: panel.formFactor === PlasmaCore.Types.Vertical ? "zoom-fit-height" : "zoom-fit-width"
+            enabled: panel.length < panel.maximumLength
             onClicked: panel.maximize();
         PC3.CheckBox {

But it doesn't; the button is either always enabled or always disabled for me. It seems like panel.maximumLength always returns the actual screen edge length, but panel.length's actual length often doesn't match that when it's non-maximized, and does when it's not.

Niccolò, any ideas?
Comment 8 Niccolò Venerandi 2023-11-06 20:15:40 UTC
Git commit 8bad74fe9ed43af3081b8dd97cc17524b82c2d77 by Niccolò Venerandi.
Committed on 06/11/2023 at 21:15.
Pushed by niccolove into branch 'master'.

Redesign panel settings with a dialog

This moves all panel options in a single dialog that floats near the panel.
Related: bug 450892, bug 459103, bug 458008, bug 440274, bug 453693, bug 460844, bug 455478, bug 454720, bug 455476, bug 460845, bug 468009, bug 474354, bug 364456

M  +495  -133  desktoppackage/contents/configuration/PanelConfiguration.qml
D  +0    -305  desktoppackage/contents/configuration/panelconfiguration/MoreSettingsMenu.qml
M  +76   -84   desktoppackage/contents/configuration/panelconfiguration/PanelRepresentation.qml
M  +53   -266  desktoppackage/contents/configuration/panelconfiguration/Ruler.qml
M  +10   -37   desktoppackage/contents/configuration/panelconfiguration/SliderHandle.qml
D  +0    -594  desktoppackage/contents/configuration/panelconfiguration/ToolBar.qml