After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694371 - Folder popups are truncated at the top if they don't fit
Folder popups are truncated at the top if they don't fit
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 695251 695862 696910 700658 701648 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-02-21 16:21 UTC by Giovanni Campagna
Modified: 2013-06-05 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (595.89 KB, image/png)
2013-02-21 16:21 UTC, Giovanni Campagna
  Details
appDisplay: Use a custom LayoutManager for the AllView stack (2.41 KB, patch)
2013-03-14 18:37 UTC, Florian Müllner
committed Details | Review
appDisplay: Expand AllView (1.06 KB, patch)
2013-03-17 18:12 UTC, Florian Müllner
committed Details | Review
Closing button clipped (531.07 KB, image/png)
2013-03-21 10:19 UTC, Lukas Zachar
  Details
appDisplay: Fix cut-off folders in All view (2.65 KB, patch)
2013-05-16 15:30 UTC, Florian Müllner
committed Details | Review
appDisplay: Also account for folder popup's close buttons (2.29 KB, patch)
2013-05-16 17:46 UTC, Florian Müllner
committed Details | Review

Description Giovanni Campagna 2013-02-21 16:21:55 UTC
Created attachment 237060 [details]
Screenshot

If the source folder is too high in the view, and the folder popup too large, popups can be truncated.
Comment 1 Giovanni Campagna 2013-03-05 22:08:47 UTC
*** Bug 695251 has been marked as a duplicate of this bug. ***
Comment 2 Florian Müllner 2013-03-14 16:16:33 UTC
*** Bug 695862 has been marked as a duplicate of this bug. ***
Comment 3 Florian Müllner 2013-03-14 18:37:17 UTC
Created attachment 238921 [details] [review]
appDisplay: Use a custom LayoutManager for the AllView stack

ClutterBinLayout uses the maximum width/height of all children in
size requests and positions children according to the expand/align
properties. This means that the vertical position of folder popups
is not considered in size requests, so if the main view is smaller
than a folder popup's height and offset, the popup will be truncated
and/or mispositioned. Fix those cases by using a custom LayoutManager
that behaves like ClutterFixedLayout for height requests and like
ClutterBinLayout otherwise.
Comment 4 Matthias Clasen 2013-03-14 23:59:41 UTC
Very visible issue in a prominent new feature. 
Should probably get that fix in, for 3.8
Comment 5 Florian Müllner 2013-03-15 00:08:19 UTC
(In reply to comment #4)
> Very visible issue in a prominent new feature.

Not sure I'd call it very visible - it should only be an issue where either

  - there's only a very small number of application launchers
    in the main view (ideally that's the case on fresh installs,
    but how many distro actually do that?)

  - users mess with GSettings to turn more categories into folders
Comment 6 drago01 2013-03-15 21:11:13 UTC
Review of attachment 238921 [details] [review]:

Looks good.

::: js/ui/appDisplay.js
@@ +170,3 @@
+             child = child.get_next_sibling()) {
+            let childY = child.y;
+            let [childMin, childNatural] = child.get_preferred_height (forWidth);

Remove the whitespace.
Comment 7 Florian Müllner 2013-03-15 21:42:20 UTC
Attachment 238921 [details] pushed as 499ae60 - appDisplay: Use a custom LayoutManager for the AllView stack
Comment 8 Giovanni Campagna 2013-03-16 22:49:27 UTC
This patch did not solve the bug for me, and I expect it is because you're not overriding size_allocate, so the extra space you request is not going anywhere useful.
Comment 9 Florian Müllner 2013-03-16 23:34:34 UTC
(In reply to comment #8)
> This patch did not solve the bug for me, and I expect it is because you're not
> overriding size_allocate

Mmmh, I tested with all categories turned into app folders - probably some local patch then, I'll look into it tomorrow ...
Comment 10 Florian Müllner 2013-03-17 18:12:09 UTC
Created attachment 239067 [details] [review]
appDisplay: Expand AllView

If the view doesn't fill the available screen, content should still
start at the top rather than the center - not least the positioning
code for folder popups assumes that, so set the appropriate expand
flags.

^^^ So that's the culprit, the local patch that made it work for me ...
Comment 11 Giovanni Campagna 2013-03-17 18:18:50 UTC
Nope, still truncated.
Btw, in my case I just turned Games into a folder, so the outer content is higher than the folder, but the folder is positioned partly outside the allocation, because the folder icon is too close to the top.
Comment 12 Florian Müllner 2013-03-18 11:07:10 UTC
(In reply to comment #11)
> Nope, still truncated.
> Btw, in my case I just turned Games into a folder, so the outer content is
> higher than the folder, but the folder is positioned partly outside the
> allocation, because the folder icon is too close to the top.

I'm unable to reproduce this. I've tried with "Games" (both en_US and it_IT) and "Others" renamed to "Aaaa" (so it shows up at the very top), it works as expected in all cases.
Comment 13 Lukas Zachar 2013-03-21 10:19:41 UTC
Created attachment 239446 [details]
Closing button clipped

Encountered on gnome-shell-3.7.92-2.fc19.x86_64
Comment 14 Matthias Clasen 2013-03-21 11:46:57 UTC
probably too late for cosmetic fixes like this now; we should pick this up for 3.8.1
Comment 15 Florian Müllner 2013-03-30 14:34:08 UTC
*** Bug 696910 has been marked as a duplicate of this bug. ***
Comment 16 Florian Müllner 2013-05-16 15:30:31 UTC
Created attachment 244426 [details] [review]
appDisplay: Fix cut-off folders in All view

We already take care of growing the view if open folders overlap
at the bottom, however folder popups may still end up being cut
off when opening above the source icon - if the popup is high enough,
its y coordinate will be negative and therefore outside the parent's
allocation. To fix, we can either make sure that folders pop up below
their source icon in that case, or adjust the parent grid's position
as necessary while a folder is open. This implements the latter.
Comment 17 Florian Müllner 2013-05-16 17:46:09 UTC
Created attachment 244441 [details] [review]
appDisplay: Also account for folder popup's close buttons

As the close button of folder popups overlaps at the top, it ends
up being cut off if the folder is located at the very top of the
view. Fix this glitch by taking the button's overlap into account
in that case.
Comment 18 Giovanni Campagna 2013-05-19 20:36:29 UTC
*** Bug 700658 has been marked as a duplicate of this bug. ***
Comment 19 Giovanni Campagna 2013-05-19 20:53:54 UTC
Review of attachment 244426 [details] [review]:

Finally got around to test this, it fixed my problem.

::: js/ui/appDisplay.js
@@ +708,3 @@
+    set parentOffset(offset) {
+        this._parentOffset = offset;
+    },

If you do nothing in the setter, just avoid it an set parentOffset as a data property.
Comment 20 Giovanni Campagna 2013-05-19 20:55:40 UTC
Review of attachment 244441 [details] [review]:

Ok
Comment 21 Florian Müllner 2013-05-20 16:20:24 UTC
Attachment 239067 [details] pushed as b799e8c - appDisplay: Expand AllView
Attachment 244426 [details] pushed as d8d0aff - appDisplay: Fix cut-off folders in All view
Attachment 244441 [details] pushed as 0eba0f8 - appDisplay: Also account for folder popup's close buttons
Comment 22 Florian Müllner 2013-06-05 13:28:16 UTC
*** Bug 701648 has been marked as a duplicate of this bug. ***