Skip to content
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

Merged
merged 12 commits into from
Sep 3, 2024
Merged

Pool overview page redesign #2402

merged 12 commits into from
Sep 3, 2024

Conversation

kattylucy
Copy link
Collaborator

@kattylucy kattylucy commented Aug 22, 2024

Description

  • Redesign menu on the left and primary/secondary colors for the buttons
  • Redesign layout and router to use outlet
  • Check on storybook components
  • Delete alternative color theme (dark / light )

#2390

Approvals

  • Dev

Copy link

github-actions bot commented Aug 23, 2024

PR deployed in Google Cloud
URL: https://app-pr2402.k-f.dev
Commit #: c7d9d5e
To access the functions directly check the corresponding deploy Action

Copy link

github-actions bot commented Aug 23, 2024

PR deployed in Google Cloud
URL: https://pr2402-app-ff-production.k-f.dev
Commit #: c7d9d5e
To access the functions directly check the corresponding deploy Action

@kattylucy kattylucy force-pushed the pool_overview_page_redesign branch 5 times, most recently from b813e6e to ddb4160 Compare August 28, 2024 15:50
@kattylucy kattylucy marked this pull request as ready for review August 28, 2024 16:35
Copy link
Collaborator

@sophialittlejohn sophialittlejohn left a 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?

Comment on lines 123 to 128
const lastYearNAV = aggregatedNetAssetValue.toNumber()
const currentYearNAV = aggregatedListedPoolsNav.toNumber()

// YoY growth
const totalValueLockedGrowth =
lastYearNAV && currentYearNAV ? ((currentYearNAV - lastYearNAV) / lastYearNAV) * 100 : 0
Copy link
Collaborator

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 }
Copy link
Collaborator

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

}

export const centrifugeBlue = blueScale[500]
export const altairYellow = yellowScale[500]
export const black = '#252B34'
export const gold = '#FFC012'
Copy link
Collaborator

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?

@@ -29,6 +34,7 @@ const lightColors = {
backgroundInput: 'white',
backgroundThumbnail: grayScale[500],
backgroundInverted: grayScale[900],
backgroundBlack: black,
Copy link
Collaborator

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

Copy link
Collaborator

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.

textPrimary: grayScale[900],
textSecondary: grayScale[800],
textDisabled: grayScale[500],
textInverted: 'white',
textGold: gold,
textBlack: black,
Copy link
Collaborator

@onnovisser onnovisser Aug 29, 2024

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

@kattylucy kattylucy force-pushed the pool_overview_page_redesign branch 2 times, most recently from cfc6af0 to 794fca6 Compare September 3, 2024 13:17
Copy link
Collaborator

@sophialittlejohn sophialittlejohn left a 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) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const aggregatedNetAssetValue = flattenedData.reduce((accumulator: any, item: FlattenedDataItem) => {
const aggregatedNetAssetValue = flattenedData.reduce((accumulator: Decimal, item: FlattenedDataItem) => {

Copy link
Collaborator

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'

Copy link
Collaborator Author

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!

@kattylucy kattylucy force-pushed the pool_overview_page_redesign branch 2 times, most recently from 9e28af5 to a79a77a Compare September 3, 2024 19:42
@kattylucy kattylucy enabled auto-merge (squash) September 3, 2024 19:43
@kattylucy kattylucy merged commit 6908e7b into main Sep 3, 2024
11 checks passed
@kattylucy kattylucy deleted the pool_overview_page_redesign branch September 3, 2024 19:46
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.

3 participants