-
Notifications
You must be signed in to change notification settings - Fork 8
Adding statistics SummaryCards component #50
Conversation
Pull Request Test Coverage Report for Build 2106063322
💛 - Coveralls |
|
Hey @henrypalacios , great job!
Were these changes discussed somewhere/OR we have an updated mock-uo of the Home page about which accidentally I'm not aware of? Thank you! |
Thanks for the feedback @elena-zh! I'll start by giving you the context of your last question, since we won't have the card with the surdplus yet and while the token table at the bottom of the mock up is being built. Agustin proposed a temporary layout while some of the first ones are executed. Regarding your notes:
|
Hey @henrypalacios , storybook cards look great now! Cards on Explorer started to look much-much better. Maybe we could increase the graph widget's height to correspond to the neighboring card's height? WDYT? Again, when a screen width is less than 349 px, cards start to overlap each other Thanks! |
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.
src/apps/explorer/components/SummaryCardsWidget/SummaryCards.tsx
Outdated
Show resolved
Hide resolved
hey @elena-zh I've fixed some issues: |
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.
@henrypalacios , @alongoni , LGTM now!
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.
Really nice!
src/apps/explorer/components/SummaryCardsWidget/SummaryCards.tsx
Outdated
Show resolved
Hide resolved
src/apps/explorer/components/SummaryCardsWidget/SummaryCards.tsx
Outdated
Show resolved
Hide resolved
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.
Approved with minor comments
src/apps/explorer/components/SummaryCardsWidget/summaryGraphResp.json
Outdated
Show resolved
Hide resolved
"batchInfo": { "lastBatchDate":1649881035, "batchId": "0x0003723b9eb1598e12d15c69206bf13c971be0310fa5744cf9601ed79f89e29c" }, | ||
"dailyTransactions": {"now": 612, "before": 912}, | ||
"totalTokens": 193, | ||
"dailyFees": {"now": 55225.61205047748511254485049406426, "before": 40361.20651840192742698089787142249} |
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.
One more thing about the shape of the data.
Usually it's not a good idea to work with floats in JS and also if working with big numbers JS number
type won't be able to handle it.
Having said that, it might not be a problem for this use case as:
- We are simply displaying data without any further calculations, so loss of precision won't be really a problem
- I expect fees to not be large enough to go over JS
number
limit - It mostly depends on how the graph response will look like, which might not be yet known
So, keep that in mind for the future, but does not need necessarily to change anything at this point
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.
Yes, I have it in mind! I would think they come as a string and may need to be formatted, but we can define it in #40 when integrating the SDK.
…sp.json formatting Co-authored-by: Leandro Boscariol <[email protected]>
…to 38-stats-card-ui
Summary
Closes #38
Adding statistics SummaryCards component in order to achieve 👇
To Test
Observations