Skip to content

Invert header if primary is bright and background disabled - #35666

Merged
skjnldsv merged 1 commit into
masterfrom
fix/header-bright-no-bg
Dec 8, 2022
Merged

Invert header if primary is bright and background disabled#35666
skjnldsv merged 1 commit into
masterfrom
fix/header-bright-no-bg

Conversation

@skjnldsv

@skjnldsvskjnldsv commented Dec 8, 2022

Copy link
Copy Markdown
Member

Fix#35664

  • Cypress testing for both admin and user use-cases

@skjnldsvskjnldsv added this to the Nextcloud 26 milestone Dec 8, 2022
@skjnldsv
skjnldsv requested review from a team and PytalDecember 8, 2022 08:48
@skjnldsvskjnldsv self-assigned this Dec 8, 2022
@skjnldsv
skjnldsv requested review from PVince81 and szaimen and removed request for a teamDecember 8, 2022 08:48

@PVince81PVince81 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@skjnldsv
skjnldsvforce-pushed the fix/header-bright-no-bg branch 2 times, most recently from c8031d3 to 4368706CompareDecember 8, 2022 09:59
// let's not define the background image
if ($backgroundDeleted) {
$variables['--color-background-plain'] = $this->themingDefaults->getColorPrimary();
$variables['--color-background-plain'] = $this->defaultPrimaryColor;

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Collaborator

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 ?

@skjnldsvskjnldsvDec 8, 2022

Copy link
Copy Markdown
MemberAuthor

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

Comment threadapps/theming/lib/Controller/UserThemeController.php Fixed
Comment threadapps/theming/lib/Controller/UserThemeController.php Outdated
@skjnldsv
skjnldsvforce-pushed the fix/header-bright-no-bg branch from 6e2ee9a to 0cf7609CompareDecember 8, 2022 14:50
@skjnldsv
skjnldsv requested a review from artongeDecember 8, 2022 14:50
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv
skjnldsvforce-pushed the fix/header-bright-no-bg branch from 0cf7609 to 1acd42eCompareDecember 8, 2022 16:55
@skjnldsvskjnldsv 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 masterDec 8, 2022
@skjnldsv
skjnldsv deleted the fix/header-bright-no-bg branch December 8, 2022 21:28
@skjnldsv

Copy link
Copy Markdown
MemberAuthor

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.

})
})

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

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Collaborator

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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: theming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use primary colour for luminance calculations if background is disabled

5 participants

@skjnldsv@PVince81@artonge@Pytal@github-advanced-security