Bug 493048 - Closing panel Widget Explorer opens Panel Configuration mode, which interacts inconsistently with opened windows
Summary: Closing panel Widget Explorer opens Panel Configuration mode, which interacts...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Edit Mode (show other bugs)
Version: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-13 07:09 UTC by cwo
Modified: 2024-09-18 13:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwo 2024-09-13 07:09:08 UTC
SUMMARY

If Widget Explorer closes, there is a weird interaction with how it was opened and how it was closed:

- If widget explorer was opened by entering edit mode, then clicking the "Add or Manage Widgets" button:
    - if the close button on widget explorer is used, it returns to regular edit mode
    - if one of the edit mode buttons opening a config dialog is used (e.g. "Global Theme"), Widget Explorer and Edit mode close, the window is focused
    - if a screenshot is taken by pressing the Print Screen key, Widget Explorer and Edit mode close and the Spectacle  window is displayed
- If widget explorer was opened by right-clicking a panel and clicking "Add or Manage Widgets": 
    - if the close button is used, then clicking the close button opens Panel Configuration mode
    - if one of the edit mode buttons opening a config dialog is used (e.g. "Global Theme"), Widget Explorer closes, Panel settings opens, then also closes (as does Edit mode) and the config dialog is opened in regular mode
    - if a screenshot is taken by pressing the  Print Screen key,  Widget Explorer closes, Spectacle opens, then Spectacle is hidden and the panel enters Panel Configuration mode

STEPS TO REPRODUCE
1. Right-click the panel, "Add or Manage Widgets"
2. Press Print Screen key

(this is the weirdest case to me, the other conditions have steps as outlined in the summary)

OBSERVED RESULT

Spectacle opens, then is hidden and Panel Configuration mode is activated

EXPECTED RESULT

Debatable, but I think the behavior if Widget Explorer mode is opened from desktop Edit mode is sensible, and if it is opened from the right-click menu it is wrong:

- closing Widget Explorer with the button should close Widget Explorer and Edit mode (as the user never explicitly entered Panel Configuration nor Edit mode; but I can see how having panel edit mode active to reposition widgets could be convenient after adding widgets so the slight inconsistency might be worth it)
- opening a configuration window should not first open Panel Configuration mode only to immediately close it, Widget Explorer and Edit mode should just close directly
- taking a screenshot should close widget explorer and edit mode, and leave the Spectacle window visible, without immediately hiding it again in favor of Panel Configuration mode.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.90 (git master from a couple of hours ago)
KDE Frameworks Version: 6.7.0 (git master from a couple of hours ago)
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Comment 1 Niccolò Venerandi 2024-09-16 15:49:45 UTC
Can confirm
Comment 2 Bug Janitor Service 2024-09-16 16:39:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2527
Comment 3 Niccolò Venerandi 2024-09-18 13:34:09 UTC
Git commit f81d5976a8246f6b7884a8aff8932408956463c0 by Niccolò Venerandi.
Committed on 18/09/2024 at 13:34.
Pushed by niccolove into branch 'master'.

Only open panel settings when closing widget sidebar if manually closed

Otherwise, other ways of closing the sidebar (e.g. pressing the screenshot
button) will also pop back to the panel settings.

"1" is a placeholder for the Panel type, since it's currently not exposed to QML. That will be changed before this MR is merged.

`FIXED-IN: 6.2.0`

M  +9    -0    desktoppackage/contents/explorer/WidgetExplorer.qml
M  +0    -7    desktoppackage/contents/views/Desktop.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/f81d5976a8246f6b7884a8aff8932408956463c0
Comment 4 Niccolò Venerandi 2024-09-18 13:34:27 UTC
Git commit f3c7dcaa0d60eb76d7269d0e9a4a57c6adabfb92 by Niccolò Venerandi.
Committed on 18/09/2024 at 13:34.
Pushed by niccolove into branch 'Plasma/6.2'.

Only open panel settings when closing widget sidebar if manually closed

Otherwise, other ways of closing the sidebar (e.g. pressing the screenshot
button) will also pop back to the panel settings.

"1" is a placeholder for the Panel type, since it's currently not exposed to QML. That will be changed before this MR is merged.

`FIXED-IN: 6.2.0`


(cherry picked from commit f81d5976a8246f6b7884a8aff8932408956463c0)

8f68a586 Only open panel settings when closing widget sidebar if manually closed

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>

M  +9    -0    desktoppackage/contents/explorer/WidgetExplorer.qml
M  +0    -7    desktoppackage/contents/views/Desktop.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/f3c7dcaa0d60eb76d7269d0e9a4a57c6adabfb92