-
Notifications
You must be signed in to change notification settings - Fork 17
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
Assets page redesign #2513
Assets page redesign #2513
Conversation
PR deployed in Google Cloud |
PR deployed in Google Cloud |
ba48e5a
to
e182f0f
Compare
b68c433
to
f7969b6
Compare
b1d79bd
to
c232ea0
Compare
226fd0a
to
d17153c
Compare
a7d1cb4
to
f05c566
Compare
marginLeft={[2, 2, 2, 2, 5]} | ||
marginRight={[2, 2, 2, 2, 5]} |
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.
marginLeft={[2, 2, 2, 2, 5]} | |
marginRight={[2, 2, 2, 2, 5]} | |
mx={[2, 2, 2, 2, 5]} |
{payload[0].payload.historicPV | ||
? formatBalance(payload[0].payload.historicPV, 'USD', 2) | ||
? formatBalance(payload[0].payload.historicPV, pool.currency.name, 2) |
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.
should be pool.currency.symbol
for all of them
borderTopStyle="solid" | ||
borderTopColor="borderPrimary" | ||
> | ||
<Stack as="section" padding={2} marginLeft={[0, 0, 0, 1, 3]} marginRight={[0, 0, 0, 1, 3]} gap={3}> |
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.
<Stack as="section" padding={2} marginLeft={[0, 0, 0, 1, 3]} marginRight={[0, 0, 0, 1, 3]} gap={3}> | |
<Stack as="section" padding={2} mx={[0, 0, 0, 1, 3]} gap={3}> |
<Stack gap={1}> | ||
<Shelf gap={1}> | ||
<Box | ||
padding="24px 16px" |
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.
padding="24px 16px" | |
px={3} | |
py={2} |
prefer theme values over hardcoded ones
font-family: Inter, sans-serif; | ||
` | ||
|
||
const LoanOption: React.FC<LoanOptionProps> = ({ loan }) => { |
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.
React.FC
is obsolete. Normal functions will do
@@ -26,7 +26,7 @@ export function InlineFeedback({ status = 'default', children }: InlineFeedbackP | |||
<Text variant="body3"> | |||
<Shelf alignItems="baseline" gap="4px"> | |||
<StyledIconWrapper minWidth="iconSmall" height="iconSmall" flex="0 0 auto"> | |||
<StyledIcon as={icons[status]} size="iconSmall" color={`status${capitalizeFirstLetter(status)}`} /> | |||
<StyledIcon as={icons[status]} size={24} color={`status${capitalizeFirstLetter(status)}`} /> |
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.
<StyledIcon as={icons[status]} size={24} color={`status${capitalizeFirstLetter(status)}`} /> | |
<StyledIcon as={icons[status]} size="iconMedium" color={`status${capitalizeFirstLetter(status)}`} /> |
Looking really nice! |
Code changes after code was approved
nftIdSortKey: loan.asset.nftId, | ||
idSortKey: parseInt(loan.id, 10), | ||
outstandingDebtSortKey: loan.status !== 'Closed' && loan?.outstandingDebt?.toDecimal().toNumber(), | ||
originationDateSortKey: | ||
loan.status === 'Active' && | ||
loan?.originationDate && | ||
'interestRate' in loan.pricing && | ||
!loan?.pricing.interestRate?.isZero() && | ||
!loan?.totalBorrowed?.isZero() | ||
? loan.originationDate | ||
: '', | ||
maturityDate: loan.pricing.maturityDate, | ||
portfolioPercentage, | ||
...loan, |
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.
So I noticed that the column sorting doesn't work yet. The columns that are not shown anymore in the table don't need a sortKey
anymore. Instead you should replace the sortKeys with all of the sortable columns in the table. Under the hood anything that needs to be sortable needs to have its own key
'Portfolio %': loan.portfolioPercentage ? loan.portfolioPercentage : '-', | ||
} | ||
}) | ||
}, [rows]) |
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.
would add the suggested dependency pool
here
@@ -342,6 +342,10 @@ export const tooltipText = { | |||
label: 'Expense ratio', | |||
body: 'The operating expenses of the fund as a percentage of the total NAV', | |||
}, | |||
totalNavMinus: { |
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.
totalNavMinus: { | |
totalNavMinusFees: { |
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 🔥 🔥 🔥 besides the table sorting now working right yet I think it is good enough to ship 🚢 proper table sorting can be handled in a follow up PR if it will block the release
@kattylucy Looking great! One thing I noticed: there is now a new asset with 0 value. The market price shows up as I also asked Brian to come up with a loading state: https://www.figma.com/design/ng7qdNcSCXSDA6ZUdWIs6u/Pool-Overview%2F-Pool-Detail?node-id=4516-2623&t=DshORdTnFD448TSr-4 This would be nice to implement while the data in the table is loading (and a pattern we should start adopting across the app). But consider this a very nice-to-have, happy to write a separate ticket for this as well. |
e008388
to
1a21778
Compare
#2507