Created attachment 108477 [details] Current too-wide sidebar Discover's sidebar is really wide, and mostly consists of whitespace. This issue, along with https://bugs.kde.org/show_bug.cgi?id=385973, causes Discover's main window to take up a lot more space than it needs to, making Discover's brand identity feel wasteful and not respectful of your limited screen real estate. I propose dropping the default width of the sidebar by a bit. Mockup attached.
Created attachment 108478 [details] Mockup of proposed new design
This is something to discuss with Kirigami overall. We can't be randomly overriding widths in Discover. Especially on such subjective matters, especially discussing just in bugzilla.
I discussed this with Thomas Pfeiffer in #kirigami and we discovered that the sidebar automatically sizes itself to accommodate the widest element, which is currently the top graphic: banner.svg. That graphic could be reduced in width, which would make the sidebar narrower. Alternatively, we could get rid of the header graphics entirely, which would make this a duplicate of https://bugs.kde.org/show_bug.cgi?id=385973 How should we proceed here?
Actually I tried reducing the width of the SVG by 25%, but it was just scaled up to match the original width of the sidebar, so I don't think the width of the header graphic alone is what's causing the excessive sidebar width.
*** Bug 389362 has been marked as a duplicate of this bug. ***
I think this might be the problem: https://cgit.kde.org/kirigami.git/tree/src/controls/GlobalDrawer.qml#n215
Yep, that's it. In src/controls/GlobalDrawer.qml, root.parent.width is getting set to an absurdly low value, so it falls back to the minimum value of Units.gridUnit * 20 (which I believe works out to 360 pixels). This results in a sidebar that's far too wide and also doesn't adjust to wide values (the worst of both worlds). It seems like there are a few bugs here: - Units.gridUnit * 20 is too high a minimum width. - root.parent.width is getting set incorrectly, which could be a bug in Kirigami, or a bug in Discover; maybe we're not using the GlobalDrawer correctly. A trivial workaround in Discover for this bug is to simply override this logic and hardcode a smaller width in discover/qml/DiscoverDrawer.qml with `width: 280`. This looks good in English, but may look less good in languages with longer words like German.
Created attachment 110796 [details] Discover with the sidebar forced to 280 pixels
Please do not use absolute pixel sizes. The number of pixels could be computed relative to the font size. I think using the Plasma grid units does exactly that.
relative to font size == font height in pixels, not points.
Right, I wasn't suggesting that as a real fix, just as something that illustrates with the issue is and how we might work around it if necessary (yes, we'd use gridUnits).
So the root cause of the issue here is that we're using the wrong UI element for Discover's sidebar (see Bug 390928). We use a Kirigami GlobalDrawer for the sidebar, which is problematic because the GlobalDrawer's width is 360 pixels (possibly due to to bug in how we implemented it?) on the desktop--far too wide for our use case (see Bug 390927). Replacing the GlobalDrawer with a more appropriate UI element is going to be a lot of work, so until then, let's not torture our users with the humongous sidebar any longer and just force it to be a smaller size for now. Submitted a patch: https://phabricator.kde.org/D10756
Git commit bfa25177805fcb3b57b5db3de063d96b5bfec2e3 by Nathaniel Graham. Committed on 22/02/2018 at 22:49. Pushed by ngraham into branch 'Plasma/5.12'. Reduce sidebar width Summary: FIXED-IN: 5.12.3 This is a hack to work around the fact that we're using the wrong UI element for Discover's sidebar (see [[https://bugs.kde.org/show_bug.cgi?id=390928|Bug 390928]]). We use a Kirigami GlobalDrawer for the sidebar, which is problematic because the GlobalDrawer's width is always a minimum of 360 pixels on the desktop--far too wide for our use case (see [[https://bugs.kde.org/show_bug.cgi?id=390927|Bug 390927]]). Replacing the GlobalDrawer with something more appropriate is going to be a lot of work, so until then, let's not torture our users with the humongous sidebar any longer and just force it to be a smaller size for now. I think this is a vast visual improvement because it returns the focus to the content, rather than the navigation. It makes Discover feel less "fat." Test Plan: Before, small window: {F5726133} After, small window: {F5726132} Before, medium window: {F5726113} After, medium window: {F5726114} Before, app page: {F5726115} After, app page: {F5726116} Before, default view: {F5726137} After, default view: {F5726138} We may want to consider changing the default window size to be less wide if this patch lands, since with a narrower sidebar, the main view doesn't need to be so wide. Reviewers: #discover_software_store, apol Reviewed By: #discover_software_store, apol Subscribers: acrouthamel, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D10756 M +4 -0 discover/qml/DiscoverDrawer.qml https://commits.kde.org/discover/bfa25177805fcb3b57b5db3de063d96b5bfec2e3