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: update table for mobile view #3401

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nortsova
Copy link
Contributor

@Nortsova Nortsova commented Oct 18, 2024

Description

  • The status arrow should show by default, it's currently not showing, and the user do not know it's available for sorting. The table should stay by default sorted by date, so no change here.
image
Before Now
Screenshot 2024-07-29 at 12 24 20 image

Testing

  1. Create .diff file in your root direction
  2. Insert this changes:
diff --git a/src/components/frame/v5/pages/UserCryptoToFiatPage/partials/FiatTransfersTable/FiatTransfersTable.tsx b/src/components/frame/v5/pages/UserCryptoToFiatPage/partials/FiatTransfersTable/FiatTransfersTable.tsx
index 6108cd1dc..167bc241a 100644
--- a/src/components/frame/v5/pages/UserCryptoToFiatPage/partials/FiatTransfersTable/FiatTransfersTable.tsx
+++ b/src/components/frame/v5/pages/UserCryptoToFiatPage/partials/FiatTransfersTable/FiatTransfersTable.tsx
@@ -45,7 +45,58 @@ const FiatTransfersTable = () => {
   ]);
 
   const isMobile = useMobile();
-  const { sortedData, loading } = useFiatTransfersData(sorting);
+  const { sortedData: data, loading } = useFiatTransfersData(sorting);
+
+  const sortedData: typeof data = [
+    {
+      __typename: 'BridgeDrain',
+      id: '12343',
+      amount: '1234.22',
+      currency: 'usdc',
+      state: 'payment_processed',
+      createdAt: '2024-09-20T13:11:22.310Z',
+      receipt: {
+        __typename: 'BridgeDrainReceipt',
+        url: '#',
+      },
+    },
+    {
+      __typename: 'BridgeDrain',
+      id: '12344',
+      amount: '24689.00',
+      currency: 'usdc',
+      state: 'in_review',
+      createdAt: '2024-08-17T10:14:08.450Z',
+      receipt: {
+        __typename: 'BridgeDrainReceipt',
+        url: '#',
+      },
+    },
+    {
+      __typename: 'BridgeDrain',
+      id: '12345',
+      amount: '2230.77',
+      currency: 'usdc',
+      state: 'awaiting_funds',
+      createdAt: '2024-07-16T06:04:23.100Z',
+      receipt: {
+        __typename: 'BridgeDrainReceipt',
+        url: '#',
+      },
+    },
+    {
+      __typename: 'BridgeDrain',
+      id: '12346',
+      amount: '1200662.77',
+      currency: 'usdc',
+      state: 'awaiting_funds',
+      createdAt: '2024-07-16T06:04:23.100Z',
+      receipt: {
+        __typename: 'BridgeDrainReceipt',
+        url: '#',
+      },
+    },
+  ];
 
   const columns = useFiatTransfersTableColumns(loading);
 
  1. git apply .diff
  2. Navigate to Crypto to fiat tab http://localhost:9091/account/crypto-to-fiat
  3. Check that the Drain history matches the design
  4. Check that the Status column has an arrow.

Resolves #2662

@Nortsova Nortsova requested review from a team as code owners October 18, 2024 16:01
staticSize: '180px',
cell: ({ row }) => {
const status = row.original.state as keyof typeof statusPillScheme;
staticSize: isMobile ? '155px' : '180px',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only thing that doesn't match the design is the size, due to the fact that we have quite long statuses.

@melyndav could you please check if it is possible to leave it as it is?

Size according to design Currently implemented
image 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.

Table itself is all good, but shouldn't it have more padding at the bottom ?

As it stands, on my machine at least, it renders glued to the bottom of the viewport

Screenshot from 2024-10-21 14-43-23
Screenshot from 2024-10-21 14-43-32
Screenshot from 2024-10-21 14-43-58
Screenshot from 2024-10-21 14-44-06

@Nortsova Nortsova self-assigned this Oct 22, 2024
@Nortsova
Copy link
Contributor Author

Thank you @rdig . I made some changes and now this table should match on both, desktop and mobile. I also added padding-bottom 🙌

image image

@Nortsova Nortsova requested a review from rdig October 22, 2024 11:42
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.

Great work on this so far, the styling is spot on:

Screenshot 2024-10-23 at 12 46 34

I'm rejecting because the status sorting doesn't actually work until you sort by one of the other columns first:

Screen.Recording.2024-10-23.at.12.46.00.mov

It is also possible to sort by amount, so I'm not sure if that should be restricted so that it is not possible or whether the arrow needs to be visible here as the original issue states the reason for adding the arrow to the state field is to show that it can be sorted. Might need some input from @melyndav

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.

Crypto-to-fiat: Drains history table UI fixes
3 participants