Skip to content

Align top bar content with centered layout#74

Merged
justin808 merged 5 commits intomainfrom
jg/top-bar-width-fix
Apr 2, 2026
Merged

Align top bar content with centered layout#74
justin808 merged 5 commits intomainfrom
jg/top-bar-width-fix

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 2, 2026

Summary

  • Constrain navbar inner content to the same max width as page containers.
  • Constrain announcement bar content to the same max width while keeping top-bar backgrounds full width.

Testing

  • npm run build (fails in current repo state: invalid sidebar ids for missing docs deployment/capistrano-deployment and deployment/elastic-beanstalk)

Note

Low Risk
Mostly documentation navigation and CSS/asset tweaks; low chance of regressions beyond minor layout/visual changes or a missing image asset.

Overview
Updates the Docusaurus docs site navigation and branding. The Deployment sidebar now includes deployment/docker-deployment and drops the Elastic Beanstalk and Capistrano entries (fixing missing doc IDs).

Refines top-of-page styling by targeting the announcement bar via .theme-announcement-bar (instead of a broad attribute selector) and tweaks the homepage hero logo presentation: switches to /img/logo-mark-pro.png, adjusts the logo frame/box-shadow sizing, and updates the rendered image dimensions.

Written by Cursor Bugbot for commit b41a592. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Documentation

    • Updated deployment sidebar: Docker deployment guide added; Elastic Beanstalk and Capistrano guides removed.
  • Style

    • Tightened navbar content width and added horizontal padding for improved alignment.
    • Restyled announcement bar with more specific selectors, spacing, and link treatment.
    • Adjusted hero logo art and its surrounding frame for smaller, refined visual presentation.

The navbar and announcement text were rendering full-width while the rest of the page was container-constrained, which made the top section look misaligned. Constrain inner top-bar content to the same max width while keeping full-bleed backgrounds.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Walkthrough

Deployment sidebar entries were adjusted to include deployment/docker-deployment and remove deployment/elastic-beanstalk and deployment/capistrano-deployment. Navbar and announcement bar CSS were constrained with a new content max-width variable. The homepage hero logo size and image source were changed.

Changes

Cohort / File(s) Summary
Sidebar Navigation
prototypes/docusaurus/sidebars.ts
In the "Deployment" category, added deployment/docker-deployment and removed deployment/elastic-beanstalk and deployment/capistrano-deployment.
CSS Layout & Announcement Bar
prototypes/docusaurus/src/css/custom.css
Added --site-content-max-width; constrained .navbar__inner to that max width and centered it; replaced broad announcement bar selectors with .theme-announcement-bar and nested content width/padding rules.
Homepage Hero
prototypes/docusaurus/src/pages/index.module.css, prototypes/docusaurus/src/pages/index.tsx
Reduced hero logo frame and logo dimensions/styles in CSS; changed hero image source to /img/logo-mark-pro.png and updated rendered <img> attributes (width/height changed).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with nimble paws,

I swapped a doc and trimmed the gauze,
The bar sits centered, neat and tight,
The logo shrank to just-right light,
🥕 a tiny hop, a tidy sight.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Align top bar content with centered layout' accurately reflects the main change: constraining navbar and announcement bar content to a centered, max-width layout while keeping backgrounds full-bleed.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/top-bar-width-fix

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
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c3f24139f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +251 to +255
div[class*='announcementBarContent'] {
width: 100%;
max-width: var(--site-content-max-width);
margin: 0 auto;
padding: 0 var(--ifm-spacing-horizontal);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep close-button gutter in announcement bar

This override makes the announcement bar content use symmetric horizontal padding, but the site config enables a closeable bar (prototypes/docusaurus/docusaurus.config.ts, announcementBar.isCloseable: true), which needs extra right-side space for the dismiss control. Replacing the theme’s content spacing here can cause the long CTA text to run underneath or collide with the close button, especially on narrower viewports.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Cloudflare preview deployed.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Double horizontal padding on navbar from stacking
    • I confirmed the parent .navbar padding stacked with .navbar__inner padding on narrow viewports and fixed it by setting .navbar { padding: 0; } so navbar content aligns with page containers.

Create PR

Or push these changes by commenting:

@cursor push 93b11d059a
Preview (93b11d059a)
diff --git a/prototypes/docusaurus/src/css/custom.css b/prototypes/docusaurus/src/css/custom.css
--- a/prototypes/docusaurus/src/css/custom.css
+++ b/prototypes/docusaurus/src/css/custom.css
@@ -73,6 +73,7 @@
 /* ── Navbar ───────────────────────────────────────────────── */
 
 .navbar {
+  padding: 0;
   border-bottom: 1px solid var(--site-border);
   box-shadow: none;
 }

You can send follow-ups to this agent here.

The sidebar referenced deployment docs that no longer exist, which caused
> reactonrails-com@0.1.0 build
> npm --prefix prototypes/docusaurus run build

> reactonrails-site@0.0.0 build
> docusaurus build

[INFO] [en] Creating an optimized production build...
[webpackbar] ℹ Compiling Client
[webpackbar] ℹ Compiling Server
[webpackbar] ✔ Server: Compiled successfully in 518.96ms
[webpackbar] ✔ Client: Compiled successfully in 666.22ms
[SUCCESS] Generated static files in "build".
[INFO] Use `npm run serve` command to test your build locally. to fail before validating unrelated changes. Replace the stale ids with the current deployment doc id so the docs plugin can load.
Narrow announcement bar selectors to the stable container class so placeholder/close elements are no longer styled as full bars, which removes edge line artifacts. Also reduce hero logo/frame sizing to avoid upscaling the 64px source image.
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)
prototypes/docusaurus/src/pages/index.module.css (1)

29-40: Mobile breakpoint currently enlarges the logo relative to desktop.

After the base reduction here, Line 352-355 still increases logo size on max-width: 996px, which partially undoes the change.

♻️ Suggested follow-up diff (mobile sizing)
 `@media` (max-width: 996px) {
   .heroLogoFrame {
-    width: 4.8rem;
-    height: 4.8rem;
-    border-radius: 22px;
+    width: 4.5rem;
+    height: 4.5rem;
+    border-radius: 20px;
   }

   .heroLogo {
-    width: 3.7rem;
-    height: 3.7rem;
+    width: 3.2rem;
+    height: 3.2rem;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@prototypes/docusaurus/src/pages/index.module.css` around lines 29 - 40, The
mobile media query for max-width: 996px is still overriding the new base logo
reduction and enlarging the logo; update the rules inside that media query (the
selector targeting .heroLogo) to use the same reduced dimensions (width: 3.4rem;
height: 3.4rem) or a smaller value instead of increasing them, or remove the
overriding width/height there so the base .heroLogo size is preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@prototypes/docusaurus/src/pages/index.module.css`:
- Around line 29-40: The mobile media query for max-width: 996px is still
overriding the new base logo reduction and enlarging the logo; update the rules
inside that media query (the selector targeting .heroLogo) to use the same
reduced dimensions (width: 3.4rem; height: 3.4rem) or a smaller value instead of
increasing them, or remove the overriding width/height there so the base
.heroLogo size is preserved.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f1b1581-4d1f-44f1-9f54-3b57a1ed0c3a

📥 Commits

Reviewing files that changed from the base of the PR and between 927f89c and ce09718.

📒 Files selected for processing (4)
  • prototypes/docusaurus/sidebars.ts
  • prototypes/docusaurus/src/css/custom.css
  • prototypes/docusaurus/src/pages/index.module.css
  • prototypes/docusaurus/src/pages/index.tsx

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Announcement bar CSS selector targets nonexistent class
    • I replaced the dead .theme-announcement-bar selectors with div[class*='announcementBar'] selectors so the default Docusaurus announcement bar styles apply again.
  • ✅ Fixed: Sidebar references likely nonexistent docker deployment doc
    • I removed the nonexistent deployment/docker-deployment sidebar entry to prevent invalid sidebar doc ID build failures.

Create PR

Or push these changes by commenting:

@cursor push d23932ee20
Preview (d23932ee20)
diff --git a/prototypes/docusaurus/sidebars.ts b/prototypes/docusaurus/sidebars.ts
--- a/prototypes/docusaurus/sidebars.ts
+++ b/prototypes/docusaurus/sidebars.ts
@@ -149,7 +149,6 @@
       label: 'Deployment',
       items: [
         'deployment/README',
-        'deployment/docker-deployment',
         'deployment/heroku-deployment',
         'deployment/server-rendering-tips',
         'deployment/troubleshooting',

diff --git a/prototypes/docusaurus/src/css/custom.css b/prototypes/docusaurus/src/css/custom.css
--- a/prototypes/docusaurus/src/css/custom.css
+++ b/prototypes/docusaurus/src/css/custom.css
@@ -241,21 +241,21 @@
   background: var(--site-soft-surface);
   color: var(--ifm-color-content);
 }
-.theme-announcement-bar {
+div[class*='announcementBar'] {
   background: var(--site-soft-surface);
   border-bottom: 1px solid var(--site-border);
   font-size: 0.9rem;
   color: var(--ifm-color-content-secondary);
 }
 
-.theme-announcement-bar [class*='announcementBarContent'] {
+div[class*='announcementBar'] [class*='announcementBarContent'] {
   width: 100%;
   max-width: var(--site-content-max-width);
   margin: 0 auto;
   padding: 0 var(--ifm-spacing-horizontal);
 }
 
-.theme-announcement-bar a {
+div[class*='announcementBar'] a {
   color: var(--ifm-color-primary);
   font-weight: 600;
   text-decoration: underline;

You can send follow-ups to this agent here.

color: var(--ifm-color-content);
}
div[class*='announcementBar'] {
.theme-announcement-bar {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Announcement bar CSS selector targets nonexistent class

High Severity

The selector .theme-announcement-bar replaces the working div[class*='announcementBar'] but doesn't match any element in the DOM. Docusaurus's default AnnouncementBar uses CSS Modules, producing hashed class names like announcementBar_xxxx. Since the component isn't swizzled in src/theme/, no element will have the literal class theme-announcement-bar. All three rules using this selector become dead CSS, and the announcement bar loses its custom background, border, font sizing, content centering, and link styles.

Additional Locations (2)
Fix in Cursor Fix in Web

label: 'Deployment',
items: [
'deployment/README',
'deployment/docker-deployment',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sidebar references likely nonexistent docker deployment doc

High Severity

The PR removes deployment/elastic-beanstalk and deployment/capistrano-deployment from the sidebar because they reference missing docs that break the build. However, it adds deployment/docker-deployment, which also doesn't appear to exist — it's absent from both validation reports and no matching file is found anywhere in the repository. This likely introduces the same "invalid sidebar id" build failure the PR aims to fix.

Fix in Cursor Fix in Web

Replace the homepage hero mark source with the provided high-resolution PNG so the logo no longer appears blurry/aliased inside the hero frame.
Remove navbar and announcement content max-width overrides so top bars can span full width again, while keeping the scoped announcement selector fixes.
@justin808 justin808 merged commit e554be0 into main Apr 2, 2026
4 checks passed
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