Skip to content

DOC-2212 Fix mobile nav visibility and chat panel positioning for standalone widgets#383

Merged
JakeSCahill merged 6 commits into
mainfrom
fix/standalone-widget-mobile-nav
May 28, 2026
Merged

DOC-2212 Fix mobile nav visibility and chat panel positioning for standalone widgets#383
JakeSCahill merged 6 commits into
mainfrom
fix/standalone-widget-mobile-nav

Conversation

@JakeSCahill
Copy link
Copy Markdown
Contributor

@JakeSCahill JakeSCahill commented May 28, 2026

Summary

  • Always show navbar-menu on standalone widget (no hamburger toggle needed)
  • Offset chat panel top by navbar height to avoid header overlap
  • Use html[data-theme="dark"] selector for Bump.sh dark mode compatibility

Test plan

  • Verify mobile API docs show Ask AI, Search, and theme toggle buttons
  • Verify chat drawer doesn't overlap with navbar header
  • Verify dark mode styling works on API docs pages

🤖 Generated with Claude Code

…idgets

- Always show navbar-menu on standalone widget (no hamburger toggle)
- Offset chat panel top by navbar height to avoid header overlap
- Use html[data-theme="dark"] selector for Bump.sh dark mode compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit ab2fb1f
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a18131f099e64000894e8d5
😎 Deploy Preview https://deploy-preview-383--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 32 (🟢 up 1 from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adjusts styling for fixed navbar integration and theme selector consistency. The navbar menu is changed from a toggle-style hamburger to an always-visible flex layout. The chat panel positioning is offset below the fixed navbar using CSS variables for height. Dark-mode styles are migrated across all chat panel and Kapa SDK UI components from the .dark-theme class selector to the html[data-theme="dark"] attribute selector, with equivalent styling values preserved throughout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • redpanda-data/docs-ui#380: Introduces the standalone chat panel bump widget (chat-panel-bump.hbs) whose layout and styling depend directly on these CSS updates.

Suggested reviewers

  • paulohtb6
  • micheleRP
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description check ✅ Passed The pull request description clearly outlines the three main objectives of the changes: always showing navbar-menu, offsetting the chat panel, and updating dark mode selectors. It directly corresponds to the changeset modifications.
Title check ✅ Passed The title clearly describes the main changes: fixing mobile nav visibility and chat panel positioning for standalone widgets, which directly correspond to the CSS modifications in both header-bump.css and chat-panel-bump.css.

✏️ 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 fix/standalone-widget-mobile-nav

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
Contributor

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

🤖 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 `@src/css/chat-panel-bump.css`:
- Around line 10-13: The chat panel currently uses only --navbar-height for top
and height calc; change both the top and height calc in the chat panel styles
(the rules that set top: and height: calc(...)) to use the full header stack
offset variable — e.g. replace references to var(--navbar-height, 70px) with
var(--header-stack-offset, var(--navbar-height, 70px)) so the panel is offset
when announcements are present; update both the top property and the height
calculation in the chat panel CSS rule accordingly.
🪄 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: c3ce2f3a-71b7-4fec-9426-18375d4e1d7c

📥 Commits

Reviewing files that changed from the base of the PR and between 4c84ba9 and 8a16829.

📒 Files selected for processing (2)
  • src/css/chat-panel-bump.css
  • src/css/header-bump.css

Comment on lines +10 to +13
top: var(--navbar-height, 70px);
right: 0;
width: 420px;
height: 100vh;
height: calc(100vh - var(--navbar-height, 70px));
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use full header stack offset for the chat panel position.

Line 10 and Line 13 only account for --navbar-height. The header stack can also include announcement offset (see src/css/header-bump.css Line 73 and Line 388), so this can still overlap in announcement-enabled layouts.

💡 Proposed fix
 .chat-panel {
   position: fixed;
-  top: var(--navbar-height, 70px);
+  top: var(--body-top, var(--navbar-height, 70px));
   right: 0;
   width: 420px;
-  height: calc(100vh - var(--navbar-height, 70px));
+  height: calc(100vh - var(--body-top, var(--navbar-height, 70px)));
   background: `#fff`;
   color: var(--grey-900-new, var(--grey-900, `#181818`));
   border-left: 1px solid var(--grey-100-new, var(--grey-100, `#e5e5e5`));
   box-shadow: -14px 0 40px -18px rgba(15, 23, 42, 0.18);
   display: flex;
   flex-direction: column;
   transform: translateX(100%);
   transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
   z-index: 120;
   font-family: var(--font-sans, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);
 }
+
+@media (min-width: 1025px) {
+  .chat-panel {
+    top: var(--body-top--desktop, var(--body-top, var(--navbar-height, 70px)));
+    height: calc(100vh - var(--body-top--desktop, var(--body-top, var(--navbar-height, 70px))));
+  }
+}
🤖 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 `@src/css/chat-panel-bump.css` around lines 10 - 13, The chat panel currently
uses only --navbar-height for top and height calc; change both the top and
height calc in the chat panel styles (the rules that set top: and height:
calc(...)) to use the full header stack offset variable — e.g. replace
references to var(--navbar-height, 70px) with var(--header-stack-offset,
var(--navbar-height, 70px)) so the panel is offset when announcements are
present; update both the top property and the height calculation in the chat
panel CSS rule accordingly.

JakeSCahill and others added 4 commits May 28, 2026 08:46
Invert the nav toggle icon on home/landing pages in light mode
since they have dark backgrounds where the dark icon is invisible.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reorder the "If you..." decision section to show Cloud option
before Self-Managed, matching the product card ordering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use CSS :has() selector to detect when nav-container is hidden
and adjust body margin-left and header left position to 0.
Added smooth transition for better UX.

Ref: DOC-2213

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JakeSCahill JakeSCahill force-pushed the fix/standalone-widget-mobile-nav branch from b3c36ab to 99418a1 Compare May 28, 2026 09:55
Increase max-width from 1280px to 1480px when sidebar is hidden,
allowing content to use more of the available horizontal space.

Ref: DOC-2213

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JakeSCahill JakeSCahill requested a review from a team May 28, 2026 10:06
@JakeSCahill JakeSCahill changed the title Fix mobile nav visibility and chat panel positioning for standalone widgets DOC-2212 Fix mobile nav visibility and chat panel positioning for standalone widgets May 28, 2026
@JakeSCahill JakeSCahill merged commit 3033b73 into main May 28, 2026
6 of 7 checks passed
@JakeSCahill JakeSCahill deleted the fix/standalone-widget-mobile-nav branch May 28, 2026 16:42
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