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

feat: add basic support for dark mode #70

Closed
wants to merge 25 commits into from
Closed

Conversation

kantord
Copy link
Member

@kantord kantord commented Jan 15, 2025

This PR

  • includes a bunch of required fixes to make dark themes work at all
  • adds a bunch of fixes to tailwind config that were completely broken
  • completely disables built in tailwind color schemes (not compatible with out approach to dark themes)
  • simplified CSS variable configuration
  • includes a script to generate tokens based on a set of base colors - for now there are only minimal adjustments to colors
  • in some cases, I adjusted the implementation slightly in order to fix things in a way that is realistically doable in a single PR - I think nothing looks too broken, but I will add more fixes in upcoming PRs
  • Adds a dark theme
  • For now, there is no way to manually switch between the dark theme on the website itself. I do plan to add this feature, but this PR is big enough as it is already. So for now the site adapts to the operating system setting for dark mode vs. light mode.
  • The current automatically generated color scheme feature is based on code that I copied from one of my personal projects. Later we can simply swap it out for a handcrafted color scheme
Record_select-area_20250115113138.mp4

Comment on lines +7500 to 7505
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz",
"integrity": "sha512-pK9VNiLE3QgGBrC/3ICAscwOLU7oTNeK2l32uqNAioBYtB2tQAfSsGDNChUlk7CP23126mc5lUt6+na9FlN8JA=="
},
"node_modules/mrmime": {
"version": "2.0.0",

Choose a reason for hiding this comment

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

Suggested change
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz",
"integrity": "sha512-pK9VNiLE3QgGBrC/3ICAscwOLU7oTNeK2l32uqNAioBYtB2tQAfSsGDNChUlk7CP23126mc5lUt6+na9FlN8JA=="
},
"node_modules/mrmime": {
"version": "2.0.0",
"node_modules/mout": {
"version": "0.11.1",
0.11.1
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/mout/-/mout-1.2.4.tgz",
"integrity": "sha512-mZb9uOruMWgn/fw28DG4/yE3Kehfk1zKCLhuDU2O3vlKdnBBr4XaOCqVTflJ5aODavGUPqFHZgrFX3NJVuxGhQ==",

Copy link

Minder Vulnerability Report ⚠️

Minder found vulnerable dependencies in this PR. Either push an updated version or accept the proposed changes. Note that accepting the changes will include Minder as a co-author of this PR.

Vulnerability scan of a166f99b:

  • 🐞 vulnerable packages: 1
  • 🛠 fixes available for: 1
Package Version #Vulnerabilities #Fixes Patch
mout 0.11.1 2 2 1.2.4

Summary of vulnerabilities found

Minder found the following vulnerabilities in this PR:
Ecosystem Name Version Vulnerability ID Summary Introduced Fixed
npm mout 0.11.1 GHSA-pc58-wgmc-hfjr Prototype Pollution in mout 0 1.2.3
npm mout 0.11.1 GHSA-vvv8-xw5f-3f88 Prototype Pollution in mout 0 1.2.4

Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

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

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: @adobe/leonardo-contrast-colors

Trusty Score: 0

Scoring details
Component Score
Package activity 6.9
Repository activity 6
User activity 7.8
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 21
Number of git tags or releases 36
Versions matched to tags or releases 16

📦 Dependency: apca-w3

Trusty Score: 0

Scoring details
Component Score
Package activity 4.4
Repository activity 2.5
User activity 6.3
Provenance unknown

📦 Dependency: chroma-js

Trusty Score: 0

Scoring details
Component Score
Package activity 7.5
Repository activity 6.6
User activity 8.3
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 62
Number of git tags or releases 55
Versions matched to tags or releases 28

📦 Dependency: ciebase

Trusty Score: 0

Scoring details
Component Score
Package activity 3.1
Repository activity 1.1
User activity 5.2
Provenance unknown

📦 Dependency: ciecam02

Trusty Score: 0

Scoring details
Component Score
Package activity 3.6
Repository activity 2.1
User activity 5.2
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 37
Number of git tags or releases 15
Versions matched to tags or releases 1

📦 Dependency: colorparsley

Trusty Score: 0

Scoring details
Component Score
Package activity 3.4
Repository activity 1.6
User activity 5.2
Provenance unknown

📦 Dependency: hsluv

Trusty Score: 0

Scoring details
Component Score
Package activity 6.4
Repository activity 5
User activity 7.8
Provenance unknown

📦 Dependency: mout

Trusty Score: 0

Scoring details
Component Score
Package activity 7.3
Repository activity 5.3
User activity 9.3
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 14
Number of git tags or releases 15
Versions matched to tags or releases 13

Copy link

@stacklok-cloud-staging stacklok-cloud-staging bot left a comment

Choose a reason for hiding this comment

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

Dependency Information

Minder analyzed the dependencies introduced in this pull request and detected that some dependencies do not meet your security profile.

📦 Dependency: @adobe/leonardo-contrast-colors

Trusty Score: 0

Scoring details
Component Score
Package activity 7
Repository activity 6
User activity 7.9
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 19
Number of git tags or releases 35
Versions matched to tags or releases 15
Alternatives
Package Score Description
color-difference 0

📦 Dependency: apca-w3

Trusty Score: 0

Scoring details
Component Score
Package activity 4.4
Repository activity 2.5
User activity 6.3
Provenance unknown
Alternatives
Package Score Description
wcag-contrast 0

📦 Dependency: chroma-js

Trusty Score: 0

Scoring details
Component Score
Package activity 7.5
Repository activity 6.7
User activity 8.3
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 62
Number of git tags or releases 55
Versions matched to tags or releases 28

📦 Dependency: ciebase

Trusty Score: 0

Scoring details
Component Score
Package activity 3.1
Repository activity 1.1
User activity 5.2
Provenance unknown

📦 Dependency: ciecam02

Trusty Score: 0

Scoring details
Component Score
Package activity 3.6
Repository activity 2.1
User activity 5.2
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 37
Number of git tags or releases 15
Versions matched to tags or releases 1

📦 Dependency: colorparsley

Trusty Score: 0

Scoring details
Component Score
Package activity 3.4
Repository activity 1.6
User activity 5.2
Provenance unknown

📦 Dependency: hsluv

Trusty Score: 0

Scoring details
Component Score
Package activity 6.4
Repository activity 5
User activity 7.8
Provenance unknown

📦 Dependency: mout

Trusty Score: 0

Scoring details
Component Score
Package activity 7.3
Repository activity 5.3
User activity 9.3
Provenance historical_provenance_match
Proof of Origin (Provenance)

This package can be linked back to its source code using a historical provenance map.

We were able to correlate a significant number of git tags and tagged releases in this package’s source code to versions of the published package. This mapping creates a strong link from the package back to its source code repository, verifying proof of origin.

Published package versions 14
Number of git tags or releases 15
Versions matched to tags or releases 13
Alternatives
Package Score Description
lodash 0
ramda 0

@coveralls
Copy link
Collaborator

coveralls commented Jan 15, 2025

Pull Request Test Coverage Report for Build 12786408281

Details

  • 1 of 46 (2.17%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.0%) to 64.325%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/scripts/generateColorTokens.js 0 45 0.0%
Totals Coverage Status
Change from base Build 12785610565: -4.0%
Covered Lines: 398
Relevant Lines: 545

💛 - Coveralls

@kantord kantord changed the title Support dark mode feat: add basic support for dark mode Jan 15, 2025
@alex-mcgovern
Copy link
Collaborator

As agreed offline, closing in favor of #80

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

Successfully merging this pull request may close these issues.

3 participants