Skip to content

fix(ui): migrate antd Tooltip and Switch to shadcn components#2251

Merged
hsluoyz merged 1 commit into
the-open-agent:masterfrom
NianJiuZst:master
May 13, 2026
Merged

fix(ui): migrate antd Tooltip and Switch to shadcn components#2251
hsluoyz merged 1 commit into
the-open-agent:masterfrom
NianJiuZst:master

Conversation

@NianJiuZst
Copy link
Copy Markdown
Member

@NianJiuZst NianJiuZst commented May 13, 2026

Summary

Replace antd Tooltip (32 files) and Switch (22 files) with shadcn/ui components based on Radix primitives.

Changes

  • New shadcn components:

    • components/ui/tooltip.jsxTooltipProvider, Tooltip, TooltipTrigger, TooltipContent, AppTooltip (convenience wrapper with antd-compatible API: title, placement, overlayStyle, overlayInnerStyle)
    • components/ui/switch.jsx — polished Switch with blue/gray color scheme, smooth thumb transition, proper vertical centering
  • Migrations across 47 files:

    • All antd Tooltip → shadcn AppTooltip (same API, no JSX restructure needed)
    • All antd Switch → shadcn Switch (onChangeonCheckedChange, removed checkedChildren/unCheckedChildren text labels)
    • Added TooltipProvider to App.js
  • Dependencies added:

    • @radix-ui/react-tooltip
    • @radix-ui/react-switch

Test plan

  • Build passes with no errors
  • ESLint passes
  • Verified Switch ON (blue) / OFF (gray) states render correctly
  • Verified Tooltip hover triggers without ref warnings
  • Dev server loads management pages without console errors

🤖 Generated with Claude Code

Replace antd Tooltip and Switch with shadcn/ui equivalents based on
Radix primitives across all pages. Added AppTooltip convenience wrapper
compatible with antd Tooltip API. Switch uses inline styles for reliable
theming with polished blue/gray color scheme and smooth transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hsluoyz hsluoyz merged commit 7814740 into the-open-agent:master May 13, 2026
7 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.

2 participants