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 690643 - Glitch when the dash expands
Glitch when the dash expands
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 693571 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-12-22 14:31 UTC by Giovanni Campagna
Modified: 2013-02-20 19:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dash: turn DashItemContainer into a proper St.Widget (11.81 KB, patch)
2012-12-22 14:31 UTC, Giovanni Campagna
none Details | Review
dash: fix allocation loop when increasing icon size (1.45 KB, patch)
2012-12-22 14:32 UTC, Giovanni Campagna
none Details | Review
dash: fix icon animation (6.14 KB, patch)
2012-12-22 14:33 UTC, Giovanni Campagna
needs-work Details | Review
dash: turn DashItemContainer into a proper St.Widget (12.48 KB, patch)
2012-12-24 01:20 UTC, Giovanni Campagna
committed Details | Review
dash: fix icon animation (5.54 KB, patch)
2012-12-24 01:20 UTC, Giovanni Campagna
none Details | Review
dash: fix icon animation (6.15 KB, patch)
2013-01-19 02:01 UTC, Giovanni Campagna
needs-work Details | Review
dash: add a workaround for Clutter bug 692744 (820 bytes, patch)
2013-01-28 22:23 UTC, Giovanni Campagna
committed Details | Review
dash: fix icon animation (6.12 KB, patch)
2013-02-20 17:18 UTC, Giovanni Campagna
committed Details | Review
dash: fix allocation loop when increasing icon size (1.70 KB, patch)
2013-02-20 17:45 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-12-22 14:31:20 UTC
How to reproduce: start removing favorites or closing applications until the dash jumps to the next size.
Comment 1 Giovanni Campagna 2012-12-22 14:31:49 UTC
Created attachment 232113 [details] [review]
dash: turn DashItemContainer into a proper St.Widget

This removes a number of unneeded ._delegate accesses and cleans up
the code.
Comment 2 Giovanni Campagna 2012-12-22 14:32:01 UTC
Created attachment 232114 [details] [review]
dash: fix allocation loop when increasing icon size

The DashActor will known to allocate the show apps button only if the
icon size is (temporarily) too big for the containing box, therefore
it should request just that as the minimum size.
This solves a glitch that happened when removing a favorite and at the
same time causing the dash to expand.
Comment 3 Giovanni Campagna 2012-12-22 14:33:28 UTC
Created attachment 232116 [details] [review]
dash: fix icon animation

animateIn and animateOut should not reset the scale, otherwise
extra animate calls (which are possible because the diff algorithm
in _redisplay is not optimal) cause unneeded movement.
Therefore, create new items hidden, and have the creator call
animateIn or set the scale/opacity properties manually.
adjustIconSize must be changed to always set the icon size temporarily,
otherwise the first time it computes the icon size with 0 scale.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-12-22 21:03:15 UTC
Review of attachment 232116 [details] [review]:

::: js/ui/dash.js
@@ +604,1 @@
+        let firstIcon = iconChildren[0].child._delegate.icon;

bad rebase

@@ +607,3 @@
 
+        // Enforce the current icon size during the size request
+        {

bad

@@ +639,3 @@
         let scale = oldIconSize / newIconSize;
         for (let i = 0; i < iconChildren.length; i++) {
+            let icon = iconChildren[i].child._delegate.icon;

bad rebase
Comment 5 Giovanni Campagna 2012-12-24 01:20:19 UTC
Created attachment 232175 [details] [review]
dash: turn DashItemContainer into a proper St.Widget

This removes a number of unneeded ._delegate accesses and cleans up
the code.
Comment 6 Giovanni Campagna 2012-12-24 01:20:41 UTC
Created attachment 232176 [details] [review]
dash: fix icon animation

animateIn and animateOut should not reset the scale, otherwise
extra animate calls (which are possible because the diff algorithm
in _redisplay is not optimal) cause unneeded movement.
Therefore, create new items hidden, and have the creator call
animateIn or set the scale/opacity properties manually.
adjustIconSize must be changed to always set the icon size temporarily,
otherwise the first time it computes the icon size with 0 scale.

The second one was not bad, actually.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-12-24 02:16:38 UTC
Review of attachment 232176 [details] [review]:

::: js/ui/dash.js
@@ +607,3 @@
 
+        // Enforce the current icon size during the size request
+        {

We do not use JS blocks anywhere else in shell code, and I don't see a reason to start now.
Comment 8 Giovanni Campagna 2013-01-19 02:01:11 UTC
Created attachment 233822 [details] [review]
dash: fix icon animation

animateIn and animateOut should not reset the scale, otherwise
extra animate calls (which are possible because the diff algorithm
in _redisplay is not optimal) cause unneeded movement.
Therefore, create new items hidden, and have the creator call
animateIn or set the scale/opacity properties manually.
adjustIconSize must be changed to always set the icon size temporarily,
otherwise the first time it computes the icon size with 0 scale.
Comment 9 Giovanni Campagna 2013-01-28 22:13:59 UTC
See bug 692744 for another layout issue with the Dash, which I believe lies in Clutter.
Comment 10 Giovanni Campagna 2013-01-28 22:23:48 UTC
Created attachment 234669 [details] [review]
dash: add a workaround for Clutter bug 692744
Comment 11 Giovanni Campagna 2013-02-11 20:42:22 UTC
*** Bug 693571 has been marked as a duplicate of this bug. ***
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-02-19 21:09:10 UTC
Review of attachment 232175 [details] [review]:

OK.
Comment 13 Jasper St. Pierre (not reading bugmail) 2013-02-19 21:11:25 UTC
Review of attachment 233822 [details] [review]:

::: js/ui/dash.js
@@ +161,3 @@
         this.add_actor(this.child);
+
+        this.child.set_scale_with_gravity(this._childScale, this._childScale,

Gravity is deprecated. Set the pivot point?

@@ +788,3 @@
+        for (let i = 0; i < addedItems.length; i++) {
+            if (animate) {
+                addedItems[i].item.animateIn();

addedItems[i].item.show(animate); maybe?
Comment 14 Jasper St. Pierre (not reading bugmail) 2013-02-19 21:11:42 UTC
Review of attachment 234669 [details] [review]:

OK.
Comment 15 Giovanni Campagna 2013-02-20 17:14:38 UTC
(In reply to comment #13)
> Review of attachment 233822 [details] [review]:
> 
> ::: js/ui/dash.js
> @@ +161,3 @@
>          this.add_actor(this.child);
> +
> +        this.child.set_scale_with_gravity(this._childScale, this._childScale,
> 
> Gravity is deprecated. Set the pivot point?

I just copypasted the code from the childScale property setter. If you want to remove the deprecated call, I'll do with a separate patch.
Comment 16 Jasper St. Pierre (not reading bugmail) 2013-02-20 17:17:14 UTC
OK.
Comment 17 Giovanni Campagna 2013-02-20 17:18:02 UTC
Created attachment 236957 [details] [review]
dash: fix icon animation

animateIn and animateOut should not reset the scale, otherwise
extra animate calls (which are possible because the diff algorithm
in _redisplay is not optimal) cause unneeded movement.
Therefore, create new items hidden, and have the creator call
animateIn or set the scale/opacity properties manually.
adjustIconSize must be changed to always set the icon size temporarily,
otherwise the first time it computes the icon size with 0 scale.
Comment 18 Jasper St. Pierre (not reading bugmail) 2013-02-20 17:24:38 UTC
Review of attachment 236957 [details] [review]:

I like this a lot better, yeah.
Comment 19 Giovanni Campagna 2013-02-20 17:45:05 UTC
Created attachment 236960 [details] [review]
dash: fix allocation loop when increasing icon size

The DashActor will known to allocate the show apps button only if the
icon size is (temporarily) too big for the containing box, therefore
it should request just that as the minimum size.
This solves a glitch that happened when removing a favorite and at the
same time causing the dash to expand.
Comment 20 Jasper St. Pierre (not reading bugmail) 2013-02-20 18:40:57 UTC
Review of attachment 236960 [details] [review]:

The comment makes this much clearer.
Comment 21 Giovanni Campagna 2013-02-20 19:52:26 UTC
Attachment 232175 [details] pushed as ef1e279 - dash: turn DashItemContainer into a proper St.Widget
Attachment 234669 [details] pushed as 8bcb103 - dash: add a workaround for Clutter bug 692744
Attachment 236957 [details] pushed as 8e7d74b - dash: fix icon animation
Attachment 236960 [details] pushed as 629b6fa - dash: fix allocation loop when increasing icon size