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 778405 - Animate the user accounts carousel
Animate the user accounts carousel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-09 18:28 UTC by Felipe Borges
Modified: 2017-02-13 11:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Animate page transitions in the Carousel (968 bytes, patch)
2017-02-09 18:54 UTC, Felipe Borges
committed Details | Review
user-accounts: Animate the Carousel Arrow (2.52 KB, patch)
2017-02-09 19:02 UTC, Felipe Borges
none Details | Review
user-accounts: Animate the Carousel Arrow (2.52 KB, patch)
2017-02-09 19:15 UTC, Felipe Borges
none Details | Review
user-accounts: Animate the Carousel Arrow (3.24 KB, patch)
2017-02-10 11:46 UTC, Felipe Borges
committed Details | Review
user-accounts: Don't move with arrow during size-allocation (3.19 KB, patch)
2017-02-10 15:06 UTC, Ondrej Holy
accepted-commit_now Details | Review
user-accounts: Don't move with arrow during animations (3.05 KB, patch)
2017-02-10 16:23 UTC, Ondrej Holy
committed Details | Review
user-accounts: Disable animations when reloading users (3.81 KB, patch)
2017-02-13 08:22 UTC, Ondrej Holy
committed Details | Review

Description Felipe Borges 2017-02-09 18:28:32 UTC
It could have some animations powered by CSS.
Comment 1 Felipe Borges 2017-02-09 18:49:52 UTC
To be more specific: the main animation it could have are:

* un/revealing the Carousel when there's a single user account
* transition between pages of the carousel
* animation of the moving arrow
Comment 2 Felipe Borges 2017-02-09 18:54:41 UTC
Created attachment 345363 [details] [review]
user-accounts: Animate page transitions in the Carousel
Comment 3 Felipe Borges 2017-02-09 19:02:10 UTC
Created attachment 345364 [details] [review]
user-accounts: Animate the Carousel Arrow
Comment 4 Felipe Borges 2017-02-09 19:05:16 UTC
(In reply to Felipe Borges from comment #3)
> Created attachment 345364 [details] [review] [review]
> user-accounts: Animate the Carousel Arrow

If you are a designer and want to tweak the Arrow animation, you can open the gtk inspector, go to the CSS tab and paste:

.carousel-arrow {
  animation-duration: 0.5s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

The css animation properties are well documented at http://www.w3schools.com/css/css3_animations.asp

ps.: gtk+ might not support everything yet.
Comment 5 Felipe Borges 2017-02-09 19:11:51 UTC
You can try these patches by building the wip/feborges/new-users-panel branch
https://git.gnome.org/browse/gnome-control-center/log/?h=wip/feborges/new-users-panel

Here is a preview of the animations as they are so far https://webmshare.com/play/omJO6
Comment 6 Felipe Borges 2017-02-09 19:15:37 UTC
Created attachment 345366 [details] [review]
user-accounts: Animate the Carousel Arrow
Comment 7 Felipe Borges 2017-02-09 19:17:02 UTC
(In reply to Felipe Borges from comment #6)
> Created attachment 345366 [details] [review] [review]
> user-accounts: Animate the Carousel Arrow

https://webmshare.com/play/gKJOj
Comment 8 Felipe Borges 2017-02-09 19:19:36 UTC
Review of attachment 345366 [details] [review]:

::: panels/user-accounts/data/carousel.css
@@ +14,3 @@
   margin-bottom: -1px;
+  animation-duration: 200ms;
+  animation-timing-function: ease-in-out;

These changes were suggest by jimmac on irc.
Comment 9 Felipe Borges 2017-02-09 19:19:37 UTC
Review of attachment 345366 [details] [review]:

::: panels/user-accounts/data/carousel.css
@@ +14,3 @@
   margin-bottom: -1px;
+  animation-duration: 200ms;
+  animation-timing-function: ease-in-out;

These changes were suggest by jimmac on irc.
Comment 10 Ondrej Holy 2017-02-10 10:36:14 UTC
There are still the bugs, which I mentioned on Bug 767065. Each patch separately works quite nicely, however, it doesn't work so good together. See what happens when you switching from the second page to the first page (opposite direction seems ok). Can't we somehow disable the arrow animation during the stack animation?
https://webmshare.com/dEJyO
Comment 11 Felipe Borges 2017-02-10 11:46:32 UTC
Created attachment 345431 [details] [review]
user-accounts: Animate the Carousel Arrow
Comment 12 Felipe Borges 2017-02-10 11:47:31 UTC
(In reply to Felipe Borges from comment #11)
> Created attachment 345431 [details] [review] [review]
> user-accounts: Animate the Carousel Arrow

in this interaction I reset the arrow_start_x point every time the stack page changed (size-allocate), in doing so, we don't have the delayed jumps anymore. What do you think?
Comment 13 Ondrej Holy 2017-02-10 15:06:22 UTC
That's really much better, but still, it looks to me a bit odd when changing the stack pages. What do you think about the following patch on the top of yours?
Comment 14 Ondrej Holy 2017-02-10 15:06:45 UTC
Created attachment 345462 [details] [review]
user-accounts: Don't move with arrow during size-allocation

The arrow doesn't move during the stack animation, which is what we want.
Comment 15 Felipe Borges 2017-02-10 15:51:11 UTC
Review of attachment 345462 [details] [review]:

it works like a charm. It is good for me. lgtm?
Comment 16 Ondrej Holy 2017-02-10 16:23:25 UTC
Created attachment 345466 [details] [review]
user-accounts: Don't move with arrow during animations

Don't move with the arrow during the stack animation in order to avoid
some ugly movements...
Comment 17 Ondrej Holy 2017-02-10 16:27:43 UTC
The previous patch doesn't work correctly if you modified username or so... can you take a look at the new one, please? It still behaves slightly odd only if you add new user and the new user is on another page, but I don't know what to do with...
Comment 18 Ondrej Holy 2017-02-10 16:32:54 UTC
Screencast for designers:
https://webmshare.com/q7JJq
Comment 19 Ondrej Holy 2017-02-10 17:21:10 UTC
(In reply to Ondrej Holy from comment #17)
> The previous patch doesn't work correctly if you modified username or so...
> can you take a look at the new one, please? It still behaves slightly odd
> only if you add new user and the new user is on another page, but I don't
> know what to do with...

Or rename user and it moves to another page... but this is also problem for attachment 345363 [details] [review].
Comment 20 Felipe Borges 2017-02-12 14:02:29 UTC
(In reply to Ondrej Holy from comment #19)
> (In reply to Ondrej Holy from comment #17)
> > The previous patch doesn't work correctly if you modified username or so...
> > can you take a look at the new one, please? It still behaves slightly odd
> > only if you add new user and the new user is on another page, but I don't
> > know what to do with...
> 
> Or rename user and it moves to another page... but this is also problem for
> attachment 345363 [details] [review] [review].

it's better. I would say that we would go with these for now and fix the corner cases later (we have a UI freeze tomorrow).
Comment 21 Ondrej Holy 2017-02-13 08:22:04 UTC
Created attachment 345605 [details] [review]
user-accounts: Disable animations when reloading users

Animations cause unwanted effects when reloading users, disable them.
Comment 22 Ondrej Holy 2017-02-13 08:22:45 UTC
I am happy now... push them please if you like it...
Comment 23 Ondrej Holy 2017-02-13 08:24:20 UTC
(In reply to Ondrej Holy from comment #22)
> I am happy now... push them please if you like it...

...and if designers like it too...
Comment 24 Felipe Borges 2017-02-13 11:09:00 UTC
Attachment 345363 [details] pushed as bce05cb - user-accounts: Animate page transitions in the Carousel
Attachment 345431 [details] pushed as b8983f9 - user-accounts: Animate the Carousel Arrow
Attachment 345466 [details] pushed as c8b5350 - user-accounts: Don't move with arrow during animations
Attachment 345605 [details] pushed as b4c2636 - user-accounts: Disable animations when reloading users