Bug 473214 - KF6: GlobalDrawers that refer to a Loader.item have 0 width when opened
Summary: KF6: GlobalDrawers that refer to a Loader.item have 0 width when opened
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Compiled Sources Linux
: NOR major
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-08-09 14:44 UTC by Jack Hill
Modified: 2023-10-18 10:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
GlobalDrawer Loader patch for Kirigami gallery (797 bytes, patch)
2023-08-09 14:44 UTC, Jack Hill
Details
Elisa empty global drawer (218.75 KB, image/png)
2023-08-10 10:38 UTC, Jack Hill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2023-08-09 14:44:58 UTC
Created attachment 160867 [details]
GlobalDrawer Loader patch for Kirigami gallery

SUMMARY
Both Elisa and Koko use Loaders to store the global drawer sidebar to only activate it under certain conditions (e.g. mobile-only)

STEPS TO REPRODUCE
1. Apply the provided patch to kirigami-gallery and compile
2. Click the hamburger menu in the top left

OBSERVED RESULT
The drawer handle changes as if the drawer is opened, but its location does not. The sidebar itself is not visible.

EXPECTED RESULT
Sidebar opens as usual

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230806
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.8-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-08-09 18:51:31 UTC
Is the problem visible in Elisa? it seems to be working fine for me in its KF6 version.
Comment 2 Jack Hill 2023-08-10 10:38:29 UTC
Created attachment 160887 [details]
Elisa empty global drawer

This is what I see in Elisa. Note that Elisa forces a specific width, which is why the drawer handle is not at the side of the screen.
Comment 3 Nate Graham 2023-08-11 17:07:25 UTC
Is that the mobile UI? I'm not seeing the issue there. Of course the mobile UI is a bit broken in Qt 6 right now, unfortunately.
Comment 4 Jack Hill 2023-08-11 17:10:33 UTC
Yes it's with QQC2_CONTROLS_MOBILE=1 set. Also I replaced "iconName" -> "icon.name" to allow it to run on Qt6, and removed the line "visible = false;" to see the drawer handle (otherwise the drawer would be completely transparent and didn't appear to open)
Comment 5 Nate Graham 2023-08-11 17:12:37 UTC
Can we get those changed submitted to Elisa first?
Comment 6 Jack Hill 2023-08-11 17:16:18 UTC
(In reply to Nate Graham from comment #5)
> Can we get those changed submitted to Elisa first?

I was planning on doing so but there's no way for me to test if the sidebar doesn't show me anything.
Comment 7 Nate Graham 2023-08-11 17:21:21 UTC
I meant the other changes unrelated to the sidebar.

FWIW with Elisa'a current git mater, I can see the sidebar in the mobile UI, but it's the handle to close it that's missing.
Comment 8 Nate Graham 2023-08-14 19:09:08 UTC
Can confirm the issue with https://invent.kde.org/multimedia/elisa/-/merge_requests/477 applied to Elisa.
Comment 9 Bug Janitor Service 2023-10-11 12:35:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1326
Comment 10 ratijas 2023-10-11 16:10:02 UTC
Big respect for the patch to Kirigami Gallery that helps reproducing the problem.
Comment 11 ratijas 2023-10-11 16:17:21 UTC
Git commit 1a969a18d91a006420594cf86d8c65bb51a1ec3f by ivan tkachenko, on behalf of Jack Hill.
Committed on 11/10/2023 at 18:07.
Pushed by ratijas into branch 'appwindow-global-drawer-bindings'.

AbstractApplicationWindow: Clean up bindings, fix reparenting of drawers

Querying QQC2.Overlay.overlay attached property on a Binding object was
clearly wrong. It just resulted in null at all times, so basically
those Bindings never took effect.

Since `when:` condition does not make much sense (first, those
properties could never be undefined; second, why reparenting only when
visible?), let's demote them into a property change handlers with null
guards.

For other bindings, pointless `when` check was removed as well as
deprecated (and yet again pointless) restoreMode.
Co-Authored-By: Jack Hill <jackhill3103@gmail.com>

M  +20   -22   src/controls/AbstractApplicationWindow.qml

https://invent.kde.org/frameworks/kirigami/-/commit/1a969a18d91a006420594cf86d8c65bb51a1ec3f
Comment 12 ratijas 2023-10-18 10:17:31 UTC
Git commit 74e6a852d2f55ad9c53f34972fe3ba0c1ad78c42 by ivan tkachenko.
Committed on 18/10/2023 at 12:13.
Pushed by ratijas into branch 'master'.

AbstractApplication*: Fix reparenting of drawers, Clean up bindings

Querying T.Overlay.overlay attached property on a Binding object was
clearly wrong. It just resulted in null at all times, so basically
those Bindings never took effect.

Since `when:` condition does not make much sense (first, those
properties could never be undefined; second, why reparenting only when
visible?), let's demote them into a property change handlers with null
guards.

For other bindings, pointless `when` check was removed as well as
deprecated (and yet again pointless) restoreMode.
Co-Authored-By: Jack Hill <jackhill3103@gmail.com>

M  +61   -1    autotests/tst_globaldrawer.qml
M  +21   -37   src/controls/AbstractApplicationItem.qml
M  +24   -26   src/controls/AbstractApplicationWindow.qml

https://invent.kde.org/frameworks/kirigami/-/commit/74e6a852d2f55ad9c53f34972fe3ba0c1ad78c42