ubports-installer icon indicating copy to clipboard operation
ubports-installer copied to clipboard

GUI: drop tsparticles and replace with a different approach

Open amartinz opened this issue 2 years ago • 9 comments

Currently the installer's rendering process is very crash happy, which be reproduced 10/10 times on my machine (Fedora 36).

After some investigation we came up with the idea to remove tsparticles to reduce the ressource usage of the installer and replace it with a different approach, which is still to be discussed.

Jami proposed:

we could also instead have some slideshow with images/screenshots about Ubuntu Touch (similar to what Ubuntu's ubiquity installer does)

This issue is meant to start a discussion and track work that needs to be done.

For a first step, however, tsparticles should be dropped from the installer.

/cc @Flohack74 @JamiKettunen @maciek134 @NeoTheThird @pajlow

amartinz avatar Aug 19 '22 14:08 amartinz

Note: there is also a memory leak, which should be fixed with [email protected], which is related to https://github.com/ubports/ubports-installer/issues/2806.

amartinz avatar Aug 19 '22 14:08 amartinz

As a quick fix, removing tsparticles here should be enough: src/ui/partials/Animation.svelte

maciek134 avatar Aug 19 '22 14:08 maciek134

PR for dropping tsparticles: https://github.com/ubports/ubports-installer/pull/2809

particle animations are replaced with square animations. CPU and memory usage have decreased.

image

amartinz avatar Aug 19 '22 15:08 amartinz

@capsia37 made some designs we could use as a start. https://github.com/ubports/ubports-installer/pull/1552#issuecomment-934736910 Maybe we can still have some moving stuff as a background layer.

pajlow avatar Aug 19 '22 18:08 pajlow

@capsia37 made some designs we could use as a start. #1552 (comment)

Nice, thanks for pointing it out!

Maybe we can still have some moving stuff as a background layer.

Only the "lines" animation was removed and replaced with the "square" animation. So we still got animations but the tsparticles dependency is gone.

Regarding any future GUI planning, i realized this also needs to be done per OS, as if you flash anything else than Ubuntu Touch, it should not show Ubuntu Touch sliders :sweat_smile:

amartinz avatar Aug 19 '22 18:08 amartinz

Regarding any future GUI planning, i realized this also needs to be done per OS, as if you flash anything else than Ubuntu Touch, it should not show Ubuntu Touch sliders

Since we don't really "advertise" the other options (LineageOS, AsteroidOS and Stock Roms) we can probably show the slides for Ubuntu Touch installations only. Other installations would only show Yumi inside the loading circle.

If we want to go with this approach, I would like to work on it. We would need some graphics + texts though.

pajlow avatar Aug 20 '22 18:08 pajlow

@pajlow we should probably have it in a way that would allow adding slides for other OSes easily, in case someone would like to contribute them

maciek134 avatar Aug 22 '22 12:08 maciek134

@amartinz I think we should have another release before the slide show is included. The particles are really causing heavy CPU load.

pajlow avatar Sep 01 '22 09:09 pajlow

I agree, however i can not do releases. Only @NeoTheThird and @mariogrip can.

amartinz avatar Sep 01 '22 09:09 amartinz

The latest installer release 0.9.7-beta has tsparticles dropped.

amartinz avatar Sep 08 '22 15:09 amartinz

So can we close it? @amartinz

Flohack74 avatar Sep 09 '22 07:09 Flohack74

I think yes, as we could open a new one for the slideshow feature.

amartinz avatar Sep 09 '22 07:09 amartinz

Then do so ;)

Flohack74 avatar Sep 13 '22 06:09 Flohack74