Skip to content

Conversation

@pharmacist-sabot
Copy link
Owner

@pharmacist-sabot pharmacist-sabot commented Feb 1, 2026

Summary by Sourcery

Refine blog post content and storytelling structure for the Rust ownership article while introducing new narrative UI components and terminal-style code block styling, alongside a small mobile layout tweak.

New Features:

  • Add NarrativeSection, PullQuote, and SideNote content components for richer article presentation and inline emphasis.
  • Introduce a terminal-inspired styling for code blocks with line numbers and mobile-friendly behavior.

Enhancements:

  • Rewrite and restructure the Rust ownership blog article to use new narrative and note components for clearer explanations and improved readability.
  • Adjust the blog post layout grid to use a minmax-based single-column layout on smaller screens for better mobile responsiveness.
  • Format the base layout footer and imports for improved readability and maintainability.

Build:

  • Register new content components in Astro auto-import configuration and add Shiki transformers dependency for enhanced code rendering.

Summary by CodeRabbit

  • New Features

    • Terminal-styled code block display with decorative header and visual indicators
    • New content components: NarrativeSection, PullQuote, and SideNote for richer article layout
    • Reorganized Rust ownership article with expanded, tutorial-style narrative and embedded content markers
  • Improvements

    • Enhanced typography and responsive layout adjustments for improved readability on smaller screens

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxdevnotes Ready Ready Preview, Comment Feb 1, 2026 7:06am

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 1, 2026

Reviewer's Guide

Refactors the Rust ownership blog post to use new narrative and content components, introduces new content presentation components and terminal-style code block styling, tweaks blog layout grid for better mobile behavior, and wires the new styles and components into the Astro config and base layout.

Class diagram for new content presentation components

classDiagram
  direction LR

  class NarrativeSection {
    <<AstroComponent>>
    +slot content
  }

  class PullQuote {
    <<AstroComponent>>
    +slot content
  }

  class SideNote {
    <<AstroComponent>>
    +type note|tip|warning
    +slot content
  }

  class BaseLayout {
    <<AstroLayout>>
    +title string
    +description string
    +imports terminal_css
  }

  class BlogPostLayout {
    <<AstroLayout>>
    +layout_grid minmax_0_1fr_on_mobile
  }

  class RustOwnershipPost {
    <<MDXContent>>
    +uses NarrativeSection
    +uses SideNote
    +uses PullQuote
  }

  class AstroConfigAutoImport {
    <<Config>>
    +register NarrativeSection
    +register SideNote
    +register PullQuote
  }

  RustOwnershipPost ..> NarrativeSection : uses
  RustOwnershipPost ..> SideNote : uses
  RustOwnershipPost ..> PullQuote : uses

  AstroConfigAutoImport ..> NarrativeSection : auto_imports
  AstroConfigAutoImport ..> SideNote : auto_imports
  AstroConfigAutoImport ..> PullQuote : auto_imports

  class terminal_css

  BaseLayout ..> terminal_css : imports
  BlogPostLayout ..> RustOwnershipPost : wraps
  BaseLayout ..> BlogPostLayout : wraps
Loading

File-Level Changes

Change Details Files
Rewrite the Rust ownership blog article content to use richer narrative flow and new presentation components.
  • Wrap the article body in a new NarrativeSection component for improved prose layout and typography.
  • Replace previous FeatureGrid, FeatureCard, InfoBox, Table, and CodeExplainer usages with inline prose, PullQuote, SideNote, and simpler code blocks.
  • Restructure sections and headings to emphasize conceptual flow: stack vs heap, ownership rules, String layout, move semantics, clone, Drop/Copy, function boundaries, references/borrowing, and summary.
src/content/blog/rust-ownership-memory-management/index.mdx
Introduce new presentational content components for narrative sections, pull quotes, and side notes.
  • Add NarrativeSection.astro to wrap article prose with constrained width and tuned typography.
  • Add PullQuote.astro for visually emphasized key statements, with desktop quote marks and mobile-adapted bordered style.
  • Add SideNote.astro for inline note/tip/warning callouts using icons and colored left borders, with responsive adjustments.
src/components/content/NarrativeSection.astro
src/components/content/PullQuote.astro
src/components/content/SideNote.astro
Register new content components and terminal code styling globally in the Astro configuration and base layout.
  • Register NarrativeSection, PullQuote, and SideNote components in astro.config.mjs for auto-import.
  • Import the new terminal.css stylesheet from BaseLayout so styles apply site-wide.
  • Minorly reformat BaseLayout props destructuring and footer markup for readability and multi-line attributes.
astro.config.mjs
src/layouts/BaseLayout.astro
Add terminal-style presentation and line-numbering for code blocks, tuned for mobile.
  • Override .prose pre styling to add a Mac-terminal-like header bar, traffic light controls, shadows, and padding while retaining Shiki theme compatibility.
  • Implement CSS-based line numbering for code lines using a .line wrapper, with responsive font-size and spacing adjustments for smaller screens.
  • Ensure terminal styling plays well with mobile by using full-width blocks and adjusted header dimensions on small viewports.
src/styles/terminal.css
Improve blog post layout grid behavior on tablet/mobile breakpoints.
  • Change the layout grid definition at <=1024px to use grid-template-columns: minmax(0, 1fr) to prevent overflow and ensure proper content shrinking.
  • Keep left and right sidebars stacking but with safer min/max constraints for small viewports.
src/layouts/BlogPostLayout.astro
Add dependency required for enhanced code block transformations.
  • Add @shikijs/transformers to package.json dependencies to support advanced Shiki-based code transformations.
  • Update the lockfile accordingly to reflect the new dependency graph.
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

@coderabbitai
Copy link

coderabbitai bot commented Feb 1, 2026

📝 Walkthrough

Walkthrough

Adds three new Astro content components (NarrativeSection, PullQuote, SideNote), a Shiki transformer dependency, terminal-style code block CSS, minor layout tweaks, and a substantial rewrite of a Rust ownership blog post to use the new components and prose-focused structure.

Changes

Cohort / File(s) Summary
New Content Components
src/components/content/NarrativeSection.astro, src/components/content/PullQuote.astro, src/components/content/SideNote.astro
Introduces three presentation components: NarrativeSection (typography-focused prose wrapper), PullQuote (styled blockquote with decorative marks), SideNote (inline aside with type variants and icons).
Configuration & Dependencies
astro.config.mjs, package.json
Added the three components to Astro auto-imports; added @shikijs/transformers ^3.21.0 to dependencies.
Blog Content
src/content/blog/rust-ownership-memory-management/index.mdx
Major rewrite: replaces compact bullets with narrative sections, embeds NarrativeSection/PullQuote/SideNote, reorganizes explanations (Stack vs Heap, Move semantics, borrowing) and updates examples.
Styling
src/styles/terminal.css
New terminal-themed styles for .prose pre including header bar, traffic-light indicators, per-line numbering, mobile adjustments, and Shiki compatibility neutralizations.
Layout Updates
src/layouts/BaseLayout.astro, src/layouts/BlogPostLayout.astro
BaseLayout: imported terminal.css and reformatted props/markup (presentational). BlogPostLayout: changed grid min column from 1fr to minmax(0, 1fr) for responsive behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A rabbit hops through prose and code,
Pull-quotes echo down the road,
Side notes peek with helpful light,
Terminal glow late at night,
Hooray — new components take the mode!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and concisely describes the main changes: adding three new content components (NarrativeSection, PullQuote, SideNote) and terminal-styled code block rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/technical-narrative

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

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

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

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src/styles/terminal.css:121-122` </location>
<code_context>
+}
+
+/* Shiki theme compatibility */
+.prose pre.shiki,
+.prose pre.shiki code {
+  background: unset !important;
+  color: unset !important;
</code_context>

<issue_to_address>
**issue:** Unsetting background on `.shiki` blocks may unintentionally override the terminal styling you just defined.

`.prose pre` gets the new dark terminal background, but `.prose pre.shiki, .prose pre.shiki code { background: unset !important; }` removes it for Shiki blocks, so they lose the terminal styling. If you only want to avoid Shiki’s own background, consider unsetting just `background-color` and drop `!important`, or only unset it on the `code` element so the `pre` terminal frame remains.
</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 on lines +121 to +122
.prose pre.shiki,
.prose pre.shiki code {
Copy link

Choose a reason for hiding this comment

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

issue: Unsetting background on .shiki blocks may unintentionally override the terminal styling you just defined.

.prose pre gets the new dark terminal background, but .prose pre.shiki, .prose pre.shiki code { background: unset !important; } removes it for Shiki blocks, so they lose the terminal styling. If you only want to avoid Shiki’s own background, consider unsetting just background-color and drop !important, or only unset it on the code element so the pre terminal frame remains.

Copy link

@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: 2

🤖 Fix all issues with AI agents
In `@package.json`:
- Line 22: Remove the unused dependency entry "@shikijs/transformers" from
package.json, ensure no files import or configure it (search for
"@shikijs/transformers" or any Shiki transformer references), then update the
lockfile by running your package manager install (e.g., npm/yarn/pnpm) so
package-lock.json/yarn.lock is regenerated and the dependency is fully removed
from the project.

In `@src/styles/terminal.css`:
- Around line 26-59: The CSS uses double-quoted strings in the pseudo-element
content properties (.prose pre::before and .prose pre::after); update those
content declarations to use single quotes ('RxDev Man' and '' respectively) to
satisfy Prettier/CI formatting rules and run the formatter to confirm no other
style issues remain.
🧹 Nitpick comments (2)
src/components/content/PullQuote.astro (1)

46-58: Consider adjusting the closing quote position.

The bottom: -1rem positions the closing quote mark outside the container, which could overlap with subsequent content depending on the surrounding layout's margins.

💡 Suggested adjustment
  .pull-quote::after {
    content: """;
    position: absolute;
-   bottom: -1rem;
+   bottom: 0.5rem;
    right: 1.5rem;
src/components/content/NarrativeSection.astro (1)

60-71: Consider specifying transition properties explicitly.

Using transition: all can cause unexpected animations and is less performant than specifying exact properties.

💡 More specific transition
  .narrative-section :global(a) {
    color: var(--brand-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
-   transition: all 0.2s ease;
+   transition: color 0.2s ease;
  }

@pharmacist-sabot pharmacist-sabot changed the title style: optimize mobile layout and enhance component aesthetics feat: add narrative, pull quote, and side note components with terminal styling Feb 1, 2026
@pharmacist-sabot pharmacist-sabot merged commit 4cbe3df into main Feb 1, 2026
9 of 10 checks passed
@pharmacist-sabot pharmacist-sabot deleted the feature/technical-narrative branch February 1, 2026 07:10
github-actions bot pushed a commit that referenced this pull request Feb 1, 2026
## [1.6.0](v1.5.0...v1.6.0) (2026-02-01)

### 🚀 New Features

* add narrative, pull quote, and side note components with terminal styling ([#8](#8)) ([4cbe3df](4cbe3df))
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant