Skip to content

feat: polish documentation layout and add styles for improved UI#40

Open
srimon12 wants to merge 3 commits into
pavanjava:mainfrom
srimon12:feat/doc-ui-polish
Open

feat: polish documentation layout and add styles for improved UI#40
srimon12 wants to merge 3 commits into
pavanjava:mainfrom
srimon12:feat/doc-ui-polish

Conversation

@srimon12
Copy link
Copy Markdown
Collaborator

@srimon12 srimon12 commented May 21, 2026

Summary

Replaced the default Minima Jekyll theme with a custom dark-themed documentation layout for a polished, professional look.

Changes

  • Custom layout (docs/_layouts/default.html) — dark sidebar with navigation, GitHub/PyPI links, and active page highlighting
  • Custom stylesheet (docs/assets/css/style.css) — GitHub-dark inspired palette (#0d1117 background, #161b22 sidebar), responsive typography, styled tables, blockquotes, and code blocks
  • Syntax highlighting — highlight.js via CDN with github-dark theme and SQL language support
  • Copy-to-clipboard — every code block gets a "Copy" button that appears on hover
  • Front matter — added layout + title front matter to all 8 doc pages (getting-started, insert, search, filters, collections, scripts, programmatic, reference)
  • Removed theme: minima from _config.yml

Testing

  • Verify all doc pages render with sidebar nav and correct active state
  • Verify copy buttons work on code blocks
  • Verify responsive layout collapses sidebar on mobile

Summary by CodeRabbit

  • Documentation

    • Redesigned docs site with a left sidebar, dark theme, improved typography, responsive layout, and site-wide syntax highlighting with copy-to-clipboard for code blocks
    • Multiple docs updated to use the new layout for a consistent appearance
  • New Features

    • Added a healthcare conversation Retrieval-Augmented Generation example with setup, usage, and customization guidance

Review Change Stack

@srimon12 srimon12 requested a review from pavanjava May 21, 2026 14:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

This PR replaces the Minima Jekyll theme with a custom layout and dark stylesheet, adds front matter to docs to use the new layout, and adds a Healthcare Conversation RAG example README.

Changes

Documentation Site Redesign

Layer / File(s) Summary
Jekyll Configuration Update
docs/_config.yml
Removes the theme: minima setting so the site uses the custom layout and stylesheet.
Custom Layout Template with Code Interactivity
docs/_layouts/default.html
Adds a layout with fixed sidebar navigation (Liquid active-link classes), main content rendering, Highlight.js integration, and a client-side copy-to-clipboard button with success/failure feedback.
Dark-Themed Documentation Stylesheet
docs/assets/css/style.css
Adds a dark UI stylesheet covering sidebar layout, typography, code block presentation and copy button visuals, syntax token colors, tables, blockquotes, images, and responsive adjustments.
Documentation Front Matter Integration
docs/collections.md, docs/filters.md, docs/getting-started.md, docs/insert.md, docs/programmatic.md, docs/reference.md, docs/scripts.md, docs/search.md
Inserts layout: default and page title front matter into docs so pages render with the new layout and appear in navigation.
Healthcare Conversation RAG Example
examples_and_applications/healthcare_conversation_rag/README.md
Adds a README documenting a medical RAG example using QQL bulk INSERT, retrieval with SEARCH ... SIMILAR TO, setup, dataset creation, and customization points.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 In moonlit docs I tuck a new dark thread,
Sidebar hums softly while code blocks glow,
I stitch front matter pages, titles fed,
A RAG of healing notes now learns to show,
Hop in, press copy — the docs are good to go!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: polishing documentation layout and adding styles for improved UI, which directly matches the additions of custom layout, stylesheet, and theme replacement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

coderabbitai[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/_layouts/default.html (1)

61-95: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard Clipboard API availability and handle execCommand’s success return
Line 64 can throw synchronously when navigator.clipboard is missing (Clipboard API is secure-context dependent), so the fallback may never run. Line 79 ignores document.execCommand('copy')’s boolean return; use it to avoid showing “Copied!” when the copy command wasn’t successfully invoked (even though the boolean isn’t a perfect guarantee of clipboard contents).

Suggested patch
         btn.addEventListener('click', () => {
           const code = pre.querySelector('code');
           const text = code ? code.innerText : pre.innerText;
-          navigator.clipboard.writeText(text).then(() => {
+          const markCopied = () => {
             btn.textContent = 'Copied!';
             btn.classList.add('copied');
             setTimeout(() => {
               btn.textContent = 'Copy';
               btn.classList.remove('copied');
             }, 2000);
-          }).catch(() => {
+          };
+
+          const markFailed = () => {
             btn.textContent = 'Copy failed';
             btn.classList.add('copy-error');
             setTimeout(() => {
               btn.textContent = 'Copy';
               btn.classList.remove('copy-error');
             }, 2000);
           };
+
+          const fallbackCopy = () => {
             const ta = document.createElement('textarea');
             ta.value = text;
             ta.style.position = 'fixed';
             ta.style.opacity = '0';
             document.body.appendChild(ta);
             ta.select();
             try {
-              document.execCommand('copy');
-              btn.textContent = 'Copied!';
-              btn.classList.add('copied');
-              setTimeout(() => {
-                btn.textContent = 'Copy';
-                btn.classList.remove('copied');
-              }, 2000);
+              const copied = document.execCommand('copy');
+              if (copied) markCopied();
+              else markFailed();
             } catch (e) {
-              btn.textContent = 'Copy failed';
-              btn.classList.add('copy-error');
-              setTimeout(() => {
-                btn.textContent = 'Copy';
-                btn.classList.remove('copy-error');
-              }, 2000);
+              markFailed();
+            } finally {
+              document.body.removeChild(ta);
             }
-            document.body.removeChild(ta);
-          });
+          };
+
+          if (navigator.clipboard?.writeText) {
+            navigator.clipboard.writeText(text).then(markCopied).catch(fallbackCopy);
+          } else {
+            fallbackCopy();
+          }
         });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/_layouts/default.html` around lines 61 - 95, Guard against missing
Clipboard API before calling navigator.clipboard.writeText by checking for
navigator.clipboard and navigator.clipboard.writeText and wrap the async path in
try/catch so a synchronous exception can't bypass the fallback; in the fallback
path use the boolean return of document.execCommand('copy') to determine success
(only set "Copied!" and add 'copied' when execCommand returns true) and treat
false as a failure (set "Copy failed" and add 'copy-error'); ensure the textarea
(ta) is removed in all code paths. Reference: the click handler closure that
uses btn, navigator.clipboard.writeText, and document.execCommand('copy').
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/_layouts/default.html`:
- Around line 61-95: Guard against missing Clipboard API before calling
navigator.clipboard.writeText by checking for navigator.clipboard and
navigator.clipboard.writeText and wrap the async path in try/catch so a
synchronous exception can't bypass the fallback; in the fallback path use the
boolean return of document.execCommand('copy') to determine success (only set
"Copied!" and add 'copied' when execCommand returns true) and treat false as a
failure (set "Copy failed" and add 'copy-error'); ensure the textarea (ta) is
removed in all code paths. Reference: the click handler closure that uses btn,
navigator.clipboard.writeText, and document.execCommand('copy').

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 594e2d56-bf1c-4778-a533-55540f2b2470

📥 Commits

Reviewing files that changed from the base of the PR and between 61626cd and d57ce0a.

📒 Files selected for processing (6)
  • docs/_layouts/default.html
  • docs/assets/css/style.css
  • docs/collections.md
  • docs/reference.md
  • docs/search.md
  • examples_and_applications/healthcare_conversation_rag/README.md
✅ Files skipped from review due to trivial changes (4)
  • docs/reference.md
  • docs/collections.md
  • examples_and_applications/healthcare_conversation_rag/README.md
  • docs/search.md

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
docs/_layouts/default.html (1)

57-58: ⚡ Quick win

Consider adding an explicit aria-label for improved accessibility.

The copy button relies on its text content ("Copy") as the label, which works but could be more descriptive for screen reader users. Adding an explicit aria-label would clarify the button's purpose.

♿ Proposed enhancement for accessibility
 const btn = document.createElement('button');
 btn.className = 'copy-btn';
 btn.textContent = 'Copy';
+btn.setAttribute('aria-label', 'Copy code to clipboard');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/_layouts/default.html` around lines 57 - 58, The copy button created as
btn (class 'copy-btn') lacks an explicit aria-label; update the element creation
for btn to set a descriptive aria-label (e.g., "Copy code to clipboard" or
similar) using btn.setAttribute('aria-label', '...') or btn.ariaLabel so screen
readers get a clear purpose for the button while preserving existing text
content and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/_layouts/default.html`:
- Around line 57-58: The copy button created as btn (class 'copy-btn') lacks an
explicit aria-label; update the element creation for btn to set a descriptive
aria-label (e.g., "Copy code to clipboard" or similar) using
btn.setAttribute('aria-label', '...') or btn.ariaLabel so screen readers get a
clear purpose for the button while preserving existing text content and
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e230394b-5ab0-42f0-bd4d-f24340f9f4af

📥 Commits

Reviewing files that changed from the base of the PR and between d57ce0a and 072b874.

📒 Files selected for processing (1)
  • docs/_layouts/default.html

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.

1 participant