Skip to content

fix(fe): closed sidebar button tooltip text color#9876

Open
jmelahman wants to merge 1 commit intomainfrom
jamison/sidebar-tooltip-color
Open

fix(fe): closed sidebar button tooltip text color#9876
jmelahman wants to merge 1 commit intomainfrom
jamison/sidebar-tooltip-color

Conversation

@jmelahman
Copy link
Copy Markdown
Contributor

@jmelahman jmelahman commented Apr 2, 2026

How Has This Been Tested?

before
20260402_15h18m12s_grim

after
20260402_15h18m03s_grim

Additional Options

  • [Optional] Override Linear Check

Summary by cubic

Fixes the closed sidebar button tooltip text color. Removes the Text wrapper so the tooltip content inherits the correct theme styles.

Written for commit db8ca7e. Summary will update on new commits.

@jmelahman jmelahman requested a review from a team as a code owner April 2, 2026 22:18
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR fixes the tooltip text color in the closed/folded sidebar by removing the <Text> component wrapper from the TooltipPrimitive.Content. The <Text> component was overriding the tooltip's own text color (set via the opal-tooltip CSS class), causing it to render with an incorrect color. Stripping the wrapper lets the tooltip's styling take full effect.

  • Root cause fixed: <Text> component inside TooltipPrimitive.Content was overriding the intended tooltip text color.
  • Fix: Render {children} directly inside the tooltip content, relying on the opal-tooltip CSS class for styling.
  • Minor cleanup needed: The Text import from @opal/components (line 8) is now unused and should be removed.

Confidence Score: 5/5

  • Safe to merge — single-line visual fix with no logic changes and only a minor unused import left behind.
  • The change is a straightforward one-line visual fix. The only remaining finding is a P2 unused import, which does not affect correctness or runtime behavior.
  • No files require special attention beyond the unused Text import on line 8.

Important Files Changed

Filename Overview
web/lib/opal/src/components/buttons/sidebar-tab/components.tsx Removes <Text> wrapper from the folded sidebar tooltip content so the tooltip's own CSS class controls text color; leaves one now-unused Text import.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[SidebarTab folded=true] --> B[TooltipPrimitive.Root]
    B --> C[TooltipPrimitive.Trigger]
    B --> D[TooltipPrimitive.Portal]
    D --> E[TooltipPrimitive.Content\nclassName=opal-tooltip]
    E -->|before| F["&lt;Text&gt;{children}&lt;/Text&gt;\n❌ overrides text color"]
    E -->|after| G["{children}\n✅ opal-tooltip CSS controls color"]
Loading

Comments Outside Diff (1)

  1. web/lib/opal/src/components/buttons/sidebar-tab/components.tsx, line 8 (link)

    P2 Unused import after fix

    Now that <Text> is no longer used inside the tooltip content, the Text import on this line is dead code and should be removed.

    (i.e., remove line 8 entirely — import { Text } from "@opal/components";)

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: web/lib/opal/src/components/buttons/sidebar-tab/components.tsx
    Line: 8
    
    Comment:
    **Unused import after fix**
    
    Now that `<Text>` is no longer used inside the tooltip content, the `Text` import on this line is dead code and should be removed.
    
    
    
    (i.e., remove line 8 entirely — `import { Text } from "@opal/components";`)
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: web/lib/opal/src/components/buttons/sidebar-tab/components.tsx
Line: 8

Comment:
**Unused import after fix**

Now that `<Text>` is no longer used inside the tooltip content, the `Text` import on this line is dead code and should be removed.

```suggestion
import Link from "next/link";
```

(i.e., remove line 8 entirely — `import { Text } from "@opal/components";`)

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(fe): closed sidebar button tooltip t..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Preview Deployment

Status Preview Commit Updated
https://onyx-preview-nhisoji6p-danswer.vercel.app db8ca7e 2026-04-02 22:20:18 UTC

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🖼️ Visual Regression Report

Project Changed Added Removed Unchanged Report
admin 8 0 0 157 View Report
exclusive 0 0 0 8 ✅ No changes

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