sailfishos-patches / patchmanager

Patchmanager for SailfishOS
https://openrepos.net/content/patchmanager/patchmanager
Other
21 stars 22 forks source link

[QML] Make initial loading screen less stuttery #461

Closed nephros closed 2 months ago

nephros commented 2 months ago

There's lots going on on the initial page when launched the first time. This lead to all kinds of ugliness like stuttering and objects overlaying each other.

This tries to improve things, or at least hide it from view ;)

nephros commented 2 months ago

Meh too much going on on that main page.

This breaks the Pulley hint for updates.

nephros commented 2 months ago

Not sure it hasn't been broken for a while.

Anyway, removed all the fancy pulley hinting and replaced it with a simple ViewPlaceholder.

nephros commented 2 months ago

Thanks for looking at that and you are indeed right, the hinting does work. Seems I haven't been using at an unmodified PM install for so long I never saw it.

I'm going to close this PR and come back with seperate ones which don't break existing stuff.

nephros commented 2 months ago

And: I usually start PM from a topmenu link not by going through Settings. There the loading behaviour is slightly different, and the hint indeed is broken.

Olf0 commented 2 months ago

And: I usually start PM from a topmenu link not by going through Settings. There the loading behaviour is slightly different, and the hint indeed is broken.

IMO both ways are legitimate and hence should work, right?

nephros commented 2 months ago

And: I usually start PM from a topmenu link not by going through Settings. There the loading behaviour is slightly different, and the hint indeed is broken.

IMO both ways are legitimate and hence should work, right?

They are legitimate, but they affect the way the main Patchmanager page is initialized in subtle ways.

There are many things going on at the same time when that page is loaded (the model of installed patches is generated by the PM QML plugin, web catalog and updates are checked, pulley menu hint animation may or may not play, the list of patches is layed out, a decision is made whether or not to show the "hey you don't have any patches installed" hint, etc.).
If started from a running Settings app, there's also the page transition animation, if going through the topmenu button, there is not.

It's tricky to get all those operations to not cause UI uglinesses because of interdependencies and timings. Also, because of different performance of devices, on one device something might look fine, on others it may appear broken.

The current implementation is a bit hackish in the sense that it doesn´t actually handle the interdependencies properly, instead it waits for a startTimer to elapse in the hopes that after it has run, most things have settled and its safe to to things like show the pulley hint.
(A "proper" or "cleaner" implementation would do something like have the patch model(s) have a loadingstatus property or emit a finished signal, and the UI listen for those and start doing things when received. But we currently don't have that.)

Anyway, on my X10III, the pulley hint animation for updates is only-half-shown and then freezes and vanishes when launched from top menu, but shown fine when going through the Settings app.

As I almost always do the former, I thought the animation was broken and proceeded to remove it.