Skip to content

feat(docs): add vitepress-plugin-enhanced-readabilities - #31

Merged
JohnRichard4096 merged 4 commits into
mainfrom
feat-style
Jul 22, 2026
Merged

feat(docs): add vitepress-plugin-enhanced-readabilities#31
JohnRichard4096 merged 4 commits into
mainfrom
feat-style

Conversation

@JohnRichard4096

@JohnRichard4096 JohnRichard4096 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary by Sourcery

Integrate the Nolebase enhanced readability plugin into the VitePress docs theme and apply a refreshed AmritaSense visual design.

New Features:

  • Add Nolebase enhanced readabilities menu components to the VitePress layout for improved reading controls.
  • Introduce custom AmritaSense design tokens and UI styling for the docs site, including navigation, hero, code blocks, and content elements.

Enhancements:

  • Adjust navbar and sidebar dimensions to match the new layout design and visual hierarchy.
  • Configure VitePress vite and SSR options to properly handle the enhanced readabilities plugin and related UI dependencies.

@sourcery-ai

sourcery-ai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Integrates the @nolebase/vitepress-plugin-enhanced-readabilities into the docs site and reworks the VitePress theme to use AmritaSense-specific design tokens and UI styling for layout, navigation, buttons, home hero, and content elements.

Sequence diagram for rendering layout with enhanced readabilities menus

sequenceDiagram
  actor User
  participant DocsSite
  participant VitepressTheme as Theme.Layout
  participant DefaultLayout as DefaultTheme.Layout
  participant NavMenu as NolebaseEnhancedReadabilitiesMenu
  participant ScreenMenu as NolebaseEnhancedReadabilitiesScreenMenu

  User->>DocsSite: request docs page
  DocsSite->>VitepressTheme: render Layout()
  VitepressTheme->>DefaultLayout: h(DefaultTheme.Layout)
  VitepressTheme->>DefaultLayout: provide slot nav-bar-content-after
  DefaultLayout->>NavMenu: render NolebaseEnhancedReadabilitiesMenu
  VitepressTheme->>DefaultLayout: provide slot nav-screen-content-after
  DefaultLayout->>ScreenMenu: render NolebaseEnhancedReadabilitiesScreenMenu
  DefaultLayout->>User: send page with enhanced readabilities controls
Loading

File-Level Changes

Change Details Files
Introduce AmritaSense design tokens and restructure global theme variables for light/dark modes.
  • Replace prior minimal var.css with a comprehensive token set defining background, text, brand, border, shadow, code, custom block, nav, sidebar, and hero variables for light mode.
  • Add a dark-mode block overriding the same tokens for navy-based dark styling.
  • Retain and relocate medium-zoom overlay/image z-index utilities and social-links margin tweak under a utility section.
docs/.vitepress/theme/var.css
Redesign custom theme CSS to align VitePress UI with AmritaSense brand and improved readability.
  • Simplify and retune button styling, removing old animated gradients and adding solid brand/alt buttons with adjusted radius, weights, and hover effects.
  • Style navbar and sidebar with glass-like backgrounds, adjusted paddings, typography, and active/hover colors based on new tokens.
  • Rebuild the home hero section to full-viewport immersive layout with new padding, alignment, ambient glow, dot-grid overlay, and responsive typography.
  • Adjust features, code blocks, inline code, custom blocks, tables, scrollbar, focus ring, links, blockquotes, section headings, selection, and external link icon behavior to match the new design and readability goals.
  • Remove previous animation keyframes and gradient/float effects no longer needed with the new design.
docs/.vitepress/theme/custom.css
Extend the VitePress theme to render enhanced readabilities menus via the Nolebase plugin.
  • Switch from default export of DefaultTheme to exporting a custom Theme that extends DefaultTheme and customizes the Layout.
  • Use Vue h() to inject NolebaseEnhancedReadabilitiesMenu and NolebaseEnhancedReadabilitiesScreenMenu into nav-bar and nav-screen content slots.
  • Import the plugin client modules plus their CSS and @nolebase/ui base styles to ensure UI components are styled correctly.
docs/.vitepress/theme/index.ts
Configure VitePress/Vite to work with the enhanced readabilities plugin and adjust layout sizing.
  • Add vite.optimizeDeps.exclude entries for the Nolebase enhanced readabilities client, vitepress itself, and @nolebase/ui to avoid pre-bundling issues.
  • Add vite.ssr.noExternal entries for the Nolebase plugin and @nolebase/ui so they are bundled in SSR instead of treated as external.
  • Tweak palette.scss SASS variables for navbar height and sidebar width to match the new design (3.25rem navbar, 260px sidebar).
docs/.vitepress/config.mts
docs/.vitepress/styles/palette.scss
Add the enhanced readabilities plugin as a dev dependency and lockfile updates.
  • Declare @nolebase/vitepress-plugin-enhanced-readabilities in devDependencies with version ^2.18.2.
  • Update package-lock.json accordingly (dependency tree and resolution metadata).
package.json
package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying amritasense with  Cloudflare Pages  Cloudflare Pages

Latest commit: e757d9d
Status: ✅  Deploy successful!
Preview URL: https://5689a0df.amritasense.pages.dev
Branch Preview URL: https://feat-style.amritasense.pages.dev

View logs

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • In var.css you now rely on --vp-c-gray-* variables without defining them locally; consider either importing or redefining these gray tokens to avoid unexpected styling issues if VitePress changes its defaults.
  • Several colors in custom.css (e.g. button text #ffffff, gold accents) are hardcoded instead of using design tokens; aligning these with the variables in var.css would make future theme adjustments and brand updates easier.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `var.css` you now rely on `--vp-c-gray-*` variables without defining them locally; consider either importing or redefining these gray tokens to avoid unexpected styling issues if VitePress changes its defaults.
- Several colors in `custom.css` (e.g. button text `#ffffff`, gold accents) are hardcoded instead of using design tokens; aligning these with the variables in `var.css` would make future theme adjustments and brand updates easier.

## Individual Comments

### Comment 1
<location path="docs/.vitepress/theme/var.css" line_range="83-92" />
<code_context>
-  /* border-color: #d97706; */
-  border-color: var(--vp-c-yellow-2);
+  /* Status colors */
+  --vp-c-tip-1: #c8a454;
+  --vp-c-tip-2: #b3943a;
+  --vp-c-tip-3: #9a7d2e;
+
+  --vp-c-warning-1: #e6c17a;
+  --vp-c-warning-2: #d4a84d;
+  --vp-c-warning-3: #b89030;
+
+  --vp-c-danger-1: #e05555;
+  --vp-c-danger-2: #c44040;
+  --vp-c-danger-3: #a03030;
+
+  --vp-c-default-1: var(--vp-c-gray-1);
+  --vp-c-default-2: var(--vp-c-gray-2);
+  --vp-c-default-3: var(--vp-c-gray-3);
+  --vp-c-default-soft: var(--vp-c-gray-soft);
 }

</code_context>
<issue_to_address>
**issue (bug_risk):** Soft variants for tip/warning/danger status colors are no longer defined, which might break built-in VitePress theming that references them.

`--vp-c-tip-soft`, `--vp-c-warning-soft`, and `--vp-c-danger-soft` used to be defined and are referenced by VitePress core/themes for status block and badge backgrounds. With the new palette only `*-1/2/3` are present, so those references may resolve to unset values or defaults. Please add corresponding `*-soft` variants in `var.css`, aligned with the new status colors, to preserve VitePress compatibility.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread docs/.vitepress/theme/var.css
@JohnRichard4096
JohnRichard4096 merged commit 476a835 into main Jul 22, 2026
18 checks passed
@JohnRichard4096
JohnRichard4096 deleted the feat-style branch July 22, 2026 10:20
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