Skip to content

[ACTV-277] Fix dark mode support in tours#1254

Merged
abdnh merged 2 commits intomainfrom
ACTV-277
Mar 5, 2026
Merged

[ACTV-277] Fix dark mode support in tours#1254
abdnh merged 2 commits intomainfrom
ACTV-277

Conversation

@abdnh
Copy link
Contributor

@abdnh abdnh commented Mar 4, 2026

Related issues

https://ankihub.atlassian.net/browse/ACTV-277?focusedCommentId=36626

Proposed changes

Fixes some issues identified during QA of the Step deck tour:

  • Fix dark mode support in tours.
  • Tweak the body of the step about suspended cards.

How to reproduce

Screenshots and videos

image image

abdnh added 2 commits March 4, 2026 19:56
I was under the impression that it was already working, but that was
apparently due to an Anki quirk when you switch theme without a restart

ankitects/anki#4482
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses issues with dark mode support in the application's interactive tours, ensuring a consistent visual experience for users with dark themes enabled. It also includes minor textual adjustments to a tutorial step for improved clarity, making the learning process more intuitive.

Highlights

  • Dark Mode Support: Improved dark mode compatibility for tours by correctly applying dark mode styles within the shadow DOM and removing conflicting CSS rules.
  • Tutorial Content Refinement: Updated the text for the 'suspended cards' step in the tutorial to bold key phrases, enhancing readability and clarity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • ankihub/gui/tutorial.py
    • Bolded 'Suspended cards' in the tutorial step description.
    • Bolded 'Next' button text in the tutorial step instructions.
  • ankihub/gui/web/lib/tutorial.css
    • Removed an explicit dark mode background color rule for active spotlight elements, allowing for more consistent theming.
  • scripts/build.py
    • Introduced build-time replacement of ':root' CSS selectors with ':host' to ensure styles apply correctly within shadow DOM contexts.
    • Added build-time replacement for the '.dark' class with ':host(.dark)' for proper dark mode styling within shadow DOM.
  • tutorial/lib/tutorial.css
    • Removed an explicit dark mode background color rule for active spotlight elements, aligning with the new dark mode strategy.
  • tutorial/lib/tutorial.ts
    • Implemented logic to add a 'dark' class to the tutorial's host element if the document is in 'night-mode', enabling proper dark theme application.
    • Removed client-side replacement of ':root' with ':host' in CSS, as this transformation is now handled during the build process.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@abdnh abdnh merged commit ddeb534 into main Mar 5, 2026
8 checks passed
@abdnh abdnh deleted the ACTV-277 branch March 5, 2026 14:22
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.

2 participants