Closed Bug 1003165 Opened 10 years ago Closed 10 years ago

The transition going back from an app to the homescreen if often missed

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: etienne, Assigned: etienne)

References

Details

Attachments

(1 file, 1 obsolete file)

46 bytes, text/x-github-pull-request
alive
: review+
kgrandon
: review+
Details | Review
Part of this is probably bug 974125 but we have room for improvement :)
Blocks: salt-grain
Going to have a look this week so taking for now.
Assignee: nobody → etienne
Summary: Going back from an app to the homescreen causes 3 reflows and 2 repaints of the status bar → The transition going back from an app to the homescreen if often missed
Blocks: milk-flow
wow there's a new 50ms reflow in that list on today's master... :/
Quick update: finally making progress on this one.
Thanks to reflows annotation in cleopatra I now have a half-functional WindowManager which causes no reflow when going out of an app.

Just need to make it fully functional :)
Attached file WIP branch (obsolete) —
Attached file Gaia PR
This is ready for a first round of review.
It's a nice potpourri :)

Kevin, I'm making a small change to home_searchbar.js for an issue that was driving me *crazy*. Can you see if it makes sense (the details are in the commit message, I'm open to alternative solutions).

TODO:
* talk with design to see if the transition tweak is ok
* talk with platform to see if I need to file a bug for pointer-events changes causing a reflow
Attachment #8425621 - Attachment is obsolete: true
Attachment #8427133 - Flags: review?(kgrandon)
Attachment #8427133 - Flags: review?(alive)
Comment on attachment 8427133 [details] [review]
Gaia PR

I am unfortunately about to jump on a plane, and didn't want to hold this up, so I gave the code a look but did not test this on a device yet. Everything looks pretty good to me. Thanks!
Attachment #8427133 - Flags: review?(kgrandon) → review+
Hey Gordon, we need some very technical UX feedback here so I think you're the best person to ask :)

The current animation when you go to/from the homescreen is 2 fold:
* the app scales between 0.2 and 1, with some opacity change
* the homescreen itself scales between factors 1 and 5

The thing is, for the homescreen to be animated on the GPU it cannot be bigger than the screen dimension + 1/8th [1].
I already tried (naively) to change the scale() transition for a translateZ but it yields exactly the same (bad) results.

The approach in this patch is to scale the homescreen to a factor of 1.125 *and* fade it away in order have something kind-of similar to the homescreen scaling completely outside of the viewport while still animating on the GPU.

Can you give this patch a spin on a device? We still have some room to improve by tweaking the timing function of the transitions, but I really want to find a solution that satisfies UX visually *and* in term of performance.
You go to/from the homescreen constantly on a phone, we need this interaction to be perfect :)

[1] http://dxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.cpp#4692
Flags: needinfo?(gbrander)
Attachment #8427133 - Flags: review?(alive) → review+
(In reply to Etienne Segonzac (:etienne) from comment #7)
> Hey Gordon, we need some very technical UX feedback here so I think you're
> the best person to ask :)
> 
> The current animation when you go to/from the homescreen is 2 fold:
> * the app scales between 0.2 and 1, with some opacity change
> * the homescreen itself scales between factors 1 and 5
> 
> The thing is, for the homescreen to be animated on the GPU it cannot be
> bigger than the screen dimension + 1/8th [1].
> I already tried (naively) to change the scale() transition for a translateZ
> but it yields exactly the same (bad) results.
> 
> The approach in this patch is to scale the homescreen to a factor of 1.125
> *and* fade it away in order have something kind-of similar to the homescreen
> scaling completely outside of the viewport while still animating on the GPU.
> 
> Can you give this patch a spin on a device? We still have some room to
> improve by tweaking the timing function of the transitions, but I really
> want to find a solution that satisfies UX visually *and* in term of
> performance.
> You go to/from the homescreen constantly on a phone, we need this
> interaction to be perfect :)
> 
> [1]
> http://dxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.
> cpp#4692

Nevermind I was told bug 963928 will make the current transition smoooth :)
I'm going to land the patch without the transition change.
Flags: needinfo?(gbrander)
Regarding pointer-events triggering a reflow -> https://bugzilla.mozilla.org/show_bug.cgi?id=1016029
https://github.com/mozilla-b2g/gaia/commit/3bca75fd7ba78b687f5869e34e4ed998acf1c515
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 1016483
Depends on: 1026240
Depends on: 1034347
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: