Skip to content

[dotnet] Apply selenium theme for docs#17190

Merged
nvborisenko merged 1 commit intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-docfx-theme
Mar 9, 2026
Merged

[dotnet] Apply selenium theme for docs#17190
nvborisenko merged 1 commit intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-docfx-theme

Conversation

@nvborisenko
Copy link
Member

Green style.

💥 What does this PR do?

This pull request introduces a new custom template for the Selenium .NET API documentation and updates links on the landing page to use YAML files. The changes primarily focus on enhancing the documentation's appearance and navigation.

Documentation theming:

  • Added the templates/selenium template to the docfx.json configuration, enabling the use of a custom Selenium-themed template for generated docs.
  • Introduced a new CSS file templates/selenium/public/main.css with custom color variables to match Selenium branding.

Navigation improvements:

  • Updated module links on the landing page (index.md) to reference .yml files instead of .html, improving navigation consistency with DocFX output.

🔄 Types of changes

  • Cleanup (formatting, renaming)

Copilot AI review requested due to automatic review settings March 8, 2026 11:09
@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Apply Selenium theme and update documentation links for .NET API docs

📝 Documentation ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Added custom Selenium theme CSS with green branding colors
• Integrated templates/selenium template into DocFX configuration
• Updated landing page links from .html to .yml file references

Grey Divider

File Changes

1. dotnet/docs/templates/selenium/public/main.css 📝 Documentation +8/-0

Add Selenium-themed CSS with green branding colors

• Created new CSS file with Selenium brand color variables
• Defined primary color as green (#43b02a) with RGB equivalents
• Set link and hover colors matching Selenium branding guidelines

dotnet/docs/templates/selenium/public/main.css


2. dotnet/docs/docfx.json ⚙️ Configuration changes +2/-1

Configure DocFX to use Selenium custom template

• Added templates/selenium to the template array in configuration
• Enables custom Selenium-themed template for API documentation generation

dotnet/docs/docfx.json


3. dotnet/docs/index.md 📝 Documentation +2/-2

Update landing page links to YAML file format

• Updated module links from .html to .yml file extensions
• Changed Selenium.WebDriver link reference format
• Changed Selenium.Support link reference format

dotnet/docs/index.md


Grey Divider

Qodo Logo

@selenium-ci selenium-ci added the C-dotnet .NET Bindings label Mar 8, 2026
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Mar 8, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. Theme CSS not applied 🐞 Bug ✓ Correctness
Description
The custom DocFX template only adds templates/selenium/public/main.css with CSS variable
overrides, but there’s no in-repo wiring proving that this file is actually loaded by the generated
HTML (vs merely being copied as a static asset). If DocFX’s base templates already ship a
main.css, using that generic filename also risks unintentionally replacing core styling instead of
layering overrides.
Code

dotnet/docs/templates/selenium/public/main.css[R1-8]

+:root {
+  --bs-primary: #43b02a;
+  --bs-primary-rgb: 67, 176, 42;
+  --bs-link-color: #43b02a;
+  --bs-link-color-rgb: 67, 176, 42;
+  --bs-link-hover-color: #369022;
+  --bs-link-hover-color-rgb: 54, 144, 34;
+}
Evidence
The build config enables the new template, but the template itself contains only a single static CSS
file with variable overrides. The repo’s DocFX config does not declare any metadata/hooks for adding
additional stylesheets, so whether this CSS takes effect depends entirely on DocFX template asset
conventions and potential filename collisions with the base templates (not shown in-repo). DocFX is
pinned to v2.78.4 in this repo, so behavior is deterministic but should be validated against that
version’s template loading/override rules.

dotnet/docs/docfx.json[30-59]
dotnet/docs/templates/selenium/public/main.css[1-8]
dotnet/private/docfx_repo.bzl[25-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The custom DocFX template currently only adds a `public/main.css` file. It’s not proven (from repo state) that this file is included by the generated HTML, and the generic name `main.css` risks unintended replacement of a base stylesheet if DocFX merges template assets by path.

## Issue Context
- DocFX build enables `templates/selenium` in `docfx.json`.
- The custom template contains only a single CSS file with Bootstrap variable overrides.
- DocFX is pinned to v2.78.4 in this repo.

## Fix Focus Areas
- dotnet/docs/docfx.json[49-58]
- dotnet/docs/templates/selenium/public/main.css[1-8]

## Suggested implementation direction
1. Rename the file to something unambiguous (e.g., `public/selenium.css`).
2. Ensure it is actually loaded by the pages:
  - Either by overriding the base template’s loaded stylesheet path (place your override at the exact same path/name the base template links to), OR
  - By adding the minimal template hook/override needed to inject an additional `<link>` to `selenium.css` after the base CSS.
3. Validate by building docs (`bazel run //dotnet:docs`) and confirming the generated HTML includes the stylesheet and the primary/link colors render as expected.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

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

Applies a Selenium-branded theme and updates module navigation for the Selenium .NET API docs, aligning the landing page links with DocFX’s API YAML inputs used during build.

Changes:

  • Adds a Selenium-themed DocFX template and primary/link color overrides via CSS variables.
  • Updates the docs landing page module links from .html to .yml.
  • Wires the new template into docfx.json so it participates in the DocFX build.

Reviewed changes

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

File Description
dotnet/docs/templates/selenium/public/main.css Introduces Selenium green branding via Bootstrap CSS custom properties.
dotnet/docs/index.md Switches module links to .yml to match DocFX API input resolution.
dotnet/docs/docfx.json Adds templates/selenium to the DocFX template chain.

@nvborisenko nvborisenko merged commit 8c8766c into SeleniumHQ:trunk Mar 9, 2026
24 of 25 checks passed
@nvborisenko nvborisenko deleted the dotnet-docfx-theme branch March 9, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants