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: WDS color bgAccentSubtle (dark mode) #24043

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

ichik
Copy link
Contributor

@ichik ichik commented Jun 5, 2023

Description

tl;dr Changed from naive lighten and darken to a proper color-agnostic algos

Fixes #23870

Media

New on the left, current on the right

Screen.Recording.2023-06-05.at.12.15.14.mov

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (housekeeping or task changes that don't impact user perception)

How Has This Been Tested?

  • Manual

Test Plan

Initial POC refinement, no testing necessary

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

@ichik ichik added skip-changelog Adding this label to a PR prevents it from being listed in the changelog skip-testPlan WDS team labels Jun 5, 2023
@ichik ichik requested review from jsartisan and KelvinOm June 5, 2023 11:37
@ichik ichik self-assigned this Jun 5, 2023
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets Anvil Pod Issue related to Anvil project Bug Something isn't working and removed skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Jun 5, 2023
@@ -109,11 +113,19 @@ export class DarkModeTheme implements ColorModeTheme {
}

private get bgAccentSubtleHover() {
return this.bgAccentSubtle.clone().lighten(0.06);
const color = this.bgAccentSubtle.clone();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why don't we use the lighten function here?

Copy link
Contributor Author

@ichik ichik Jun 5, 2023

Choose a reason for hiding this comment

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

Not really useful. I'm likely gonna clean up the remains of it soon. Simple percentage-based lightness change doesn't quite work and also a bit buggy (clearest result is that if you add X% of lightness to black (0 lightness), the result is still black).

KelvinOm
KelvinOm previously approved these changes Jun 5, 2023
@KelvinOm KelvinOm force-pushed the fix/wds-color-bgaccentsubtlehover-darkmode branch from 21cc9b4 to ff25614 Compare June 7, 2023 13:14
@KelvinOm KelvinOm added skip-changelog Adding this label to a PR prevents it from being listed in the changelog skip-docs labels Jun 7, 2023
@KelvinOm KelvinOm merged commit fc295b4 into release Jun 7, 2023
@KelvinOm KelvinOm deleted the fix/wds-color-bgaccentsubtlehover-darkmode branch June 7, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil Pod Issue related to Anvil project Bug Something isn't working skip-changelog Adding this label to a PR prevents it from being listed in the changelog skip-docs WDS team Widgets Product This label groups issues related to widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: bgAccentSubtleHover invisible (dark mode)
2 participants