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

add points UI #125

Merged
merged 15 commits into from
Sep 15, 2024
Merged

add points UI #125

merged 15 commits into from
Sep 15, 2024

Conversation

jeremy-babylonlabs
Copy link
Contributor

No description provided.

@jeremy-babylonlabs
Copy link
Contributor Author

jeremy-babylonlabs commented Sep 6, 2024

Desktop

Screenshot 2024-09-06 at 3 32 03 PM Screenshot 2024-09-06 at 3 32 16 PM

Mobile

Screenshot 2024-09-06 at 3 32 28 PM Screenshot 2024-09-06 at 3 32 22 PM

Major changes:

  • moved publicKeyNoCoord, address, btcWallet, btcWalletNetwork states from pages.tsx to contexts, so that the api calls can be called more atomicly
  • added points UI for both desktop and mobile

TODO:

  • deploy points endpoint to the corresponding env for e2e testing

src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/components/Delegations/Delegation.tsx Outdated Show resolved Hide resolved
src/app/components/Delegations/Delegations.tsx Outdated Show resolved Hide resolved
src/app/context/btcWallet/BtcWallet.tsx Outdated Show resolved Hide resolved
src/app/components/Summary/Summary.tsx Outdated Show resolved Hide resolved
src/app/context/btcWallet/BtcWallet.tsx Outdated Show resolved Hide resolved
@jrwbabylonlab
Copy link
Collaborator

hmm... why is PR closed?

@jeremy-babylonlabs
Copy link
Contributor Author

i think i misclicked it on mobile

src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gbarkhatov gbarkhatov left a comment

Choose a reason for hiding this comment

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

@jeremy-babylonlabs I like the loading placeholder
Though each time I switch to another tab and come back, it will be loading again: https://i.imgur.com/SRp80pc.png

What do you guys think about this UX? We can make it load once per X amount of time, or leave it as it is @vitsalis @jrwbabylonlab


@jeremy-babylonlabs overall really good work, I approve it from my side since the comments are minor and this implementation suits our needs at the moment

src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/api/getDelegationPoints.ts Outdated Show resolved Hide resolved
src/app/components/Points/StakerPoints.tsx Show resolved Hide resolved
src/app/components/Staking/Staking.tsx Show resolved Hide resolved
@jrwbabylonlab
Copy link
Collaborator

jrwbabylonlab commented Sep 12, 2024

image @jeremy-babylonlabs the style seems broken on the delegation list image also the query params is wrong with `[]` in the url One thing i think might be concerning from design point of view is that the fetching of points by individual staking tx has may result in a large num of requests to backend if staker have a lot of delegations. Let's discuss this on the zoom on the best way to optimise this. image

This staking summary part is different to the figma design, has this been communicated to use this new UX design or it's a mistake?

src/app/api/getPoints.ts Outdated Show resolved Hide resolved
src/app/api/getPoints.ts Show resolved Hide resolved
src/app/components/Delegations/Delegation.tsx Show resolved Hide resolved
Copy link
Contributor

@gbarkhatov gbarkhatov left a comment

Choose a reason for hiding this comment

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

@jeremy-babylonlabs
Copy link
Contributor Author

@jeremy-babylonlabs jeremy-babylonlabs dismissed stale reviews from gbarkhatov and totraev September 13, 2024 11:10

resolved

Copy link
Contributor

@gbarkhatov gbarkhatov 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!

src/app/api/getPoints.ts Outdated Show resolved Hide resolved
@jeremy-babylonlabs jeremy-babylonlabs merged commit a538496 into dev Sep 15, 2024
1 check passed
@jeremy-babylonlabs jeremy-babylonlabs deleted the feat/points branch September 15, 2024 08:28
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.

5 participants