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

Invert header if primary is bright and background disabled #35666

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Dec 8, 2022

Fix #35664

  • Cypress testing for both admin and user use-cases

@skjnldsv skjnldsv added this to the Nextcloud 26 milestone Dec 8, 2022
@skjnldsv skjnldsv requested review from Pytal and a team December 8, 2022 08:48
@skjnldsv skjnldsv self-assigned this Dec 8, 2022
@skjnldsv skjnldsv requested review from PVince81 and szaimen and removed request for a team December 8, 2022 08:48
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@skjnldsv skjnldsv force-pushed the fix/header-bright-no-bg branch 2 times, most recently from c8031d3 to 4368706 Compare December 8, 2022 09:59
@@ -95,8 +95,10 @@ protected function generateGlobalBackgroundVariables(): array {
// If primary as background has been request or if we have a custom primary colour
// let's not define the background image
if ($backgroundDeleted) {
$variables['--color-background-plain'] = $this->themingDefaults->getColorPrimary();
$variables['--color-background-plain'] = $this->defaultPrimaryColor;
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is intentional.
We're in the admin section, we should use defaultPrimaryColor instead of primaryColor
If logged in, this var will be overruled below in the user section

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain their differences ?

Copy link
Member Author

@skjnldsv skjnldsv Dec 8, 2022

Choose a reason for hiding this comment

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

defaultPrimaryColor = admin defined, instance-wide
primaryColor = user, active for current session

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Dec 8, 2022
@skjnldsv skjnldsv merged commit 0dd128b into master Dec 8, 2022
@skjnldsv skjnldsv deleted the fix/header-bright-no-bg branch December 8, 2022 21:28
@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 8, 2022

Failure unrelated

And I see that the contact "user0" in the Contacts menu is not shown                                                      # ContactsMenuContext::iSeeThatTheContactInTheContactsMenuIsNotShown()
158 | Failed asserting that true is false.

@@ -132,14 +132,57 @@ describe('Remove the default background and restore it', function() {
})
})

describe.only('Remove the default background with a bright color', function() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
describe.only('Remove the default background with a bright color', function() {
describe('Remove the default background with a bright color', function() {

🙄

Copy link
Contributor

Choose a reason for hiding this comment

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

And now, everybody knows

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll take the walk of shame 🙈

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: theming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use primary colour for luminance calculations if background is disabled
4 participants