-
Notifications
You must be signed in to change notification settings - Fork 201
fix: yield details style polish #11734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+1,130
−649
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
f8fc2f6
feat: display strategy names instead of asset symbols in yield cards
gomesalexandre fca42a0
feat: add maintenance and deprecated warnings for yield opportunities
gomesalexandre e7b34e7
chore: add temporary monkey patch for testing maintenance/deprecated …
gomesalexandre ea4338b
chore: remove temporary monkey patch for maintenance/deprecated badges
gomesalexandre 6ebcbc0
feat: add YieldExplainers component for consistent staking info
gomesalexandre 1555437
feat: add documentation link to yield detail page
gomesalexandre 3784581
feat: add yield explainers to YieldForm and improve docs link
gomesalexandre 9f1e96a
feat: add Available to Earn tab and improve yield page navigation
gomesalexandre ec27e2b
feat: improve yield page UX with filter fixes and code cleanup
gomesalexandre f90fac7
feat: swap fiat/crypto display on yield detail page
gomesalexandre 1e247f3
feat: improve yield detail page desktop layout with two-column design
gomesalexandre b18f7ab
feat: fix validator mismatch bug and add New badge to Yields menu
gomesalexandre eb59b8d
feat: add getYieldDisplayName utility for clean yield names
gomesalexandre 3969437
feat: improve asset/chain/protocol display with icon + label format
gomesalexandre 6abea3f
refactor: use named functions in memo() for better debugging
gomesalexandre b24cbd9
feat: commit best practices skill
gomesalexandre 2d8bb8d
chore: add project-specific style preferences to react-best-practices…
gomesalexandre cccc386
refactor: improve yields code quality and patterns
gomesalexandre fa85b17
fix: add null coalescing to prevent runtime error in sort comparator
gomesalexandre e872c09
fix: guard claimable section against zero-amount balances
gomesalexandre f89c34a
style updates
reallybeard 9bddb08
Update LazyLoadAvatar.tsx
reallybeard d351bda
Merge branch 'develop' into style-updates
reallybeard d96f4f1
fixes
reallybeard 50f7112
rabbits
reallybeard 188dd3d
updates
reallybeard 4778649
revert: restore useMemo in YieldItem.tsx
reallybeard e61b227
remove stuff
reallybeard 8d1f174
Update YieldDetail.tsx
reallybeard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,8 @@ export const CardStyle = { | |
| elevated: () => ({ | ||
| container: { | ||
| bg: 'background.surface.raised.base', | ||
| borderColor: 'border.base', | ||
| boxShadow: | ||
| '0 1px 0 var(--chakra-colors-border-base) inset, 0 0 0 1px var(--chakra-colors-border-base) inset', | ||
|
Comment on lines
+47
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| }), | ||
| unstyled: { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,20 @@ | ||
| import type { AvatarProps, SkeletonProps } from '@chakra-ui/react' | ||
| import { Avatar, SkeletonCircle } from '@chakra-ui/react' | ||
| import { useCallback, useState } from 'react' | ||
| import { useCallback, useMemo, useState } from 'react' | ||
|
|
||
| import type { AvatarSize } from '@/components/Avatar/Avatar.theme' | ||
| import { AVATAR_SIZES } from '@/components/Avatar/Avatar.theme' | ||
| import { imageLongPressSx } from '@/constants/longPress' | ||
|
|
||
| export type LazyLoadAvatarProps = SkeletonProps & | ||
| Pick<AvatarProps, 'src' | 'size' | 'boxSize' | 'name' | 'icon' | 'bg'> | ||
| Pick<AvatarProps, 'src' | 'boxSize' | 'name' | 'icon' | 'bg' | 'size'> | ||
|
|
||
| export const LazyLoadAvatar: React.FC<LazyLoadAvatarProps> = ({ | ||
| src, | ||
| size = 'sm', | ||
| borderRadius, | ||
| name, | ||
| icon, | ||
| boxSize, | ||
| bg, | ||
| ...rest | ||
| }) => { | ||
|
|
@@ -22,12 +23,14 @@ export const LazyLoadAvatar: React.FC<LazyLoadAvatarProps> = ({ | |
| const handleImageLoaded = useCallback(() => setImageLoaded(true), []) | ||
| const handleImageError = useCallback(() => setImageError(true), []) | ||
|
|
||
| const skeletonSize = useMemo(() => { | ||
| return AVATAR_SIZES[size as AvatarSize] ?? AVATAR_SIZES.md | ||
| }, [size]) | ||
|
|
||
| return ( | ||
| <SkeletonCircle | ||
| isLoaded={Boolean(imageLoaded || (imageError && name))} | ||
| width='auto' | ||
| height='auto' | ||
| display='flex' | ||
| size={skeletonSize} | ||
| borderRadius={borderRadius} | ||
| {...rest} | ||
| > | ||
|
|
@@ -36,9 +39,8 @@ export const LazyLoadAvatar: React.FC<LazyLoadAvatarProps> = ({ | |
| onLoad={handleImageLoaded} | ||
| onError={handleImageError} | ||
| src={src} | ||
| size={size} | ||
| icon={icon} | ||
| boxSize={boxSize} | ||
| boxSize='100%' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this expected? |
||
| name={name} | ||
| borderRadius={borderRadius} | ||
| sx={imageLongPressSx} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u sure?