Bug 456772

Summary: GlobalDrawer glitches when changing isMenu while being open
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Matej Starc <matej.starc>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 5.96.0   
Target Milestone: Not decided   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: bug showcase

Description Matej Starc 2022-07-15 18:35:44 UTC
Created attachment 150651 [details]
bug showcase

SUMMARY
I was testing something and I set isMenu to applicationWindow().wideScreen and noticed that if I opened the global drawer while isMenu is set to true, and then change isMenu to false, the previous popup doesn't automatically close.


STEPS TO REPRODUCE
1. Create a globalDrawer and bind isMenu property to applicationWindow().wideScreen
2. Resize the window, so it is in widescreen mode and click on the global drawer button
3. Resize the window, so it goes into mobile mode and click on the global drawer button

OBSERVED RESULT
- the popup does not close when isMenu is changed to false
-  global drawer in mobile mode removes the drawer close button (top right) when isMenu is changed to true (appears again when it changes back to false)

EXPECTED RESULT
- global drawer menu button shouldn't just disappear
- global drawer in menu mode should close when isMenu is changed (or when it is opened in mobile mode)

ADDITIONAL INFORMATION
Comment 1 Matej Starc 2022-12-03 13:04:15 UTC
I need to correct myself here. I did not mean mobile mode, but widescreen mode (they are 2 different things).
Comment 2 Matej Starc 2022-12-15 09:39:05 UTC
Fixing this bug is currently impossible because we are not able to close the menu of a Kirigami.Action (I tried setting the visibility to false and setting the children to an empty array, but none of those work). We need a method of hiding the menu within the API.
Comment 3 Matej Starc 2023-02-27 08:01:34 UTC
Git commit da8046bce8291d4ed1c43ef31a23ebf462363f93 by Matej Starc.
Committed on 08/02/2023 at 22:17.
Pushed by sporknife into branch 'master'.

GlobalDrawer: close drawer when isMenu is changed

Signed-off-by: Matej Starc <matej.starc@protonmail.com>

M  +2    -0    src/controls/GlobalDrawer.qml
M  +9    -0    src/controls/private/globaltoolbar/PageRowGlobalToolBarUI.qml

https://invent.kde.org/frameworks/kirigami/commit/da8046bce8291d4ed1c43ef31a23ebf462363f93