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 adds Airbyte branding and styling to the PyAirbyte pdoc-generated documentation by creating a custom CSS template that incorporates Airbyte's design system. It also adds Vercel configuration for deploying the docs to a subdomain (py.airbyte.docs or similar).

Changes:

  • Created docs/templates/custom.css with Airbyte color scheme (#615eff purple), Inter font family, and styled components (tables, links, code blocks, etc.)
  • Updated docs/generate.py to use the new docs/templates directory
  • Added vercel.json configuration for Vercel deployment
  • Implemented both light and dark mode color schemes

Review & Testing Checklist for Human

⚠️ Important: I was unable to fully test the Vercel deployment or verify dark mode rendering.

  • Generate docs locally (poetry run poe docs-generate) and verify styling looks good across multiple documentation pages (not just index.html)
  • Test dark mode rendering - Open generated docs in a browser with dark mode enabled to ensure colors are readable
  • Verify Vercel deployment works - The vercel.json config is untested; build commands may need adjustment
  • Configure subdomain - The subdomain (py.airbyte.docs or py.docs.airbyte.com) needs to be configured separately in Vercel project settings or DNS
  • Check for CSS conflicts - Verify custom CSS doesn't break any existing pdoc functionality or create visual issues on different page types

Test Plan

# Generate docs locally
poetry run poe docs-generate

# Preview docs (open in browser)
python3 -m http.server 8765 --directory docs/generated
# Then visit http://localhost:8765

# Test in both light and dark mode
# Check various pages: index, module pages, class pages, etc.

Notes

Summary by CodeRabbit

  • New Features

    • Added custom documentation styling with Airbyte branding: color palette, dark-mode support, typography, and enhanced styles for code blocks, tables, navigation, badges, images, forms, and UI elements.
  • Chores

    • Improved documentation generation and deployment configuration for streamlined docs build and publish flow.
    • Minor tooling/config adjustment to ensure template handling works reliably.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

- Create custom CSS template with Airbyte color scheme and design elements
- Update pdoc configuration to use custom template directory
- Add Vercel configuration for deploying docs to py.airbyte.docs
- Apply Inter font family and Airbyte primary colors (#615eff)
- Style tables, links, code blocks, and other elements with Airbyte theme
- Support both light and dark mode color schemes

Co-Authored-By: AJ Steers <aj@airbyte.io>
@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
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1760992087-add-airbyte-branding-to-docs' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1760992087-add-airbyte-branding-to-docs'

Helpful Resources

PR Slash Commands

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

  • /fix-pr - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test-pr - Runs tests with the updated PyAirbyte

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-actions
Copy link

github-actions bot commented Oct 20, 2025

PyTest Results (Fast Tests Only, No Creds)

304 tests  ±0   304 ✅ ±0   4m 16s ⏱️ -17s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 530ca89. ± Comparison against base commit 1a3354d.

♻️ This comment has been updated with latest results.

- Override pdoc's --link and --link-hover variables directly
- Add comprehensive documentation about methodology and upstream sources
- Document how to update styles when Airbyte brand changes
- Reference main Airbyte docs CSS as source of truth
- Clean up redundant CSS rules that weren't working

Co-Authored-By: AJ Steers <aj@airbyte.io>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

📝 Walkthrough

Walkthrough

Adds Airbyte-branded pdoc templates and CSS, introduces Vercel deployment configuration, and changes a pdoc template path argument to a pathlib.Path in docs/generate.py; no public API or function signatures were modified.

Changes

Cohort / File(s) Summary
Deployment configuration
vercel.json
Added Vercel config: buildCommand = poetry install && poetry run poe docs-generate, outputDirectory = docs/generated, installCommand = pip install poetry && poetry config virtualenvs.create false, framework = null, trailingSlash = false.
Documentation styling (templates)
docs/templates/custom.css, docs/templates/theme.css
Added custom.css (Airbyte branding: Inter font, color tokens with light/dark variants, typography, overrides for pdoc components — nav, buttons, badges, code, tables, admonitions, responsive tweaks) and theme.css (pdoc theme color tokens and background variables).
Docs generator
docs/generate.py
Modified pdoc.render.configure call to pass template_directory as pathlib.Path("docs/templates") (Path object) instead of a string; no other behavioral or API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Would you like me to add a short note to the README documenting the Vercel buildCommand and outputDirectory to help future contributors, wdyt?

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "docs: Add Airbyte branding and styling to pdoc documentation" accurately and concisely summarizes the primary changes in the changeset. The most significant modifications across the PR are the new custom.css and theme.css stylesheets that implement Airbyte branding (colors, Inter font, styled components), along with the supporting updates to docs/generate.py to reference the new template directory and the vercel.json configuration for deployment infrastructure. The title captures the core intent without unnecessary noise, and it's specific enough that a teammate scanning history would understand the primary change is about applying Airbyte design tokens and branding to the pdoc documentation output.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1760992087-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: 1

🧹 Nitpick comments (3)
vercel.json (1)

2-2: Consider optimizing the build command to skip dev dependencies, wdyt?

The build installs all dependencies including dev dependencies. If the documentation generation doesn't require dev dependencies, you could speed up builds by using poetry install --only main or poetry install --no-dev.

Apply this diff if dev dependencies aren't needed:

-  "buildCommand": "poetry install && poetry run poe docs-generate",
+  "buildCommand": "poetry install --only main && poetry run poe docs-generate",
docs/templates/custom.css (2)

6-6: Heads up: External font dependency on Google Fonts, wdyt about self-hosting?

The CSS imports Inter font from Google's CDN, which adds an external dependency and privacy implications (Google tracks font requests). For a privacy-focused or offline-capable documentation site, consider self-hosting the fonts or using system fonts as a fallback.

If you prefer to self-host, you could download the font files and reference them locally:

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

40-65: The --color-white variable becomes dark gray in dark mode - intentional for theming?

On line 58, --color-white is set to hsl(0, 0%, 16%) (dark gray) in dark mode. While this might be intentional for inverting backgrounds (e.g., table headers, buttons), the variable name --color-white is semantically misleading when it holds a dark value.

Consider renaming it to something like --color-surface or --color-bg-primary to better reflect its purpose as a themeable surface color rather than a literal white. 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 1a3354d and 3e21fb6.

📒 Files selected for processing (3)
  • docs/generate.py (1 hunks)
  • docs/templates/custom.css (1 hunks)
  • vercel.json (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). (6)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (No Creds)
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (3)
docs/templates/custom.css (2)

177-190: Button text color may have the same dark mode contrast issue, wdyt?

Similar to the table headers, buttons use --airbyte-primary as background (line 178) and --color-white as text color (line 179). In dark mode, this results in light purple background with dark gray text, which might have contrast issues.

Consider using a color that guarantees sufficient contrast, or test the actual rendered output in dark mode as mentioned in the PR testing notes.


112-117: Verify color contrast in table headers for dark mode accessibility, wdyt?

Table headers use --airbyte-primary as the background (line 113) and --color-white as the text color (line 114). In dark mode, --airbyte-primary is #7976ff and --color-white becomes hsl(0, 0%, 16%) (dark gray). This combination might not meet WCAG contrast requirements.

Run the following script to check the contrast ratio:

docs/generate.py (1)

27-35: LGTM! Good use of pathlib.Path for consistency.

Converting template_directory to use pathlib.Path aligns with the other path handling in this file (lines 24 and 38) and is more explicit than using a string. This change properly configures pdoc to use the new custom.css template from the docs/templates directory.

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: 1

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

243-252: Mobile responsive design included.

Good to see a media query for smaller screens. Consider whether these breakpoints align with pdoc's expected responsive behavior, and whether additional breakpoints (e.g., 1024px for tablets) would benefit the documentation layout. 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 3e21fb6 and 108f975.

📒 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). (5)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (No Creds)
🔇 Additional comments (5)
docs/templates/custom.css (5)

1-30: Excellent upstream documentation.

The header comments clearly reference the source (Airbyte docs site, Docusaurus config) and outline the methodology for keeping styles in sync. This is helpful for future maintenance.


106-109: Verify pdoc output uses these class names.

The CSS targets .pdoc-code (line 200) and earlier references .badge (line 162), but I'm not certain these classes exist in pdoc's generated HTML. Wdyt—should these be verified against actual pdoc output to avoid dead code? If pdoc doesn't generate these classes, consider removing them or testing the generated docs to confirm.

Also applies to: 199-203


210-213: Subtle shadow improves visual hierarchy.

The box-shadow on main (0 2px 8px with low opacity) is a nice touch for depth without overwhelming the content.


111-150: Table styling is thorough and accessible.

Nice touch with the hover transition, rounded corners, and clear header styling. One thought: the hover background color change helps with row scanning on larger tables. Just ensure the contrast between var(--color-grey-40) and text meets WCAG standards, especially in dark mode where greys are reversed.


34-94: Verify dark mode color contrast and rendering.

The light and dark mode color palettes look comprehensive, but have you verified WCAG AA contrast ratios for text and interactive elements? For example, the primary purple (#615eff) on white or the lighter variants in dark mode. Also, the PR notes mention dark mode rendering wasn't fully tested—wdyt about verifying this with a browser dev tools inspection once docs are generated locally?

You can test locally with:

To check contrast ratios, reference WCAG guidelines or use tools like WebAIM Contrast Checker.

devin-ai-integration bot and others added 2 commits October 20, 2025 21:07
- Created custom theme.css to override pdoc's default color scheme
- Fixed nav link CSS to use correct --link variable with !important
- All links (nav and main content) now display in Airbyte purple (#615eff)
- Added documentation about CSS variable usage and maintenance

Co-Authored-By: AJ Steers <aj@airbyte.io>
GitHub Pages is already configured and working for documentation hosting,
so the Vercel configuration is not needed.

Co-Authored-By: AJ Steers <aj@airbyte.io>
@aaronsteers aaronsteers enabled auto-merge (squash) October 20, 2025 21:33
@github-actions
Copy link

PyTest Results (Full)

373 tests  ±0   357 ✅ ±0   20m 7s ⏱️ -1s
  1 suites ±0    16 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 530ca89. ± Comparison against base commit 1a3354d.

@aaronsteers aaronsteers merged commit 3ed5139 into main Oct 20, 2025
21 checks passed
@aaronsteers aaronsteers deleted the devin/1760992087-add-airbyte-branding-to-docs branch October 20, 2025 21:56
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