Skip to content

docs: Refactor documentation to use Markdown with CSS-based components #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PrasadBhat4
Copy link

@PrasadBhat4 PrasadBhat4 commented Jul 22, 2025

📋 Overview

This PR enhances the documentation styling by overriding default Docusaurus component styles to achieve improved visual design and responsive behavior while maintaining the existing content
structure.

🔗 Related Issues

✨ Key Changes

🎨 Docusaurus Style Overrides

  • Override default Docusaurus admonition styles (info, note, tip, warning) with custom styling
  • Enhanced visual hierarchy with improved colors, spacing, and typography
  • Maintained semantic structure while improving visual presentation
  • Preserved all existing Docusaurus functionality

📱 Responsive Table Improvements

  • Enhanced table responsiveness across different screen sizes
  • Improved mobile experience with optimized padding and font sizes
  • Maintained original table content and structure
  • Added proper horizontal scrolling behavior on smaller screens

🌙 Dark Theme Support

  • Comprehensive dark theme styling for all overridden components
  • Consistent color variables across light and dark modes
  • Enhanced contrast and readability in both themes

🎯 Design System Consistency

  • Custom CSS properties for consistent theming throughout the documentation
  • Improved visual consistency across all admonition types
  • Better integration with existing site design language

📖 Content Preservation

  • All existing content remains unchanged
  • Maintained compatibility with existing Docusaurus features
  • No breaking changes to content structure or functionality

🔧 Technical Improvements

  • CSS-only approach for better performance
  • Reduced complexity by leveraging Docusaurus built-in components
  • Enhanced accessibility through improved contrast and spacing
  • Mobile-first responsive design approach

@PrasadBhat4 PrasadBhat4 requested a review from a team as a code owner July 22, 2025 12:03
Copy link
Contributor

coderabbitai bot commented Jul 22, 2025

Caution

Review failed

Failed to post review comments.

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89b3ae1 and 12d440a.

📒 Files selected for processing (1)
  • src/css/custom.css (6 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: aravindputrevu
PR: coderabbitai/coderabbit-docs#115
File: docs/about/features.md:72-72
Timestamp: 2024-10-24T10:08:27.858Z
Learning: In documentation files, ensure all markdown image tags follow SEO guidelines and maintain consistency across Docs Pull Requests.
Learnt from: NatoBoram
PR: coderabbitai/coderabbit-docs#125
File: CONTRIBUTING.md:60-65
Timestamp: 2024-10-31T17:01:26.168Z
Learning: In the `CONTRIBUTING.md` file, the user prefers to keep the "Keeping your Fork Up-to-Date" section concise without additional comments on Git commands.
🔍 MCP Research (1 server)

Linear: - CSS modules (e.g., YamlEditor.module.css) are used to encapsulate component styles, preventing global leakage and ensuring maintainability.

  • Dark/light themes rely on [data-theme="light"] attribute selectors and CSS variables for consistent, easily overridable theming across components and markdown elements.
  • Responsive design uses media queries targeting common breakpoints (768px, 480px) to adjust font sizes and layout, aligning with global site responsiveness.
  • Syntax highlighting in custom.css complements Ace Editor themes in YamlEditor.tsx, so reviewers should verify color/token consistency and absence of conflicting styles.
  • The shift from React components to CSS-based styling in docs emphasizes semantic HTML and reduces JS overhead, improving accessibility and performance; reviewers should ensure CSS fully supports this transition without regressions.
🔇 Additional comments (1)
src/css/custom.css (1)

629-636: Verify asset path points to the final build location

background-image: url("/static/img/Icons/Icons.png") references the static folder directly.
During the Docusaurus build the file will be emitted under /img/…, not /static/img/…, so the icon may 404 in production. Confirm the runtime path or use require("@site/static/img/Icons/Icons.png") in CSS-loader friendly code.

Walkthrough

This update introduces a new CSS module for the YAML editor with dark and light themes, enhances the YAML editor component by changing the Ace Editor theme and styling options, and significantly expands global CSS with extensive theming, responsive design, and custom styles for markdown elements, tables, admonitions, code blocks, and integration grids. No public APIs or exports were changed.

Changes

File(s) Change Summary
src/components/YamlEditor/YamlEditor.module.css Added new CSS module for YAML editor with dark/light themes, syntax highlighting, and responsive font adjustments.
src/components/YamlEditor/YamlEditor.tsx Switched Ace Editor theme to "terminal", removed strict YAML parsing, applied new CSS module classes and font settings, and cleaned up markup.
src/css/custom.css Major expansion: added CSS custom properties and comprehensive styles for markdown, tables, admonitions, code blocks, integration grids, dark mode, and responsive design.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant YamlEditor (TSX)
    participant AceEditor
    participant YamlEditor.module.css

    User->>YamlEditor (TSX): Open YAML editor
    YamlEditor (TSX)->>AceEditor: Render editor with "terminal" theme, custom options
    YamlEditor (TSX)->>YamlEditor.module.css: Apply theme-specific and responsive styles
    User->>AceEditor: Edit YAML content
    AceEditor->>YamlEditor (TSX): Trigger onChange event
    YamlEditor (TSX)->>AceEditor: Parse YAML (non-strict), update state
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Poem

A bunny hopped on CSS fields,
With themes both dark and light revealed.
Markdown tables, grids that glow,
YAML styled from head to toe.
Responsive tweaks for every screen—
The cleanest code you’ve ever seen!
🐇✨

Pre-Merge Checks (3 warnings)

❌ Failed Checks (3 warnings)
Check Name Status Explanation Resolution
Title Check ⚠️ Warning The title refers to refactoring documentation with Markdown and CSS‐based components, but the actual changes introduce a YAML editor component styling and extensive CSS theming, so it does not accurately reflect the content of this PR. Revise the pull request title to clearly describe the additions to the YamlEditor component and the new global CSS theming, for example: "feat(yaml-editor): add CSS module styling with dark/light themes and update global custom properties."
Description Check ⚠️ Warning The description focuses on converting .mdx to .md and HTML/CSS documentation changes but omits details about the new YamlEditor styling, AceEditor options, and global CSS custom properties added in this PR, and there is no PR template in the repository. Update the description to include a summary of the YamlEditor component updates, the new CSS custom properties and theming changes, the rationale and testing steps, and consider adding a PR template with standardized sections (Summary, Changes, Testing, Related Issues) to ensure consistency.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Impact Analysis

YAML editor theme and parsing behavior updated

📢 Medium 🔄 Impacts behavior

The YAML editor component now uses a custom CSS module for container and editor styling, switches the AceEditor theme from “github” to “terminal”, applies new monospace font settings, and removes the strict option from the YAML parser, making parsing less strict and altering error handling.

Verify that the new “terminal” theme and CSS module classes render correctly in both light and dark modes, ensure the font settings apply as expected, and review the impact of removing strict parsing on invalid YAML inputs.

Test the YAML editor in light and dark themes across supported browsers and screen sizes; verify syntax highlighting, cursor and selection styling, and confirm that formerly strict parse errors now succeed or fail appropriately.

🔍 Related Files
  • src/components/YamlEditor/YamlEditor.tsx
  • src/components/YamlEditor/YamlEditor.module.css

Extensive theming and responsive styling for markdown and UI components

📢 Medium 🔄 Impacts behavior

Added numerous CSS custom properties and style rules in custom.css to enhance dark/light mode support, restyle markdown elements (tables, blockquotes, admonitions, code blocks, integration grids), enforce responsive layouts, and adjust copy button icons and list styling site-wide.

Review the new CSS variable definitions and high-specificity selectors for conflicts or unintended overrides, and ensure media query breakpoints and theme toggles behave as intended.

Manually verify pages containing tables, blockquotes, admonitions, code samples, integration grids, and list sections in both light and dark themes and on mobile, tablet, and desktop widths to confirm visual consistency and responsiveness.

🔍 Related Files
  • src/css/custom.css

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@edgarcerecerez
Copy link
Collaborator

@jmacdotorg looks like this is still pending review, but does the updated architecture align with what you had in mind?

@PrasadBhat4 thank you for the quick turnaround! Would love to see a preview branch when possible. (no idea why it's not building, does it have to do with node.js CI failing?)

@PrasadBhat4
Copy link
Author

PrasadBhat4 commented Jul 23, 2025

@jmacdotorg looks like this is still pending review, but does the updated architecture align with what you had in mind?

@PrasadBhat4 thank you for the quick turnaround! Would love to see a preview branch when possible. (no idea why it's not building, does it have to do with node.js CI failing?)

Hi @edgarcerecerez ,

Thanks for your patience with the CI issues!

Regarding the error, this is a GitHub Actions permission issue with the qoomon/actions--create-commit@v1 action. The action is getting a 403 error because it lacks the necessary permissions to create git blobs in the repository which is why the preview link is broken.
@jmacdotorg should be able to help me with these issues.

@PrasadBhat4
Copy link
Author

Hi @edgarcerecerez ,

I noticed there's a duplicate page with the title "Control administrative access" appearing in 2 sections on the live site. Is this expected behavior, or should we consolidate these into a single page?

Just wanted to flag this in case it needs to be addressed as part of the documentation updates.

image

Thanks!

@PrasadBhat4
Copy link
Author

By overriding the custom CSS for the Docusaurus code blocks, I have successfully achieved the desired design implementation. I will push the changes after testing it. Please wait until I push the changes for your review.
@jmacdotorg

@edgarcerecerez
Copy link
Collaborator

I noticed there's a duplicate page with the title "Control administrative access" appearing in 2 sections on the live site. Is this expected behavior, or should we consolidate these into a single page?
Just wanted to flag this in case it needs to be addressed as part of the documentation updates.

Good catch @PrasadBhat4, looks like it's the same page but shows in two places in the ToC. You're right, we'll be addressing it as part of the ToC updates soon.

The first step is to get that design update live :)

cc: @jmacdotorg

@PrasadBhat4 PrasadBhat4 force-pushed the PrasadBhat4/configure-coderabbit-docs-improvements branch from 0998bd6 to d9ea05d Compare July 24, 2025 11:20
@PrasadBhat4
Copy link
Author

@jmacdotorg @edgarcerecerez

The PR is ready for review. I've implemented custom CSS overrides to modify the default Docusaurus stylings to achieve the desired design improvements.

Key Changes:

  • Maintained original content structure and appearance
  • Applied targeted CSS modifications to override Docusaurus defaults.

Here are the few screenshots for the components :

Note component:

image

Codeblock component

image

Table component

image

Warning component

image

Please check this for full component list

Components Screenshot

Components

Please review at your convenience. Thank you.

@edgarcerecerez
Copy link
Collaborator

This is so much cleaner. Great feedback @jmacdotorg ! 🙌

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