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

ui: display relevant accounts #202

Merged
merged 8 commits into from
Dec 11, 2024
Merged

ui: display relevant accounts #202

merged 8 commits into from
Dec 11, 2024

Conversation

TalDerei
Copy link
Contributor

@TalDerei TalDerei commented Dec 11, 2024

references #155

useSubaccounts react-query hook is tracked by mobx observer HOC, and queries account balances from the view service to display the relevant accounts.

the Address View V2 UI component (penumbra-zone/web#1941) was implemented towards realizing this.


Screenshot 2024-12-10 at 11 25 55 PM
Screen.Recording.2024-12-11.at.9.14.48.AM.mov

@TalDerei TalDerei self-assigned this Dec 11, 2024
@TalDerei TalDerei requested a review from a team December 11, 2024 08:46
Copy link
Contributor

@grod220 grod220 left a comment

Choose a reason for hiding this comment

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

It looks like there is a flicker when loading. Could we have a spinner in the button to indicate that status?

Screenshot 2024-12-11 at 2 29 20 PM

src/widgets/header/api/subaccounts.ts Outdated Show resolved Hide resolved
"@penumbra-zone/crypto-web": "^30.0.0",
"@penumbra-zone/getters": "^20.0.0",
"@penumbra-zone/perspective": "^40.0.0",
"@penumbra-zone/protobuf": "^6.3.0",
"@penumbra-zone/transport-dom": "^7.5.0",
"@penumbra-zone/types": "^26.3.0",
"@penumbra-zone/ui": "^13.4.2",
"@penumbra-zone/ui": "^13.5.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we have some density issues:

Screenshot 2024-12-11 at 2 28 57 PM

Copy link
Contributor Author

@TalDerei TalDerei Dec 11, 2024

Choose a reason for hiding this comment

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

density updates from the UI package bump are aggregately addressed in #204 cc @VanishMax

@TalDerei TalDerei requested a review from grod220 December 11, 2024 17:24
Copy link
Contributor

@grod220 grod220 left a comment

Choose a reason for hiding this comment

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

Nice job!

@@ -23,7 +24,11 @@ export const SubaccountSelector = observer(() => {
<DropdownMenu>
<DropdownMenu.Trigger>
<Button>
<AddressViewComponent copyable={false} addressView={valueAddress} />
{isLoading ? (
<SpinnerIcon className='animate-spin' />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: When it loads, the main acccount state of the button is ~170px wide. Think we should make the button width in the loading state the same width so there is less screen jank as it transitions from loading to loaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noting that a width of ~142px fits perfectly on screen reloads, but I adjusted it to 170px to match the button width.

@TalDerei TalDerei merged commit 46214be into main Dec 11, 2024
3 checks passed
@TalDerei TalDerei deleted the sub-accounts branch December 11, 2024 20:02
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.

2 participants