-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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): Add migration to restore primary color after separating primary and background #47586
Conversation
/backport to stable30 |
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use IAppConfig
please :)
If it is fixed now, then I love to. It had a really bad bug that you cannot mix One recent place were we needed to fix this: #46991 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config key to check if repair step ran already is too ugly, please use a migration instead which by design run only once.
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
apps/theming/lib/Migration/SeparatePrimaryColorAndBackground.php
Outdated
Show resolved
Hide resolved
@come-nc I refactored this again, but we need to put parts of the migration into a background job. As we need to iterate a list of users which could take long if many users had custom backgrounds. I reused the logic from the So it is now working correctly for me: Screen recordingSetupBildschirmaufnahme_20240902_165334.webmAfter Upgrade to Nextcloud 30 / 31Please note the wrong colors in the beginning, I triggered the migration then and reload the page:
This is all fixed after the migration + background job ran: Bildschirmaufnahme_20240902_170942.webm |
Psalm is quite angry |
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…y and background Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…-query Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good
Summary
Not sure about the user color part, but at least it works 😅
Meaning not sure if that query would not take long on large instances.
Checklist