Skip to content

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Oct 12, 2025

Summary

Migrates the CopyableValue component from Material-UI Tooltip to Radix UI Tooltip.

Changes

CopyableValue Component

  • Removed unused prop: PopperProps (never used in any call site)
  • Renamed prop: placementside (Radix naming convention)
  • Updated pattern: Now uses TooltipProvider/Tooltip/TooltipTrigger/TooltipContent composition

Minimal API surface change:

  • placement prop renamed to side (only affects 1 call site - already updated)
  • PopperProps removed (was never used)

Replace MUI Tooltip with Radix Tooltip components and migrate Emotion CSS
to Tailwind utility classes. This is part of the ongoing effort to
standardize on Radix UI/shadcn components and Tailwind CSS.

Changes:
- Replace @mui/material/Tooltip with components/Tooltip/Tooltip (Radix)
- Remove unused PopperProps (not used anywhere in codebase)
- Rename placement prop to side to match Radix API
- Replace Emotion css={{ cursor: "pointer" }} with Tailwind cursor-pointer class
- Update single call site in IconsPage.tsx (placement → side)
- Wrap in TooltipProvider as required by Radix

Technical details:
- Radix uses Provider/Tooltip/Trigger/Content pattern (more verbose but flexible)
- Maintained backward compatibility for all other call sites (6 files)
- No functional changes to component behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comment on lines +37 to +51
if (showCopiedSuccess !== prevCopiedRef.current) {
prevCopiedRef.current = showCopiedSuccess;

if (showCopiedSuccess) {
setShowCopiedText(true);
} else {
setTooltipOpen(false);
clearTimeout(timeoutRef.current);
// showCopiedText should reset after tooltip is closed to avoid a flash of the text
timeoutRef.current = window.setTimeout(
() => setShowCopiedText(false),
100,
);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

if the idea is to reset things after the tooltip is hidden, this should be in an onOpenChange handler, not inline during render.

Comment on lines +40 to +41
if (showCopiedSuccess) {
setShowCopiedText(true);
Copy link
Member

Choose a reason for hiding this comment

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

why have both showCopiedSuccess and showCopiedText? this just feels like duplicated state with messy synchronization code

spacing={1}
justifyContent="center"
<div
css={{ marginTop: 32 }}
Copy link
Member

Choose a reason for hiding this comment

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

can we convert this too while we're at it?

<Stack alignItems="center" css={{ margin: 12 }}>
<CopyableValue key={icon.url} value={icon.url}>
<div
css={{ margin: 12 }}
Copy link
Member

Choose a reason for hiding this comment

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

and here

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