Refactoring components and cleanup#13
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors several components and adds new functionality to improve the design system. The main changes include adding two new display components (Address and HashLink), refactoring the Tooltip component with a renamed prop, enhancing the Copy component with improved animations, and updating the Avatar component with new size options.
- Added new
AddressandHashLinkcomponents for displaying account information with proper formatting - Refactored
Tooltipcomponent by renaming thetitleprop totooltipContent(breaking change) - Enhanced
Copycomponent with fade-in/out animations and improved styling
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/utils/formatters.ts | Added utility function for truncating CSPR names |
| src/lib/components/tooltip/tooltip.tsx | Renamed title prop to tooltipContent and updated styling |
| src/lib/components/tooltip/tooltip.stories.tsx | Updated stories to use new prop name and improved examples |
| src/lib/components/copy/copy.tsx | Refactored with new animations, styling, and improved user interaction |
| src/lib/components/avatar/avatar.tsx | Added new size options and transparent background support |
| src/lib/components/address/address.tsx | New component for displaying account addresses with avatars and formatting |
| src/lib/components/hash-link/hash-link.tsx | New component for displaying hash links with copy functionality |
| Multiple component files | Updated to use new tooltipContent prop instead of title |
| package.json | Moved prettier from dependencies to devDependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
eugenebelov
left a comment
There was a problem hiding this comment.
@victoriari how do you think, should we keep truncateCSPRName here in formatters or move somewhere else?
if we may keep it, maybe I can add shortenCsprName function here as well?
Summary
AddressandHashLinkCopy.Tooltipcomponent. renamed propertytitletotooltipContentType of Change
Component(s) Affected
Address, HashLinkComponentNameComponentNameChanges Made
Testing
Storybook
Breaking Changes
titlebecametooltipContentScreenshots/Videos
TODO
Checklist