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

views: improve approval dialogue rendering #241

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

TalDerei
Copy link
Contributor

@TalDerei TalDerei commented Nov 22, 2024

references #240

I opted not to import the new valueViewComponent since the UI V2 library is still in-flight and not finalized. To avoid adding further complexity — especially given the existing lack of uniformity across UI libraries (deprecated V1, V2, and the prax-specific UI) — I reused the existing valueViewComponent.

According to the developer docs, the maximum size for an extension popup is limited to 800x600 unfortunately.

Moreover, I took some design liberties in the approval dialogue by refactoring the css and tightening the dimensions, but this probably goes beyond the scope of what was intended.


before

Screen.Recording.2024-11-22.at.8.19.05.AM.mov

after

Screen.Recording.2024-11-22.at.8.10.03.AM.mov

@TalDerei TalDerei self-assigned this Nov 22, 2024
@TalDerei TalDerei marked this pull request as draft November 22, 2024 09:04
@TalDerei TalDerei requested review from hdevalence and a team November 22, 2024 16:22
@hdevalence
Copy link
Contributor

Looks great visually! Agree on leaving the rest of the improvements for later once the V2 designs are complete

@TalDerei TalDerei marked this pull request as ready for review November 22, 2024 16:26
Comment on lines 41 to 43
<span className='truncate font-mono text-xs text-muted-foreground max-w-[80px]'>
{symbol}
</span>
Copy link
Contributor Author

@TalDerei TalDerei Nov 25, 2024

Choose a reason for hiding this comment

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

truncates the value component for staking, delegating, unbonding, etc.


before

Confirm Transaction

after

Screenshot 2024-11-24 at 9 38 49 PM Screenshot 2024-11-24 at 9 39 21 PM

Comment on lines +19 to +24
className='flex flex-row justify-between gap-4 rounded-md p-4 shadow-md'
style={{
backgroundColor: '#1A1A1A',
paddingBottom: '28px',
paddingTop: '28px',
}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

blending the colors of the layer containing the approve and deny buttons


before

Screenshot 2024-11-24 at 9 45 58 PM Screenshot 2024-11-24 at 9 47 19 PM

after

Screenshot 2024-11-24 at 9 42 50 PM Screenshot 2024-11-24 at 9 42 38 PM

Comment on lines 45 to 46
className='w-1/2 py-3.5 text-base hover:bg-destructive/90'
size='lg'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix dimensions of site settings button


before

Screenshot 2024-11-24 at 9 48 10 PM

after

Screenshot 2024-11-24 at 9 51 31 PM

Copy link
Contributor

@hdevalence hdevalence left a comment

Choose a reason for hiding this comment

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

Visuals look good

packages/ui/components/ui/tabs/index.tsx Outdated Show resolved Hide resolved
Comment on lines +19 to +21
<ValueWithAddress addressView={address} label='from'>
<></>
</ValueWithAddress>
Copy link
Contributor

Choose a reason for hiding this comment

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

question: This is the same as

  <ValueWithAddress addressView={address} label='from' />

But is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it since It was throwing an error related to missing attributes, but functionally it's the same.

Screenshot 2024-11-25 at 8 36 51 AM

packages/ui/components/ui/tx/index.tsx Outdated Show resolved Hide resolved
Comment on lines +17 to +22
<div className='flex items-center justify-between gap-3'>
<ValueViewComponent view={note.value} />
</ValueWithAddress>
<ValueWithAddress addressView={address} label='to'>
<></>
</ValueWithAddress>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: a <></> is basically empty. Also, think addresses are getting cut off when there should be a line break likely.

Screenshot 2024-11-25 at 10 58 44 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! This was refactored to place everything on the same line, but it unintentionally cuts off transfers to external wallet addresses. I truncated the ValueWithAddress component with a max width to fix this.

Screenshot 2024-11-25 at 8 32 43 AM Screenshot 2024-11-25 at 8 32 58 AM

apps/extension/src/routes/popup/home/index.tsx Outdated Show resolved Hide resolved
)}
</span>
</div>
{visibleContent}
{visibleContent && <div className='border-t border-gray-700 pt-2'>{visibleContent}</div>}
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: personally, I think you can get rid of the horizontal line border

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually prefer the horizontal line border because it provides clearer visual separation and enhances the structure.

Screenshot 2024-11-25 at 1 33 02 PM Screenshot 2024-11-25 at 1 32 24 PM

@TalDerei
Copy link
Contributor Author

addressed feeback, and any additional design work can be handled in a separate PR.

@TalDerei TalDerei merged commit 0841002 into main Nov 25, 2024
3 checks passed
@TalDerei TalDerei deleted the approval-dialogue-rendering branch November 25, 2024 22:26
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.

3 participants