Skip to content

fix(blog): improve responsive post layout#525

Merged
moshloop merged 2 commits into
mainfrom
fix-blog-css
Jul 15, 2026
Merged

fix(blog): improve responsive post layout#525
moshloop merged 2 commits into
mainfrom
fix-blog-css

Conversation

@adityathebe

@adityathebe adityathebe commented Jul 13, 2026

Copy link
Copy Markdown
Member

Refine blog typography, headers, cards, table of contents, and mobile layout.
Keep the author metadata and image updates together with the shared presentation changes.

image image image

Summary by CodeRabbit

  • New Features

    • Added table of contents support to blog posts, with responsive single-column layouts on smaller screens.
    • Introduced improved blog post page structure, including previous/next navigation and refined header presentation.
    • Added a new blog author profile.
  • UI Improvements

    • Updated blog cards, titles, author details, typography, code blocks, and spacing for a cleaner reading experience.
    • Improved mobile navigation, footer layout, tag wrapping, and responsive content sizing.
    • Cards now support optional borders and padding for more flexible presentation.

Refine blog typography, headers, cards, table of contents, and mobile layout. Keep the author metadata and image updates together with the shared presentation changes.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 13, 2026 11:01am

Request Review

@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for canarychecker canceled.

Name Link
🔨 Latest commit c3382ec
🔍 Latest deploy log https://app.netlify.com/projects/canarychecker/deploys/6a54c4d9c9c46e0007b4822c

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@adityathebe, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ef0b502-b2f1-41d5-a93c-554a90d8a584

📥 Commits

Reviewing files that changed from the base of the PR and between 0682a6e and c3382ec.

📒 Files selected for processing (4)
  • common/src/css/custom.css
  • common/src/theme/BlogPostItem/Header/Title/styles.module.css
  • common/src/theme/BlogPostItem/index.js
  • common/src/theme/BlogPostPaginator/index.js

Walkthrough

Changes

Blog layout and presentation

Layer / File(s) Summary
Card and blog list presentation
common/src/components/Card.jsx, common/src/theme/BlogPostItem/Card/index.js, common/src/theme/BlogPostItems/index.js, common/src/theme/TagsListInline/index.js
Cards support optional borders and padding; blog cards, list spacing, and tag wrapping are updated.
Article header and TOC layout
common/src/theme/BlogPostItem/Header/*, common/src/theme/BlogPostItem/Footer/index.js, common/src/theme/BlogPostItem/index.js, common/src/theme/BlogPostItem/styles.module.css
Blog headers vary by page type, article titles and authors receive revised spacing, and TOC layouts become responsive.
Blog page composition
common/src/theme/BlogPostPage/index.js
Adds blog page rendering with TOC generation, metadata, structured data, layout integration, and previous/next pagination.
Site styling and author metadata
common/src/css/custom.css, mission-control/blog/authors.yml, AGENTS.md, styles/ignore/words-with-suggestions.txt
Updates typography and mobile styling, adds an author entry, revises YAML guidance, and extends ignored terms.

Sequence Diagram(s)

sequenceDiagram
  participant BlogPostPage
  participant BlogPostProvider
  participant BlogPostPageContent
  participant BlogPostItem
  participant BlogLayout
  BlogPostPage->>BlogPostProvider: provide blog content
  BlogPostProvider->>BlogPostPageContent: render page content
  BlogPostPageContent->>BlogPostItem: pass children and optional TOC
  BlogPostPageContent->>BlogLayout: render article layout and sidebar
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main blog layout and responsive post rendering changes in the PR.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-blog-css
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix-blog-css

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (1)
common/src/theme/BlogPostItem/styles.module.css (1)

22-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider using media-feature range notation for stylelint compliance.

Stylelint flags @media (max-width: 996px) and prefers the range notation @media (width <= 996px). If the project enforces this rule, update the syntax. If Docusaurus conventions take precedence, this can be safely ignored.

🤖 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 `@common/src/theme/BlogPostItem/styles.module.css` at line 22, Update the
`@media` query in the BlogPostItem stylesheet to use range notation, replacing the
max-width feature with the equivalent width <= 996px syntax while preserving the
existing responsive styles.

Source: Linters/SAST tools

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

Inline comments:
In `@AGENTS.md`:
- Around line 24-25: Update the changed documentation text in AGENTS.md to
capitalize the acronym consistently as “YAML,” replacing both lowercase and
mixed-case variants while preserving the existing meaning.

In `@common/src/css/custom.css`:
- Around line 312-318: Replace the 100vw-based width and max-width declarations
in the .blog-post-page .theme-code-block selectors with container-relative 100%
values, preserving min-width: 0 so the code block and its nested elements remain
within the available ancestor width.

In `@common/src/theme/BlogPostItem/Header/styles.module.css`:
- Line 1: Rename the CSS module selectors to kebab-case: update .postHeader to
.post-header and .postInfo to .post-info in
common/src/theme/BlogPostItem/Header/styles.module.css at lines 1 and 10, and
update their references in Header/index.js to styles['post-header'] and
styles['post-info']. Rename .postTitle to .post-title in
common/src/theme/BlogPostItem/Header/Title/styles.module.css at line 5, and
update Title/index.js to use styles['post-title'].

In `@common/src/theme/BlogPostItem/Header/Title/styles.module.css`:
- Around line 5-13: Add a mobile media-query override for .title.postTitle so
its font size is reduced to the intended mobile value at screens up to 576px,
overriding the selector’s desktop 48px declaration while preserving the existing
desktop styling.

In `@common/src/theme/BlogPostItem/index.js`:
- Line 9: Remove the redundant “apply a bottom margin in list view” comment near
useContainerClassName, leaving the implementation unchanged.

In `@common/src/theme/BlogPostItem/styles.module.css`:
- Line 2: Replace the BlogPostItem width declaration using 100vw with a
100%-based width calculation so the element fits the visible container without
including scrollbar width, while preserving the existing 2rem spacing
adjustment.

In `@common/src/theme/BlogPostPage/index.js`:
- Around line 40-42: Remove the early return-null statement from
BlogPostPaginator so execution reaches and renders its existing nav JSX. Keep
the current nextItem/prevItem props and surrounding conditional rendering
unchanged.

---

Nitpick comments:
In `@common/src/theme/BlogPostItem/styles.module.css`:
- Line 22: Update the `@media` query in the BlogPostItem stylesheet to use range
notation, replacing the max-width feature with the equivalent width <= 996px
syntax while preserving the existing responsive styles.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9123085-a055-41ec-bc2d-1e12e7157b53

📥 Commits

Reviewing files that changed from the base of the PR and between a0d9dde and 0682a6e.

⛔ Files ignored due to path filters (2)
  • mission-control/static/img/aditya.jpg is excluded by !**/*.jpg
  • mission-control/static/img/flanksource/team/aditya-thebe.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • AGENTS.md
  • common/src/components/Card.jsx
  • common/src/css/custom.css
  • common/src/theme/BlogPostItem/Card/index.js
  • common/src/theme/BlogPostItem/Footer/index.js
  • common/src/theme/BlogPostItem/Header/Authors/index.js
  • common/src/theme/BlogPostItem/Header/Title/index.js
  • common/src/theme/BlogPostItem/Header/Title/styles.module.css
  • common/src/theme/BlogPostItem/Header/index.js
  • common/src/theme/BlogPostItem/Header/styles.module.css
  • common/src/theme/BlogPostItem/index.js
  • common/src/theme/BlogPostItem/styles.module.css
  • common/src/theme/BlogPostItems/index.js
  • common/src/theme/BlogPostPage/index.js
  • common/src/theme/TagsListInline/index.js
  • mission-control/blog/authors.yml
  • styles/ignore/words-with-suggestions.txt

Comment thread AGENTS.md
Comment thread common/src/css/custom.css
Comment thread common/src/theme/BlogPostItem/Header/styles.module.css
Comment thread common/src/theme/BlogPostItem/Header/Title/styles.module.css
Comment thread common/src/theme/BlogPostItem/index.js Outdated
Comment thread common/src/theme/BlogPostItem/styles.module.css
Comment thread common/src/theme/BlogPostPage/index.js
Code blocks used viewport-relative widths and post titles retained their desktop size on narrow screens, which could cause horizontal overflow. Use container-relative sizing and an equally specific mobile title override.

Restore the existing paginator navigation by removing its early null return, and remove the redundant list-margin comment.
@moshloop
moshloop merged commit cc1f3cc into main Jul 15, 2026
15 checks passed
@moshloop
moshloop deleted the fix-blog-css branch July 15, 2026 03:45
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