Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(theming): Conitionally disable blur filter for performance #45395

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented May 17, 2024

Summary

As an alternative for #45049 but this one is not removing the blurry background for all users but only for chrome + edge by default.
User can force enable if it works for them (e.g. they have hardware acceleration) or force disable if they suffer performance issues.

Firefox and Safari are not affected by the performance issues, and Android should also be ok as they have proper hardware acceleration.
Mostly Windows is affected and Linux with faulty GPU drivers.

Screencast

a.mp4

Checklist

@susnux susnux requested a review from szaimen May 17, 2024 12:39
@susnux susnux force-pushed the fix/blur-chromium branch from 1466ff4 to 2b43786 Compare May 17, 2024 12:45
@susnux susnux force-pushed the fix/blur-chromium branch from 2b43786 to cff7df4 Compare May 17, 2024 12:56
@susnux susnux force-pushed the fix/blur-chromium branch from cff7df4 to e6724d7 Compare May 17, 2024 14:54
@susnux susnux added bug 3. to review Waiting for reviews labels May 17, 2024
@susnux susnux requested review from jancborchardt, a team, Pytal, sorbaugh and solracsf and removed request for a team May 17, 2024 14:57
@susnux susnux marked this pull request as ready for review May 17, 2024 15:01
@susnux susnux requested review from a team, icewind1991, yemkareems and sorbaugh and removed request for sorbaugh and a team May 17, 2024 15:01
@susnux susnux force-pushed the fix/blur-chromium branch from e6724d7 to d0373e2 Compare May 17, 2024 15:06
@susnux susnux added this to the Nextcloud 30 milestone May 17, 2024
@susnux
Copy link
Contributor Author

susnux commented May 17, 2024

To be discussed by @nextcloud/designers

@kesselb
Copy link
Contributor

kesselb commented May 18, 2024

Thanks for working on it 👍

Apparently my chromium has no hardware acceleration any longer (it's a snap package now, maybe that's related).

It's basically impossible to use Nextcloud and especially navigation and dashboard.

Screencast.from.2024-05-18.16-46-36.webm
Screencast.from.2024-05-18.16-55-12.webm

The auto-detection worked.
If you selected yes or no once, you cannot go back to "auto" but that's acceptable, I guess.
The left navigation looks definitely cleaner with the blurred background.

Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach in general :)
One thing: leaving the sharp edges of a picture below the text can make it hard to read. I think that when we disable the blur we should also add a solid background, not transparent. We can use an average of the background similar to the auto primary? But lighter or darker depending on the theme.
Can we also narrow this down to windows && chromium users only?

@susnux
Copy link
Contributor Author

susnux commented Jul 1, 2024

@marcoambrosini Mac OS is now ignored because it always have hardware acceleration

@susnux
Copy link
Contributor Author

susnux commented Jul 1, 2024

/backport to stable29

@susnux
Copy link
Contributor Author

susnux commented Jul 1, 2024

/backport to stable28

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@susnux with this pull request, most people will not see the visual effect of blurring (however it is achieved) anymore, as far as I understand? Which browsers is it default enabled and which default disabled for?

I was under the impression we would go for #45452 as an inbetween solution instead. cc @AndyScherzinger since removing blur will make stuff look less nice.

@marcoambrosini
Copy link
Member

If it's impossible to find a solution I would remove transparency + blur everywhere and work from there to achieve a nice design for everyone, without settings

@susnux
Copy link
Contributor Author

susnux commented Jul 1, 2024

I was under the impression we would go for #45452 as an inbetween solution instead. cc @AndyScherzinger since removing blur will make stuff look less nice.

Yes I hope we get this for Nextcloud 30. But we need a backportable solution for 28 and 29 as currently on those machines you can not use Nextcloud.
If you prefer I remove the autodetect part and only add the option switch.

For 30 we can then use @marcoambrosini solution

@susnux
Copy link
Contributor Author

susnux commented Jul 2, 2024

Which browsers is it default enabled and which default disabled for?

Currently in this PR:
✅ everything not Chromium based
✅ Chromium based on mobile
✅ Chromium based on MacOS
❌ Chromium based on Windows
❌ Chromium based on Linux

The first 3 never suffer the issue
For Windows and Linux it depends on your GPU driver

@marcoambrosini
Copy link
Member

we need a backportable solution

Got it

If you prefer I remove the autodetect part and only add the option switch

I think it's fine then to leave the autodetect on

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation @susnux in your comment #45395 (comment)

Then I agree with you we should get this in very soon to backport, and get Marco’s solution done for 30: #45452

@sorbaugh

@susnux susnux force-pushed the fix/blur-chromium branch from ce9eb83 to 40bbb5b Compare July 2, 2024 12:18
@susnux susnux requested a review from szaimen July 2, 2024 12:24
@susnux susnux force-pushed the fix/blur-chromium branch from 40bbb5b to 8c87589 Compare July 2, 2024 12:33
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works :)

However it is a bit weird to show this state by default which will first allow to disable it even though it is already disabled:
image

@susnux susnux force-pushed the fix/blur-chromium branch from 8c87589 to 0306418 Compare July 2, 2024 15:42
@susnux susnux dismissed marcoambrosini’s stale review July 2, 2024 20:21

we will use the new approach with Nextcloud 30

@susnux susnux merged commit e8c4374 into master Jul 2, 2024
165 checks passed
@susnux susnux deleted the fix/blur-chromium branch July 2, 2024 20:21
@szaimen
Copy link
Contributor

szaimen commented Jul 2, 2024

🎉🎉🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

scrolling in dashboard is laggy CSS blur filter seriously impacts performance in Chrome
8 participants