GSConnect / gnome-shell-extension-gsconnect

KDE Connect implementation for GNOME
GNU General Public License v2.0
3.22k stars 259 forks source link

The button Settings on the dock becomes inaccessible with too many devices or on lower display resolutions #1640

Open bekopharm opened 1 year ago

bekopharm commented 1 year ago

Describe the bug

The button Settings at the bottom of the expanded device list on the dock becomes inaccessible if too many devices are connected. The expanded list of devices has no scrollbar. The individual devices can not be collapsed to make space.

Workaround is to use the gear symbol in extension-manager to configure GSConnect again. That's a lot of extra clicks though and I use that button a lot to configure which device gets the clipboard synced and which not.

Steps to reproduce

  1. Go to dock
  2. Click on GSConnect to expand connected devices

Expected behavior

A scrollbar should appear on mouse wheel or scroll gesture or listed devices should be able to collapse so the Settings button at the bottom show up again.

GSConnect version

54

Installed from

GNOME Extensions website

GNOME Shell version

43.5

Linux distribution/release

Fedora 37

Paired device(s)

many

KDE Connect app version

any

Plugin(s)

No response

Support log

No response

Screenshots

gnome-shell-screenshot-g3zins

Notes

No response

frikisama commented 1 year ago

You don't even need that many devices, the menu is cut with only one too, if the resolution is low and the menu full enough. Here is a screenshot of my device, with its 1600p display at 2x desktop scale, Gnome 44. I guess 800p would have the same problem.

image

bekopharm commented 1 year ago

Always boggles my mind that someone would indeed run Gnome on such low resolutions but then I remember that some use this indeed on phones and similar nowadays.

Yes, that's exactly the same problem 👍

frikisama commented 1 year ago

Oh, this is not a phone, it is just a high DPI display (2560x1600 at 10"), and actually my main device. And I love how crisp and easily readable everything is! But yeah, in some cases, like this one, you see how the focus is on 1080p (or 4k @ 2x scale) and up, currently, and this is just a quick reminder that we may be few, but still here :)

frikisama commented 1 year ago

Quick update: there is a related issue on the Gnome Shell issue tracker.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6056

ferdnyc commented 1 year ago

I thought there was already an older issue open about this, but I can't find it.

As @frikisama notes, it's largely a GNOME issue — the menu should be scrollable if its contents are taller than the screen, but it's not. That aspect, I don't think we could solve in GSConnect.

What might be possible is to make the individual device submenus collapsible so that they take up less space. But unless this is addressed upstream, I think that's really the only possible fix — workaround, really — for this issue.

(And that's assuming it is possible, now that the device menus are children of the QuickSettings item, in GNOME 44. None of the built-in QuickSettings have collapsible submenus, so it's a maybe at best.)

bekopharm commented 1 year ago

Collapsing could be possible. I had my ticket overview from Redmine in there and I'm pretty sure it had collapsible entries but that has been years :thinking:

ferdnyc commented 1 year ago

@bekopharm

Mmm, and really I suppose anything is possible, if you're willing to write the code. And given how much of GSConnect's menu support is custom code already, as things stand collapsible device sections would have to be custom-coded too.

I was able to make the entire Devices list collapsible easily enough, by wrapping it in a standard PopupSubMenuMenuItem. (...Who comes up with these names!?) But while collapsing the entire Devices list does ensure you can always get to the Mobile Settings item, it doesn't do a lot of good if you have multiple devices paired that don't fit on the screen, because you can still only reach the first one.

The issue with collapsing the devices separately, though, is that each Device's list of commands (the thing we'd want to collapse beneath its status line) is a custom submenu implementation built entirely in GSConnect, with items that aren't subclassed from the standard PopupMenuItem. That was necessary to implement the panning submenu functionality for commands that had their own individual submenus. (For instance, the Files menu that replaces Mount, after it's activated, in this animation:)

gsconnect-subpanelanim

But the thing is... I'm not sure anything in GSConnect actually uses that functionality, anymore. And if it doesn't, then it may be possible to replace all of that custom code with a set of standard PopupMenuItem entries. In which case, it "should" be relatively simple to move them inside a collapsible PopupSubMenuMenuItem per device.

(The alternative would be, like I said at the start, to add custom collapsibility code on top of GSConnect's custom submenu implementation. And I'd personally prefer this class get shorter and diverge from the standard PopupMenu implementation less, not get longer and reinvent even more of it...

https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/74c25faf5d45a8837f4b9dafc6059e3ef3089a65/src/shell/gmenu.js#L76-L373

Even if the current code does still use that side-sliding submenu implementation, giving it up in exchange for collapsibility may still be a good trade. I think Mount is the only entry that's ever used it, and managing device mounts via the user menu was always a bit clunky.

tsilvs commented 7 months ago

Same on Fedora 39. If more than 3 devices are connected, the overflow list doesn't scroll. Maybe all of the list elements and the list itself could be at least collapsible?