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

fix: broken loading in Transactions in UserHub + fixed text overflow in pills #2725

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

Nortsova
Copy link
Contributor

Description

  • Fixed loading icon for pending pills in transaction list in User hub.

Testing

  • Step 1. Perform a transaction using Metamask i.e., not a Dev wallet.
  • Step 2. Don't sign the transaction.
  • Step 3. Click on the Pending button to load up the transactions tab in the Userhub.
  • Step 4. The loader icon is perfectly positioned inside pending pill
Screenshot 2024-07-17 at 15 52 05

Diffs

New stuff

  • For large texts status will be wrapped with 3 dots and will not exceed parent div
Screenshot 2024-07-17 at 15 54 35

Resolves #2520

@Nortsova Nortsova requested review from a team as code owners July 17, 2024 14:03
@CLAassistant
Copy link

CLAassistant commented Jul 17, 2024

CLA assistant check
All committers have signed the CLA.

@@ -111,7 +111,7 @@ const UserHub: FC<UserHubProps> = ({
</>
)}
</div>
<div className={clsx('relative h-full w-full')}>
<div className="relative h-full w-full min-w-0">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

min-w-0 and max-w-full classes added for different elements to make text-overflow: ellipsis on pills actually works

Screenshot 2024-07-17 at 15 54 35

iamsamgibbs
iamsamgibbs previously approved these changes Jul 17, 2024
Copy link
Contributor

@iamsamgibbs iamsamgibbs 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 here! Looking good on both desktop and mobile:

Screenshot 2024-07-17 at 15 49 33 Screenshot 2024-07-17 at 15 55 01

I suspect min-w-0 isn't needed in as many places, but there may be more edge cases than I realise here.

<span className="min-w-0 truncate">{status.toLowerCase()}</span>
{pending && (
<SpinnerGap
className="flex-grow-1 ml-1 inline-block h-[0.8125rem] w-[0.8125rem] flex-shrink-0 animate-spin text-blue-400"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure flex-grow-1 inline-block flex-shrink-0 is needed here.

>
{status.toLowerCase()}
<span className="min-w-0 truncate">{status.toLowerCase()}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure min-w-0 is needed.

'bg-negative-100 text-negative-400': failed,
'bg-gray-100 text-gray-500': !succeeded && !failed,
},
'min-w-0 max-w-full',
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure min-w-0 is needed.

iamsamgibbs
iamsamgibbs previously approved these changes Jul 18, 2024
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Re-tested and still working 🎉

Screenshot 2024-07-18 at 08 46 11 Screenshot 2024-07-18 at 08 46 29 Screenshot 2024-07-18 at 08 46 43

mmioana
mmioana previously approved these changes Jul 18, 2024
Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

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

Awesome @Nortsova 👏

Tested and can confirm it works as expected
Screenshot 2024-07-18 at 11 49 21
Screenshot 2024-07-18 at 11 50 19

Copy link

@melyndav melyndav left a comment

Choose a reason for hiding this comment

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

Hey @Nortsova great work on this PR! 🌻

Can I ask a minor request, can you change the loader icon that spins from blue-400 to the same gray as the pending text? This just keeps our pill designs consistent (where icons and text colours match).

Thanks!

@Nortsova Nortsova dismissed stale reviews from mmioana and iamsamgibbs via 3577243 July 19, 2024 14:53
@Nortsova
Copy link
Contributor Author

Thank you @melyndav ! ✨ Here is the updated UI:

image

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Adding my review here is all the other got reset, so you get a chance to merge faster.

Tested after your recent changes. All good.

Screenshot from 2024-07-19 18-06-56
Screenshot from 2024-07-19 18-07-18
Screenshot from 2024-07-19 18-07-26

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@melyndav Is this spinner here intended to be text-blue-400? I noticed the spinner colour here before so thought it was intentional to keep them consistent.

Screenshot 2024-07-22 at 09 09 37

@melyndav
Copy link

This looks good to me!

@melyndav Is this spinner here intended to be text-blue-400? I noticed the spinner colour here before so thought it was intentional to keep them consistent.
Screenshot 2024-07-22 at 09 09 37

Hey @iamsamgibbs - it's intended to be blue to match the left side vertical line of this individual component. From Figma:

image

Copy link

@melyndav melyndav left a comment

Choose a reason for hiding this comment

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

Thank you for that small UI fix @Nortsova! Appreciate that extra effort 🤩

@Nortsova Nortsova merged commit 2daf178 into master Jul 24, 2024
3 of 6 checks passed
@Nortsova Nortsova deleted the fix/2520-loading-pill-user-hub branch July 24, 2024 08:37
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.

Loading icon misaligning in transactions tab
6 participants