-
Notifications
You must be signed in to change notification settings - Fork 16
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
Pool overview page redesign #2402
Conversation
PR deployed in Google Cloud |
PR deployed in Google Cloud |
b813e6e
to
ddb4160
Compare
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.
Nice work @kattylucy 🔥
The Banner that's sometimes displayed in the bottom right corner could most definitely benefit from a style upgrade. What do you think about a black background with white text?
In general do you think it would make sense to replace the primary color in the theme for gold to ease the transition?
const lastYearNAV = aggregatedNetAssetValue.toNumber() | ||
const currentYearNAV = aggregatedListedPoolsNav.toNumber() | ||
|
||
// YoY growth | ||
const totalValueLockedGrowth = | ||
lastYearNAV && currentYearNAV ? ((currentYearNAV - lastYearNAV) / lastYearNAV) * 100 : 0 |
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.
while precision is definitely not vital for this feature, I would still recommend doing all of the math in the decimal library and converting to a number just before its displayed
const totalValueLockedGrowth = | ||
lastYearNAV && currentYearNAV ? ((currentYearNAV - lastYearNAV) / lastYearNAV) * 100 : 0 | ||
|
||
return { totalValueLockedGrowth, isLoading } |
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.
I think it would make sense to rename this to something like totalYearOverYEarGrowth
or totalYoyGrowth
fabric/src/theme/tokens/colors.ts
Outdated
} | ||
|
||
export const centrifugeBlue = blueScale[500] | ||
export const altairYellow = yellowScale[500] | ||
export const black = '#252B34' | ||
export const gold = '#FFC012' |
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.
seeing a slightly different hex code for gold in fabric/src/theme/tokens/theme.ts. They should probably be the same? Think we can just store them in one place?
fabric/src/theme/tokens/theme.ts
Outdated
@@ -29,6 +34,7 @@ const lightColors = { | |||
backgroundInput: 'white', | |||
backgroundThumbnail: grayScale[500], | |||
backgroundInverted: grayScale[900], | |||
backgroundBlack: black, |
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.
I would change the backgroundInverted
to be black
and use that for the sidebar
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.
or better yet, change grayScale[900] to be #252B34
.
fabric/src/theme/tokens/theme.ts
Outdated
textPrimary: grayScale[900], | ||
textSecondary: grayScale[800], | ||
textDisabled: grayScale[500], | ||
textInverted: 'white', | ||
textGold: gold, | ||
textBlack: black, |
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.
I would just use textPrimary. If the primary text color has changed, we should update that instead
cfc6af0
to
794fca6
Compare
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.
🔥🔥🔥
) || [] | ||
|
||
// Aggregate NAV from last year | ||
const aggregatedNetAssetValue = flattenedData.reduce((accumulator: any, item: FlattenedDataItem) => { |
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.
const aggregatedNetAssetValue = flattenedData.reduce((accumulator: any, item: FlattenedDataItem) => { | |
const aggregatedNetAssetValue = flattenedData.reduce((accumulator: Decimal, item: FlattenedDataItem) => { |
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.
you'll have to import it
import Decimal from 'decimal.js-light'
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.
Oh i missed this change. THANK YOU!
9e28af5
to
a79a77a
Compare
a79a77a
to
c7d9d5e
Compare
Description
#2390
Approvals