Skip to content

Conversation

@aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Oct 20, 2025

docs: Add Airbyte branding and styling to pdoc documentation

Summary

This PR duplicates the Airbyte branding work from PyAirbyte#832 to the Python CDK's API documentation. It applies Airbyte's visual identity (purple #615eff color scheme, Inter font family) to the pdoc-generated docs by:

  1. Creating a docs/templates/ directory with custom CSS files:
    • theme.css: Overrides pdoc's default theme colors with Airbyte purple
    • custom.css: Comprehensive styling including fonts, tables, navigation, dark mode support
  2. Updating docs/generate.py to use the new templates directory

The CSS files include documentation explaining the methodology and where to find upstream style updates when Airbyte's brand guidelines change.

Before and After

Before (current published docs):
Current CDK Docs

After (with Airbyte branding):
Styled CDK Docs

Review & Testing Checklist for Human

  • Visual Review: Compare the before/after screenshots above - verify the purple links, Inter font, and overall styling look correct
  • Build Verification: Run poe docs-generate locally to ensure docs still build successfully with the new template path
  • Deployment Check: After merging, verify that GitHub Pages deployment completes successfully and the published docs at https://airbytehq.github.io/airbyte-python-cdk/ display with the new styling
  • Dark Mode Testing: Toggle dark mode in your browser and verify the dark mode CSS looks good (I did not thoroughly test this)
  • Cross-Browser Check (optional): Test in Firefox/Safari to ensure CSS compatibility - I only tested in one browser

Notes

Summary by CodeRabbit

  • Documentation
    • Updated documentation styling with a new color scheme and typography system.
    • Enhanced visual appearance of code blocks, tables, and navigation elements.
    • Added dark mode support and improved responsive design for smaller viewports.

This commit adds custom CSS styling to the Python CDK API documentation
to match the Airbyte brand identity:

- Created custom theme.css to override pdoc's default theme with Airbyte colors
- Created custom.css with comprehensive Airbyte branding (purple #615eff, Inter font)
- Updated docs/generate.py to use the custom templates directory
- Added documentation explaining the styling methodology and upstream sources

The styling includes:
- Airbyte purple color scheme for links and accents
- Inter font family (Airbyte's brand font)
- Styled tables with purple headers
- Dark mode support
- Comprehensive documentation about maintenance and updates

This matches the styling already applied to PyAirbyte's documentation.

Co-Authored-By: AJ Steers <[email protected]>
Copilot AI review requested due to automatic review settings October 20, 2025 21:44
@devin-ai-integration
Copy link
Contributor

Original prompt from AJ Steers
@Devin - in PyAirbyte, can you see if you are able to neatly import styling and branding elements from the main airbyte docs site into the auto generated pdoc docs there?
Thread URL: https://airbytehq-team.slack.com/archives/D089P0UPVT4/p1760991675003959?thread_ts=1760991675.003959

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the docs label Oct 20, 2025
@github-actions
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This CDK Version

You 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/1760996377-add-airbyte-branding-to-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/1760996377-add-airbyte-branding-to-docs

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Airbyte's brand identity to the Python CDK's pdoc-generated API documentation by creating custom CSS files that apply Airbyte's purple color scheme (#615eff), Inter font family, and styled components matching the main Airbyte documentation site.

Key changes:

  • Created custom CSS files with Airbyte branding (purple colors, Inter font, styled tables with rounded corners)
  • Added comprehensive inline documentation about maintenance and upstream sources
  • Updated docs generation to use the new template directory

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/templates/theme.css Overrides pdoc's default color variables with Airbyte purple theme
docs/templates/custom.css Comprehensive custom styling including fonts, tables, dark mode, and interactive elements
docs/generate.py Updates template directory path to use new docs/templates location

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Updates pdoc configuration to use a pathlib.Path for the template directory and adds two Airbyte-branded CSS files under docs/templates to provide theme tokens and comprehensive documentation styling.

Changes

Cohort / File(s) Summary
Config
docs/generate.py
Switched pdoc template directory from a plain string to pathlib.Path("docs/templates") (resolves templates via a Path object).
Theme tokens
docs/templates/theme.css
New CSS file defining Airbyte color tokens and base .pdoc color mappings.
Custom styling
docs/templates/custom.css
New comprehensive CSS for typography, code blocks, tables, navigation, inputs, badges, responsive tweaks, and dark-mode adjustments to align docs with Airbyte branding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Wdyt about adding a brief comment or README in docs/templates/ documenting the expected template path and whether a CSS normalize/reset should be included for cross-browser consistency?

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "docs: Add Airbyte branding and styling to pdoc documentation" clearly and accurately summarizes the main change in the changeset. The pull request's core objective is to apply Airbyte's visual identity to the pdoc-generated API documentation by adding new CSS files (theme.css and custom.css) and updating the generate.py configuration. The title is concise, specific, and uses a conventional "docs:" prefix that makes it easy for teammates scanning history to immediately understand that documentation styling improvements are being introduced. The title avoids vague terms and directly communicates the primary intent without unnecessary noise.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1760996377-add-airbyte-branding-to-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/templates/theme.css (1)

1-22: Consider consolidating duplicated CSS variables?

I notice that this file defines CSS variables in the .pdoc selector (lines 6-22) that are also defined in custom.css (lines 61-69). Specifically, these variables appear in both files: --link, --link-hover, --code, --accent, --text, --name, and --def.

While the values are identical (so no conflict), this duplication could make maintenance harder. If Airbyte brand colors change, you'd need to update both files. Wdyt about consolidating these into a single source of truth? Perhaps keep theme.css as the token definitions and have custom.css reference them, or vice versa?

docs/templates/custom.css (2)

32-32: Consider optimizing font loading for performance?

The Google Fonts import includes 6 font weights (200, 300, 400, 500, 600, 700), which means 6 separate font file downloads. This can impact page load performance, especially on slower connections.

Could you verify which weights are actually used in the documentation? Typically, 2-3 weights (e.g., 400, 600) are sufficient for most UIs. Also, consider adding &display=swap to the font URL to prevent FOIT (Flash of Invisible Text) during loading.

Example optimization:

-@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&display=swap");
+@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");

Wdyt?


252-260: Consider expanding responsive styling for mobile?

The responsive adjustments for tablet/mobile are a good start. However, for very small screens (<480px), you might want to consider additional adjustments like:

  • Adding horizontal scroll for tables (tables can be hard to read on small screens)
  • Adjusting padding/spacing further
  • Potentially stacking certain elements

Wdyt about enhancing mobile responsiveness in a follow-up? For now, the current implementation is acceptable.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73ec055 and 7c0c5c7.

📒 Files selected for processing (3)
  • docs/generate.py (1 hunks)
  • docs/templates/custom.css (1 hunks)
  • docs/templates/theme.css (1 hunks)
🔇 Additional comments (6)
docs/templates/custom.css (5)

72-102: Dark mode implementation looks solid!

The dark mode support using prefers-color-scheme is well-implemented. The color adjustments for dark mode look reasonable, and I appreciate that you're updating both :root and .pdoc variables for consistency.


224-235: Excellent accessible focus styling!

Great job providing custom focus styles with a visible focus ring (box-shadow) after removing the default outline. This maintains accessibility while matching the Airbyte brand. The 3px focus ring with the lightest purple shade is both visible and on-brand.


1-30: Outstanding documentation! 🎉

The comprehensive header comments are exemplary. You've clearly documented:

  • Methodology and design sources
  • Upstream sync points for future updates
  • pdoc integration details
  • Key variables to maintain

This will make maintenance and updates much easier for future developers. Really appreciate the thorough approach here!


160-167: Verification confirms minimal !important usage—this is acceptable for third-party library overrides.

The search confirms these are the only two !important declarations in your CSS files, both for navigation styling and clearly documented. Using !important to override third-party library (pdoc) defaults is a standard pattern and perfectly reasonable here.

That said, if you'd like to explore alternatives, increasing selector specificity (e.g., .pdoc nav a) might work and could be more maintainable long-term if you want to test it. Wdyt?


119-158: Table styling is accessible!

Great news—the contrast verification confirms your table headers pass WCAG AA standards with a ratio of 4.61:1 (exceeding the 4.5:1 requirement). The purple (#615eff) and white combination provides solid accessibility for users with visual impairments.

The entire table styling implementation looks solid: rounded corners, semantic markup, smooth hover effects, and now verified accessibility. No changes needed!

docs/generate.py (1)

68-68: Approved: pathlib.Path usage is correct and fully supported by pdoc.

The change from string to pathlib.Path("docs/templates") is solid. I verified that pdoc.render.configure() accepts pathlib.Path objects for the template_directory parameter, and the template files are in place. This is more robust and idiomatic Python.

@github-actions
Copy link

PyTest Results (Fast)

3 802 tests  ±0   3 790 ✅ ±0   6m 35s ⏱️ -1s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 7c0c5c7. ± Comparison against base commit 73ec055.

@aaronsteers
Copy link
Contributor Author

Devin, please address the copilot feedback.

…irbyte

Addresses Copilot feedback - the custom.css file is for the Python CDK
documentation, not PyAirbyte documentation.

Co-Authored-By: AJ Steers <[email protected]>
@devin-ai-integration
Copy link
Contributor

Both Copilot comments have been addressed:

  1. ✅ Updated the CSS header comment to say "Python CDK Documentation" instead of "PyAirbyte Documentation"
  2. ✅ Verified that pathlib is already imported in docs/generate.py (line 18)

Changes pushed in commit 9f10de5.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/templates/custom.css (1)

119-260: Table, button, input, and responsive styles are well-executed.

Tables have nice rounded corners and header styling with hover effects, buttons use brand colors with smooth transitions, and search inputs include accessible focus states. The responsive adjustments look good, though I notice only a single breakpoint at 768px. Is that intentional, or could smaller mobile viewports (e.g., 480px) benefit from additional adjustments? No blocker here—just curious about your approach, wdyt?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0c5c7 and 9f10de5.

📒 Files selected for processing (1)
  • docs/templates/custom.css (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build
🔇 Additional comments (3)
docs/templates/custom.css (3)

1-30: Past copilot feedback successfully addressed.

The file header comment correctly identifies this as "Python CDK Documentation - Custom Styling" and provides excellent guidance on methodology and maintenance (referencing upstream Airbyte sources and key variables to sync). Well done!


32-102: Color variables and dark mode support are well-structured.

The CSS variables are cleanly organized with proper scoping to :root and .pdoc, and the dark mode inverts appropriately. One small note: per the PR objectives, dark mode support "not thoroughly tested"—would you like me to generate a verification script to help validate the dark mode color contrasts and readability?


160-167: Question about !important usage for nav styling.

Lines 162 and 166 use !important to override pdoc's nav default styles. While pragmatic, this can complicate future maintenance. Have you explored whether a higher-specificity selector (e.g., .pdoc nav a or a more specific path) could achieve the same result without !important? If !important is truly necessary here, a brief comment explaining why pdoc's defaults are hard to override would help future maintainers. Wdyt?

@aaronsteers aaronsteers merged commit 6b747fe into main Oct 20, 2025
21 checks passed
@aaronsteers aaronsteers deleted the devin/1760996377-add-airbyte-branding-to-docs branch October 20, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants