Skip to content

Conversation

@Yuiham
Copy link
Collaborator

@Yuiham Yuiham commented Dec 9, 2025

Summary

This PR replaces HoverCard with Tooltip in the CodeBlock component to improve accessibility and UI consistency. The change simplifies the component structure while maintaining the same user experience.

Changes

  • Replaced HoverCard with Tooltip for the expand/collapse button in CodeBlock
  • Replaced HoverCard with Tooltip for the copy button in CodeBlock
  • Updated icon import from IconCopy01 to IconCopy03 for better visual consistency
  • Simplified component structure by removing nested HoverCard.Target and HoverCard.Dropdown wrappers
  • Updated pnpm to version 10.19.0 and refreshed lock file

Benefits

  • Better accessibility: Tooltip provides more native and accessible hover interactions
  • Simpler code: Reduced component nesting and cleaner markup
  • UI consistency: Aligns with other tooltip usage across the UI kit
  • Improved UX: More responsive and lightweight hover interactions

Testing

  • Verified expand/collapse functionality works correctly
  • Verified copy button shows appropriate tooltip states (Copy/Copied)
  • Confirmed tooltip positioning and arrow display

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

🦋 Changeset detected

Latest commit: 9d184a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@tidbcloud/uikit Patch
@tidbcloud/uikit-documentation Patch
@tidbcloud/uikit-example-with-nextjs-pages-router Patch
@tidbcloud/uikit-example-with-vitejs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for tidbcloud-uikit-story ready!

Name Link
🔨 Latest commit 9d184a6
🔍 Latest deploy log https://app.netlify.com/projects/tidbcloud-uikit-story/deploys/6937a4136840e20008dd703a
😎 Deploy Preview https://deploy-preview-615--tidbcloud-uikit-story.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@ti-chi-bot ti-chi-bot bot added the size/L label Dec 9, 2025
@Yuiham Yuiham requested review from awxxxxxx, shhdgit and zoubingwu and removed request for shhdgit and zoubingwu December 9, 2025 03:54
…onent for improved accessibility and UI consistency
@Yuiham Yuiham merged commit b7f2014 into v2 Dec 9, 2025
5 checks passed
@Yuiham Yuiham deleted the fix/code-block branch December 9, 2025 04:29
@github-actions github-actions bot mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants