Change product switcher to neutral background with colored icon chip#385
Conversation
Updates the sidebar product switcher from a full component-colored background to a neutral background with only the icon chip showing the component color. This provides a cleaner, less visually heavy appearance while still maintaining component identification. Changes: - Neutral semi-transparent background instead of full component color - Icon chip now displays the component color - Updated hover and active states for both light and dark themes - Improved text contrast in both themes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR updates the documentation site UI across layout, navigation, and product switcher components. Back-to-top button positioning is adjusted upward to avoid overlapping pagination, with additional mobile refinement. Sidebar footer navigation receives a more specific CSS selector fix to ensure the collapse toggle remains visible. The product switcher undergoes a visual redesign: background and border styling shifts from brightness filtering to transparent RGBA values with explicit transitions, the previously hidden product chip becomes visible with SVG icon support, text colors update across multiple label components, and light theme overrides switch to CSS variables and Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Add inline SVG icons to all product chip elements: - Agentic Data Plane: brain/AI icon - Data Platform: database icon - Cloud: cloud icon - Self-Managed: server icon - Streaming: waveform icon - Connect: connector icon - Generic/Labs: book icon Icons appear in both the current product button and the dropdown menu options. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move the .sb-collapse-toggle override from desktop-only media query to a global rule so the sidebar collapse button is visible on all screen sizes, not just desktop. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit space between "?" and the link to prevent HTML whitespace collapsing from removing the space. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Increase bottom position of back-to-top button from 24px to 100px to prevent it from overlapping the pagination Next button at the bottom of pages. Add mobile media query with 120px bottom position for extra clearance on smaller screens. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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/product-switcher.css`:
- Around line 48-51: The global rule ".sb-product-chip svg { width: 16px;
height: 16px; }" forces all SVGs to 16px and conflicts with the smaller dropdown
chip sizes (10/8/6px); update the CSS so the 16px sizing is scoped to
non-dropdown chips (for example target a specific modifier or direct child like
".sb-product-chip:not(.sb-product-chip--dropdown) svg" or use a more specific
selector for the main chip) and ensure dropdown selectors (the rules that set
10/8/6px) explicitly override or set their own sizes, or alternatively make the
SVG sizing responsive by using max-width:100%/height:auto so dropdown chips can
control their own dimensions.
🪄 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: 334f987b-bc63-4420-b232-ddf4562e300f
📒 Files selected for processing (5)
src/css/doc.csssrc/css/nav.csssrc/css/product-switcher.csssrc/partials/algolia-script.hbssrc/partials/product-switcher.hbs
| .sb-product-chip svg { | ||
| width: 16px; | ||
| height: 16px; | ||
| color: #fff; |
There was a problem hiding this comment.
Dropdown icon SVG size conflicts with chip sizes
.sb-product-chip svg { width: 16px; height: 16px; } applies globally, but dropdown chips are still 10/8/6px in this file, so many new SVGs will clip or become unreadable in menu options.
Suggested CSS fix
.sb-product-chip svg {
width: 16px;
height: 16px;
color: `#fff`;
}
+
+/* Keep dropdown SVGs proportional to smaller chip containers */
+.sb-product-opt .sb-product-chip svg {
+ width: 8px;
+ height: 8px;
+}
+
+.sb-product-opt.sb-product-child .sb-product-chip svg {
+ width: 6px;
+ height: 6px;
+}
+
+.sb-product-opt.sb-product-grandchild .sb-product-chip svg {
+ width: 5px;
+ height: 5px;
+}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .sb-product-chip svg { | |
| width: 16px; | |
| height: 16px; | |
| color: #fff; | |
| .sb-product-chip svg { | |
| width: 16px; | |
| height: 16px; | |
| color: `#fff`; | |
| } | |
| /* Keep dropdown SVGs proportional to smaller chip containers */ | |
| .sb-product-opt .sb-product-chip svg { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| .sb-product-opt.sb-product-child .sb-product-chip svg { | |
| width: 6px; | |
| height: 6px; | |
| } | |
| .sb-product-opt.sb-product-grandchild .sb-product-chip svg { | |
| width: 5px; | |
| height: 5px; | |
| } |
🤖 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/product-switcher.css` around lines 48 - 51, The global rule
".sb-product-chip svg { width: 16px; height: 16px; }" forces all SVGs to 16px
and conflicts with the smaller dropdown chip sizes (10/8/6px); update the CSS so
the 16px sizing is scoped to non-dropdown chips (for example target a specific
modifier or direct child like ".sb-product-chip:not(.sb-product-chip--dropdown)
svg" or use a more specific selector for the main chip) and ensure dropdown
selectors (the rules that set 10/8/6px) explicitly override or set their own
sizes, or alternatively make the SVG sizing responsive by using
max-width:100%/height:auto so dropdown chips can control their own dimensions.
The 10x10px dropdown menu chips are too small for icons. Color-only chips provide cleaner UX in the dropdown list. Icons remain in the main button chip (28x28px) where they have adequate space to render clearly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sparkles is the more universally recognized AI indicator icon. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When page.component.name is 'agentic-data-plane', display the sparkles icon instead of falling through to the generic book icon. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add data-platform and self-managed components so the product switcher can properly display the hierarchy in preview mode. Set page component to ADP for testing the sparkles icon. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed .platform-indicator-mobile from 18px to 15px to maintain visual consistency with other navigation elements. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Feediver1
left a comment
There was a problem hiding this comment.
LGTM - no critical issues. Suggestions up to you.
Feediver1
left a comment
There was a problem hiding this comment.
Docs standards review (UI/theme PR)
Files reviewed: 7 files (5 CSS, 2 HBS partials, 1 preview UI model). Not an .adoc content PR — review focuses on correctness, scope, and the CodeRabbit finding.
What this PR does
The PR title describes one thing — moving the sidebar product switcher from a full component-colored background to a neutral background with a 28×28 colored icon chip — but the diff actually contains seven distinct changes across 11 commits:
- Product switcher restyle (
product-switcher.css,product-switcher.hbs): neutral semi-transparent background, colored icon chip with SVG, hover/active states, light/dark theme parity. - SVG icons added to each product chip (sparkles for ADP, database for Data Platform, cloud, server for Self-Managed, waveform for Streaming, connector for Connect, book for generic/Labs).
- Icons removed from small dropdown chips (10/8/6px sizing was too small for icons to render legibly).
- Nav collapse toggle visibility fix on mobile (
nav.css): moves the override out of the desktop media query so the sidebar collapse button is visible on all screens. - Back-to-top button positioning fix (
doc.css): bumpsbottomfrom 24px to 100px (and 120px on mobile) to clear the pagination Next button. - Search results space-before-link fix (
algolia-script.hbs): explicit${' '}after?so HTML whitespace collapsing doesn't eat the space before "Let us know". - Header cosmetics (
header.css): cloud link iconmargin-left: 5pxand platform-indicator font size 18px → 15px.
Critical issues
None — but two scope/structure concerns worth raising.
Scope concern
The PR title and description cover ~30% of the diff. Items 4 (mobile nav fix), 5 (back-to-top positioning), 6 (search-results spacing), and 7 (header cosmetics) are unrelated to the product-switcher restyle. They're all small and individually correct, but bundling them together means:
- If any one of them regresses, reverting takes back the unrelated work.
- Future archaeologists looking at
git logfor "back-to-top positioning" find a PR titled "product switcher to neutral background" — discoverability suffers. - The PR description's test plan only covers product switcher, not the four other changes.
This is a soft call — the changes are all in the same theme bundle and all small — but if the team prefers atomic PRs, this should probably be split. At minimum, the PR description should be updated to enumerate all seven changes.
Suggestions
-
CodeRabbit's
.sb-product-chip svgsizing finding is currently inert because commit 6 removed SVGs from dropdown chips entirely — but the global 16×16 rule on.sb-product-chip svgremains inproduct-switcher.css:48-51. If any future contributor adds a small icon to a dropdown chip, the rule will silently force it to 16px and break the 10/8/6px sizing chain. Scope the rule defensively now: either.sb-product-switch .sb-product-chip svg { ... }(main button only) or.sb-product-chip:not(.sb-product-chip--dropdown) svg { ... }with a corresponding modifier class on dropdown chips. Cheap insurance. -
Hardcoded RGBA opacity values for hover/active states (
rgba(255, 255, 255, 0.04),0.06,0.08, and thergba(0, 0, 0, ...)equivalents in light theme). These read as design-system tokens — they're not unique to this component. Worth promoting to CSS variables (e.g.,--surface-overlay-1,--surface-overlay-2,--surface-overlay-3) so other components can pick up the same hover/active gradient and dark/light theme switching becomes a one-line override. Not blocking, but the consistency dividends compound. -
Magic-number bottoms on
.back-to-top(100px desktop, 120px mobile). The inline comment explains why (avoid pagination Next button overlap), but those values are layout-dependent — if pagination styling changes, this will need to be re-tuned silently. A reference to the related component (e.g.,/* Must clear .pagination-nav height (~64px desktop, ~84px mobile + 24px margin) */) would help future maintainers know what to recalculate against. -
Commit 11's platform-indicator font-size change (18px → 15px) isn't in the PR description. Probably correct — "match nav items" is a reasonable rationale — but undocumented font-size changes are hard to verify against the design intent later. Worth a line in the body.
-
Light-theme
sb-product-versionusescolor-mix(in oklab, var(--component-color, #4f46e5) 15%, transparent).color-mixis well-supported across modern browsers (Chrome 111+, Firefox 113+, Safari 16.2+), but worth confirming the target browser support matrix includes those baselines. If older browser support matters, a@supports (color: color-mix(in oklab, red, blue))fallback wrapper would be defensive.
CodeRabbit findings
.sb-product-chip svgsizing conflict (line 48-51) — see Suggestion 1. Defused by commit 6 but the underlying rule is still a footgun.
Impact on related work
- Independent of #373 and #384. Doesn't touch
head-meta.hbs,resolve-resource.js, or the property-tooltips feature. Can merge in any order. - The added preview UI model entries (data-platform, self-managed components in
ui-model.yml) are good — they let the preview build exercise the hierarchy display path. Worth flagging that the preview model now has six components when it had three; if there's any preview tooling that iterates oversite.components, it'll see more entries.
What works well
- Light/dark theme parity maintained. Every dark-theme override has a light-theme counterpart that's been thought through (proper grey-scale variables, semi-transparent overlays).
- Iteration on the ADP icon (commits 8 and 9: brain → sparkles, then a dedicated
agentic-data-planebranch in the HBS so ADP pages get the right icon) shows responsiveness to the design call that sparkles is the more universal AI indicator. - Removing SVGs from small dropdown chips after seeing them rendered is the right reflex — defending the choice in the commit message ("too small for icons, color-only chips provide cleaner UX") is the kind of post-hoc reasoning that's useful to a future contributor wondering why the asymmetry exists.
- Preview model is updated to exercise the new code paths —
ui-model.ymlnow setspage.componentto ADP so the sparkles-icon branch actually runs in the preview build. - Aesthetic motivation is documented in the PR description (the original full-color background was "visually heavy") — design changes without that framing are harder to evaluate.
The global .sb-product-chip svg rule sets 16px sizing, but dropdown chips are smaller (10/8/6px). This adds scoped overrides to keep SVG icons proportional within the smaller chip containers. Addresses CodeRabbit review comment about SVG sizing conflict. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Summary
Updates the sidebar product switcher from a full component-colored background to a neutral background with only the icon chip showing the component color.
Before/After
Changes
var(--component-color)to neutral semi-transparentrgba(255, 255, 255, 0.04)Rationale
The full colored background was visually heavy and drew too much attention. The new design:
Test plan
🤖 Generated with Claude Code