Bug 358039

Summary: Broken initial layout of the folder applet
Product: [Plasma] plasmashell Reporter: Hrvoje Senjan <hrvoje.senjan>
Component: FolderAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nowrep, plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Hrvoje Senjan 2016-01-15 19:07:38 UTC
The issue was found when submitting KF 5.18 & Plasma 5.5.3 to openSUSE Tumbleweed https://openqa.opensuse.org/tests/113806/modules/first_boot/steps/1

i can reproduce the problem locally also with git master of both KF5 & Plasma

Reproducible: Always

Steps to Reproduce:
1. Add Folder applet to desktop

Actual Results:  
See the picture

Expected Results:  
https://openqa.opensuse.org/tests/113995/modules/first_boot/steps/1
Comment 1 Eike Hein 2016-01-16 15:59:38 UTC
Plasma 5 doesn't put a Folder View on to the desktop by default, so this is a downstream customization of the init script that's defective in some way.
Comment 2 Hrvoje Senjan 2016-01-16 16:06:51 UTC
The issue is here for me when i also add the folder 'by hand'. I hope this scenario is supported ;-)
Comment 3 Hrvoje Senjan 2016-01-16 16:08:03 UTC
Please note, the regression is somewhere in KF 5.17 -> 5.18 or Plasma 5.5.2 -> 5.5.3 as it worked correctly before.
Comment 4 Eike Hein 2016-01-16 16:10:48 UTC
Ah sorry, I misunderstood your report initially. Seeing the problem now.
Comment 5 Hrvoje Senjan 2016-01-17 14:41:43 UTC
so this one 'broke' it:

commit 344dbeb93884af36f66e9a5133e7be7bd1b1e70d
Author: David Rosca <nowrep@gmail.com>
Date:   Tue Dec 22 15:46:00 2015 +0100

    AppletQuickItem: Drop timer to create full representation
    
    The timer only added 250ms delay before creating the full representation,
    sometimes resulting in showing empty popup for a moment.
    
    REVIEW: 126468
Comment 6 Eike Hein 2016-01-17 15:24:24 UTC
Yeah, I was debugging this yesterday and noticed it's because either applet.width or applet.height in main.qml::addApplet() come out as 0. Oddly the proper calculation does run before, but the applet item is squashed to 0 height before being passed to the function (onHeightChanged runs twice). Still. need to work out where and why that resize happens.
Comment 7 David Rosca 2016-01-17 16:00:57 UTC
Ah, so it did actually break something.

Please test https://git.reviewboard.kde.org/r/126778/
Comment 8 Hrvoje Senjan 2016-01-17 16:52:36 UTC
Yep, problem solved =)
Comment 9 David Rosca 2016-01-17 17:06:36 UTC
Git commit 11937533e83659dc4dab6f7e8e6019863a28ddae by David Rosca.
Committed on 17/01/2016 at 17:02.
Pushed by drosca into branch 'master'.

Ignore check if just one part of size is zero in compactRepresentationCheck

When debugging the linked bug, it looks like when item's geometry change
eg. from 0x0 to 100x100, geometryChanged may be called twice, first with 100x0
and then finally with 100x100.
This was not issue before, because we used timer to call compactRepresentationCheck.
This changes compactRepresentationCheck so that it early returns also when just
one part of item's size is zero.

Fixes regression from 344dbeb938

REVIEW: 126778

M  +2    -2    src/plasmaquick/appletquickitem.cpp

http://commits.kde.org/plasma-framework/11937533e83659dc4dab6f7e8e6019863a28ddae