docs: Add dark mode background and logo visibility fixes to pdoc docs#806
Conversation
Co-Authored-By: AJ Steers <aj@airbyte.io>
Original prompt from AJ Steers |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes two dark mode rendering issues in the Python CDK API documentation: missing background color in the main content area and poor logo visibility due to dark-colored logo text on dark backgrounds.
Key Changes:
- Added dark mode CSS variables to
theme.cssfor proper content background and text colors - Implemented logo swapping in
custom.cssto display light-colored logo in dark mode
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/templates/theme.css | Added dark mode media query with background color and pdoc-specific CSS variables for improved readability |
| docs/templates/custom.css | Added dark mode logo swap to replace dark logo with light version for better visibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This CDK VersionYou can test this version of the CDK using the following: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1761006917-fix-dark-mode-docs#egg=airbyte-python-cdk[dev]' --help
# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1761006917-fix-dark-mode-docsHelpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
📝 WalkthroughWalkthroughDocumentation template CSS files updated to support dark mode styling. A media query for dark color scheme preferences is added to swap the logo and override CSS color variables, maintaining light theme for existing contexts. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
fix: Add dark mode background and logo visibility fixes to pdoc docs
Summary
Fixes two dark mode rendering issues in the Python CDK API documentation discovered after PR #804 merged:
logo-dark.png) which was nearly invisible on the dark backgroundChanges:
theme.css: Added@media (prefers-color-scheme: dark)block with--pdoc-background: #212529and dark mode color variables (based on pdoc's official dark-mode example)custom.css: Added logo swap using CSScontent: url()to replacelogo-dark.pngwithlogo-light.pngin dark modeDark mode detection: Automatic based on system/browser dark mode preference - no manual toggle.
Review & Testing Checklist for Human
content: url()works for logo swapTest Plan
Notes
content: url()which works in all modern browsers but may not work in very old browsers (acceptable trade-off for docs)Summary by CodeRabbit