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

Add dark theme support to notifications #4971

Merged
merged 20 commits into from
Feb 13, 2024

Conversation

chillkang
Copy link
Contributor

@chillkang chillkang commented Feb 2, 2024

Done

  • add dark theme support to notifications with examples
  • add dark theme to body elements
  • update hightlight bars and icon colors with light, paper, and dark theme support

Fixes

QA

  • open demo for dark theme variants
  • open demo for light theme variants
  • change body class from is-dark to is-light or is-paper, and check if background of the page and text color change accordingly
  • compare demos with the design proposal below:
    image

Screenshots

Screenshot 2024-02-08 at 7 03 38 PM Screenshot 2024-02-08 at 3 06 53 PM

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4971.demos.haus

@chillkang chillkang marked this pull request as ready for review February 2, 2024 15:07
@chillkang chillkang added the Feature 🎁 New feature or request label Feb 5, 2024
@bartaz bartaz force-pushed the dark-theme branch 2 times, most recently from 3a52a96 to ab0b907 Compare February 5, 2024 12:12
@bartaz
Copy link
Member

bartaz commented Feb 5, 2024

@chillkang I talked with Lyubo about the status colours and we made a wrong assumption before (about using the tinted borders, as they are designed for different context).

So for notification colors we should use whatever notifications used before (semantic colors). Some of them have dark versions:

$color-negative-dark: #a11223 !default;
$color-positive-dark: #008013 !default;

So instead of exposing them as color-theme-border-positive etc, just expose them as color-theme-positive, etc.

Also, the "information" icon on dark theme needs to use proper color (whatever icons on dark are using, I think it's white, you can check icons component).

scss/_settings_colors.scss Outdated Show resolved Hide resolved
@bartaz bartaz deleted the branch canonical:main February 7, 2024 09:32
@bartaz bartaz closed this Feb 7, 2024
@bartaz bartaz reopened this Feb 7, 2024
@bartaz bartaz changed the base branch from dark-theme to main February 7, 2024 09:35
@chillkang chillkang force-pushed the add-dark-theme-to-notifications branch from 970936b to 9054bcd Compare February 7, 2024 11:12
@chillkang chillkang force-pushed the add-dark-theme-to-notifications branch from 9054bcd to 57296fe Compare February 8, 2024 11:23
Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Some small tweaks to code needed, but we are getting there! :)

scss/_patterns_notifications.scss Outdated Show resolved Hide resolved
@bartaz
Copy link
Member

bartaz commented Feb 12, 2024

Some differences noticed in Percy:

image

The meta data in bottom part should use muted text color (not default one), and action links should use link colour, not text colour.

Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Some small fixes needed for themed link color and standalone examples.

scss/_patterns_notifications.scss Outdated Show resolved Hide resolved
@bartaz bartaz added Review: Percy +1 and removed Review: Percy needed This PR needs a review of Percy for visual regressions labels Feb 13, 2024
Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Great, thanks a lot for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants