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

Support dark mode #76

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Support dark mode #76

merged 3 commits into from
Mar 22, 2024

Conversation

jhonatan-lopes
Copy link
Collaborator

@jhonatan-lopes jhonatan-lopes commented Feb 21, 2024

  • Replaces hardcoded colours for Wagtail-defined ones, except for $color-control and $color-variant
  • Defines the --w-color-secondary-100 (#00B0B1) as the control colour for dark theme
  • Adds support for dark theme

Fixes #62.

Results:

image

image

Chart:

image

image

Finished test:

image

image

Note: this PR targets Wagtail >=5.0 (when dark theme was introduced). When releasing a version with this patch, support for wagtail <5.0 should be dropped. Wagtail 4.1 LTS is EOL in a week (end of February) and devs are encouraged to migrate to 5.2 LTS.

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.44%. Comparing base (67945f9) to head (01be244).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   88.44%   88.44%           
=======================================
  Files          15       15           
  Lines         753      753           
  Branches      140      140           
=======================================
  Hits          666      666           
  Misses         51       51           
  Partials       36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Stormheg Stormheg self-requested a review February 26, 2024 00:23
Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

Thanks @jhonatan-lopes

Could you please include the create ab test form too? It has a couple bright areas in the headings. See the screenshot below.

image

I wouldn't bother with the help block at the bottom, the styling for that is provided by Wagtail. Wagtail appears to be missing dark mode styling for that

@jhonatan-lopes
Copy link
Collaborator Author

Hey @Stormheg, as we discussed, the "Create an A/B test" form is still using a template based on Wagtail 2.X which is not really great to work with in Wagtail >= 5.X.

I believe we should update how we use this template to be compatible with the new UI/UX instead of trying to change the colours here, as detailed in #79.

@jhonatan-lopes jhonatan-lopes requested a review from Stormheg March 20, 2024 21:28
@Stormheg Stormheg force-pushed the bugfix/62-support-dark-mode branch from 354fd7a to 01be244 Compare March 22, 2024 13:40
Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

Love it!

@Stormheg Stormheg merged commit 2f48af2 into main Mar 22, 2024
11 checks passed
@Stormheg Stormheg deleted the bugfix/62-support-dark-mode branch March 22, 2024 13:49
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.

Support Wagtail 5.0's dark mode
2 participants