nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.12k stars 3.94k forks source link

Translucent elements without performance impact #45452

Open marcoambrosini opened 1 month ago

marcoambrosini commented 1 month ago

Due to This issue we added some conditional logic and avoid using elements with a translucent background in chrome (apart from MacOS).

I would like to suggest an alternative approach:

This creates the same effect without any extra (continuous) computation demand on the clients

ShGKme commented 3 weeks ago

I think this is a great idea. The PoC also looks very promising. Some thoughts:

  1. This would require changes for components and apps, so we probably still need some solution for old servers to fix performance issue...
  2. It would be great to make the solution backward-compatible for both apps and @nextcloud/vue. Ideally with some reusable solution, maybe a directive. I'll try to make a PoC

apart from MacOS

You don't want to use this approach on mac? Is there any difference with the blur filter?

artonge commented 3 weeks ago

This would mean downloading two background, right? Also, instead of setting that second background for each element needing a blurred background, we could set that second background as a sibling of background-container and clipping it to no appear in the top bar and on the sides.

ShGKme commented 3 weeks ago

This would mean downloading two background, right?

Yes

Also, instead of setting that second background for each element needing a blurred background, we could set that second background as a sibling of background-container and clipping it to no appear in the top bar and on the sides.

But apps may use it in any place (e.g. call view in Talk), and we have a kind of background already on the elements with the blur filter.

artonge commented 3 weeks ago

But apps may use it in any place (e.g. call view in Talk), and we have a kind of background already on the elements with the blur filter.

Isn't the goal to remove that blur background?

ShGKme commented 3 weeks ago

Isn't the goal to remove that blur background?

As I understand, the goal is to remove creating this blur background using CSS filter on the fly, because it has bad performance on machines without GPU acceleration.

The @marcoambrosini's proposal is to generate this blurred image once on the server instead of CSS filter.