Skip to content

Conversation

@r-czajkowski
Copy link
Contributor

@r-czajkowski r-czajkowski commented Apr 7, 2023

Depends on: #490

This PR adds the tBTC user stats on the overview page. In this card, we display user's tBTC balance and their latest 2 bridge activities. Also users can navigate to a tBTC page from this card. Here we also update the layout of the overview page.

Main changes:

  • tBTC user stats card on the overview page- display user's tBTC balance and their latest 2 bridge activities,
  • refactor BridgeActivity component- move the BridgeActivity component to shared components and add a context so we can keep the same logic(like displaying empty states) in different places of the dapp (eg. overview page and tBTC page).
Screenshots

obraz

Pass `as` prop if the icon is not defined in the `Icon` enum which maps
enum to an icon component. Otherwise we can't use custom icons in eg.
`TokenBalance` component. We need to revist this component and consider
removing it.
The word `tBTC` should always start with a lowercase letter - so here we
add a component that forces `t` to be lowercase, even if we use it
inside a component that transforms text to uppercase, e.g. `Label`
component from Threshold typography components.
We want to use the same bridge activity components on the overview page.
Here we move the `BridgeActivity` component to shared components and add
a context so we can keep the same logic(like displaying empty states) in
different places of the dapp.
Display user's tBTC balance and their latest 2 bridge activities. Also
user can navigate to a tBTC page from this card.
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

@r-czajkowski r-czajkowski changed the base branch from main to tbtc-stats-on-overview-page April 7, 2023 08:47
Add new upgrade T tokens card and update the layout according to the
Figma views.
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

@r-czajkowski r-czajkowski self-assigned this Apr 7, 2023
Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

Left some comments to look at before the merge

Comment on lines 175 to 176
<Box as="span">-.--</Box>
<Box as="span">-.--</Box>
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking but good to have:

In the designs we have Wallet not connected badge on the right and tBTC word on the left (next to the -.--).

Designs:
image

Implementation:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Also the -.-- should have color gray.700.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 179 to 180
<Box as="span">-.--</Box>
<Box as="span">-.--</Box>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 55 to 61
<BodyMd mb="6">My Activity</BodyMd>
<BridgeActivity
data={_bridgeActivity}
isFetching={isBridgeActivityFetching}
>
<BridgeActivityData />
</BridgeActivity>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make it little narrower? I think it's two wide in comparison with My Balance section.

Designs:
Screenshot 2023-04-19 at 00 51 22
(Notice how all is perfectly aligned with black lines on the sides)

Implementation:
Screenshot 2023-04-19 at 00 52 56
(Notice how My activity tabs are too wide here in comparison to the designs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +51 to +53
<ButtonLink size="lg" isFullWidth mt={4} to="/tBTC">
New Mint
</ButtonLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

In the designs we have Connect your wallet when user is not connected. Not sure if it's really needed though because we have to redirect him to the minting page where he has to connect the wallet anyway to do something soo just pointing that out.

The bridge activity items are too wide in comparison with `My Balance`
section.
Render custom empty state for bridge activity component.
Set correct text color according to the Figma views.
Base automatically changed from tbtc-stats-on-overview-page to main April 19, 2023 08:38
@r-czajkowski r-czajkowski marked this pull request as ready for review April 19, 2023 08:39
@github-actions
Copy link

1 similar comment
@github-actions
Copy link

Copy link
Contributor

@michalsmiarowski michalsmiarowski left a comment

Choose a reason for hiding this comment

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

LGTM 🥍

@michalsmiarowski michalsmiarowski merged commit 0ca9b5f into main Apr 19, 2023
@michalsmiarowski michalsmiarowski deleted the tbtc-my-stats branch April 19, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants