Bug 442404 - Launching Discover from the Notifier shows both desktop and mobile buttons in on the Updates page
Summary: Launching Discover from the Notifier shows both desktop and mobile buttons in...
Status: RESOLVED UPSTREAM
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other Linux
: VHI normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords: regression
: 459114 464779 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-14 00:11 UTC by Nate Graham
Modified: 2023-01-25 17:23 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Mobile controls seen inappropriately (867.56 KB, image/png)
2021-09-14 00:11 UTC, Nate Graham
Details
In Kirigami Gallery too (946.74 KB, image/png)
2021-09-18 02:20 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-09-14 00:11:58 UTC
Created attachment 141526 [details]
Mobile controls seen inappropriately

Strange bug; just what the title says.

If I open Discover by clicking on the Notifier System Tray item while in a Wayland session, mobile controls appear on the Updates page.

They do not appear if accessing the Updates page from any other way:
- Launching the app and going to the Updates page manually in a Wayland session
- Launching the app and going to the Updates page manually in an X11 session
- Launching the app from the Notifier System Tray item in an X11 session
Comment 1 Nate Graham 2021-09-15 19:01:04 UTC
Correction: This happens on X11 too.
Comment 2 Aleix Pol 2021-09-16 17:58:34 UTC
can you check if you have QT_QUICK_CONTROLS_MOBILE set?
Comment 3 Nate Graham 2021-09-16 18:41:50 UTC
I don't. If I manually set it and launch Discover it opens in dedicated mobile mode, which is different from what I see in this bug. With this bug, I just see the mobile controls on the Updates page in addition to the desktop controls; everything else is normal.
Comment 4 Aleix Pol 2021-09-16 22:21:00 UTC
Do you use systemd startup? Maybe it's using different env vars because it comes from the notifier process? 🤔

Also I tried and cannot reproduce.

Would you be able to poke a bit the Loader.active property in the actionButtons Loader at the bottom of Page.qml? It's the one that decides if it should be shown.
Comment 5 Nate Graham 2021-09-16 22:44:56 UTC
Yes, I'm using systemd startup. I can poke.
Comment 6 Nate Graham 2021-09-18 02:20:26 UTC
Created attachment 141664 [details]
In Kirigami Gallery too

I'm actually seeing the same thing in Kirigami gallery now!
Comment 7 Nate Graham 2021-09-18 02:21:02 UTC
Does not seem to be Discover-specific; moving to Kirigami.
Comment 8 Aleix Pol 2021-09-20 22:17:57 UTC
Managed to reproduce it and fix it upstream Qt.
https://codereview.qt-project.org/c/qt/qtdeclarative/+/372022

Workarounds would be to either mark it a synchronous or add a `visible: active`. Both aren't ideal but better than the status quo.
Comment 9 Nate Graham 2021-09-20 22:19:28 UTC
Wow, great sleuthing, Aleix!
Comment 10 Nate Graham 2021-09-20 22:26:16 UTC
I think making it synchronous for now would probably make sense until the fix trickles back to us.

What do you think, Arjen?
Comment 11 Aleix Pol 2021-09-21 22:53:54 UTC
Another alternative would be to have an:
onItemChanged: if (!active) item.destroy()

This would keep it async and continue to work as the fix gets merged.
Comment 12 Arjen Hiemstra 2021-09-22 11:01:18 UTC
The more fundamental problem is that the action button loader gets activated while it should simply never be active in desktop mode. This is due to how the globalToolBarStyle property is handled: If it is not explicitly set to toolbar, we always activate the ActionButton. This leads to problems because there is a period of time where the Loader is created and its active property being evaluated while the global toolbar style is still set to the default. In my opinion, the more fundamental fix should be to either have an "unknown" style as default toolbar style, or somehow make sure the global toolbar style property is initialzed before anything that depends on it.
Comment 13 Nate Graham 2021-10-19 11:48:54 UTC
We are getting a lot of user complaints about this. Raising to VHI.
Comment 14 Aleix Pol 2021-10-19 20:45:25 UTC
I have not seen this issue since I fixed it in Qt.
We can consider reverting the asynchronous Loaders patch if you think distros aren't going to use our Qt patches. It's a bit unfortunate though.

Maybe we can somehow detect it at build time?

FWIW, there aren't duplicates here or anything, which complaints are you talking about?
Comment 15 Nate Graham 2021-10-19 20:56:54 UTC
(In reply to Aleix Pol from comment #14)
> FWIW, there aren't duplicates here or anything, which complaints are you
> talking about?
Users on social media. I guess they're using distros without the KDE patch collection Sadly I am too; Fedora hasn't shipped it yet.

Oh well, since it's fixed in Qt and a fix is available, I guess you're right and we can close this and yell at distros that aren't shipping the fix yet. :)
Comment 16 Nate Graham 2022-09-14 23:52:45 UTC
*** Bug 459114 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2023-01-25 17:23:29 UTC
*** Bug 464779 has been marked as a duplicate of this bug. ***