Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

[Explorer] Orders table responsive #721

Merged
merged 4 commits into from
Oct 14, 2021

Conversation

matextrem
Copy link
Contributor

@matextrem matextrem commented Oct 4, 2021

Summary

Closes #693

Updated styles and some markup in order to support new design for Orders table to be responsive.

image

To Test

  1. Open the page /rinkeby/address/<any address with orders>/ (i.e 0xb6bad41ae76a11d10f7b0e664c5007b908bc77c9)
  • View it in mobile view
  • Design will change in order tu support responsive behavior

@matextrem matextrem added the Protofire task to the protofire team label Oct 4, 2021
@matextrem matextrem self-assigned this Oct 4, 2021
@github-actions
Copy link

github-actions bot commented Oct 4, 2021

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Few comments regarding the code.

Regarding the behaviour:

  1. When inverting the price, only the selected element is inverted

I understand why it would make sense to have it like that, but I rather keep the same behaviour on both modes

  1. Some wrapping issues with the copy button

screenshot_2021-10-04_17-26-50

Maybe make the parent component non-wrappable?

Other than that, quite good!

@biocom would you mind reviewing the CSS as well?

@fairlighteth
Copy link
Contributor

Some suggestions on the responsive card:
Screen Shot 2021-10-05 at 09 34 36

  • I'd increase the gap between the each horizontal line
  • In crease the gap between label > value, and account for forceful text wrapping.
  • The 'copied' feedback message should use 100% width on top.

display: none;
}

@media ${MEDIA.mobile} {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move the media query inside the existing selector on lines 22/23

Copy link
Contributor

Choose a reason for hiding this comment

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

Better:

  • Turn the table into a styled component or import an existing table. This keeps both the Wrapper component and table selector dryer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better:

  • Turn the table into a styled component or import an existing table. This keeps both the Wrapper component and table selector dryer.

I don't understand this. Wrapper component is already a Table styled component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Move the media query inside the existing selector on lines 22/23

But the selector used in 22/23 is for common styles for thead and tr. Moving the media query there would not work the same.

@elena-zh
Copy link

elena-zh commented Oct 5, 2021

Some notes from my side:

  1. There is no pagination in the table: a user is able to see only 20 first orders

  2. Not a priority, but it would be nice to show a tooltip arrow right under/below the 'question' icon
    image

  3. It would be nice to apply 'mobile' style to a tablet devices, I think. I mean, when a screen width is in [721-1050] px, the table becomes scrollable, transaction status is hidden. Seems to be a not convenient a bit, especially when we add 'Cancel transaction' feature to Explorer in the future.
    ipad rpo

  4. I'd remove 'violet' color when I click on an order in a mobile view. The card is highlighted with violet when I press on a tooltip, or when I scroll the list and accidentally tough it.. Looks a bit strange to me, frankly.

image

@alfetopito , @alongoni , @biocom , WDYT?

Thanks

@fairlighteth
Copy link
Contributor

Could not show the hover style for mobile/touch/responsive.

@alfetopito
Copy link
Contributor

@alongoni @biocom one extra question that came up is regarding the "invert price" button behaviour on mobile, and I'd like a UX input from you guys.

What do you think would be the best approach on mobile when clicked?

  1. invert only the current order price
  2. invert all table prices - like the desktop behaviour

@alongoni
Copy link
Contributor

alongoni commented Oct 5, 2021

Some notes from my side:

  1. There is no pagination in the table: a user is able to see only 20 first orders

The pagination is there but hidden 😅, maybe we can show it.
image

  1. Not a priority, but it would be nice to show a tooltip arrow right under/below the 'question' icon
    image

Yes, I agree. The issue also appears on the Order details page.

  1. It would be nice to apply 'mobile' style to a tablet devices, I think. I mean, when a screen width is in [721-1050] px, the table becomes scrollable, transaction status is hidden. Seems to be a not convenient a bit, especially when we add 'Cancel transaction' feature to Explorer in the future.
    ipad rpo

Agree. We can change the limit and re-test.

  1. I'd remove 'violet' color when I click on an order in a mobile view. The card is highlighted with violet when I press on a tooltip, or when I scroll the list and accidentally tough it.. Looks a bit strange to me, frankly.

image

In the same way as 2) Agree. Also it happen on the [Order details page](https://pr721--gpui.review.gnosisdev.com/rinkeby/orders/0x88537c74a03c324464d6c269d99b29e7289b105766c5368f77c76c241e1d5da8b6bad41ae76a11d10f7b0e664c5007b908bc77c9615b2dac/

@alfetopito , @alongoni , @biocom , WDYT?

Thanks

@alongoni
Copy link
Contributor

alongoni commented Oct 5, 2021

@alongoni @biocom one extra question that came up is regarding the "invert price" button behaviour on mobile, and I'd like a UX input from you guys.

What do you think would be the best approach on mobile when clicked?

  1. invert only the current order price
  2. invert all table prices - like the desktop behaviour

If we think that the cards are like units and we invert the price, that will affect only the value within it. (1)
However, if we wish to have similar behavior as desktop (2), I believe a global option could be added between Order tab and the first card.

@matextrem
Copy link
Contributor Author

Some notes from my side:

  1. There is no pagination in the table: a user is able to see only 20 first orders
  2. Not a priority, but it would be nice to show a tooltip arrow right under/below the 'question' icon
    image
  3. It would be nice to apply 'mobile' style to a tablet devices, I think. I mean, when a screen width is in [721-1050] px, the table becomes scrollable, transaction status is hidden. Seems to be a not convenient a bit, especially when we add 'Cancel transaction' feature to Explorer in the future.
    ipad rpo
  4. I'd remove 'violet' color when I click on an order in a mobile view. The card is highlighted with violet when I press on a tooltip, or when I scroll the list and accidentally tough it.. Looks a bit strange to me, frankly.

image

@alfetopito , @alongoni , @biocom , WDYT?

Thanks

I think number 2 should be solved in another PR since it is not directly related to this issue

@elena-zh
Copy link

elena-zh commented Oct 6, 2021

I was not able to reproduce the 2nd issue in an order details page, as tooltip arrow is always pointing to the question icon to me there
image

But anyways, I have created a separate issue for this case #722

@alongoni
Copy link
Contributor

alongoni commented Oct 6, 2021

@matextrem We have a problem with the pagination and controls.
image
iOS:

💡 On mobile, maybe we can reduce the "Rows per page" font-size and margin between elements (Rows per page | page range | arrows).

Additionally, in some screens, when the "limit price" order is changed, a new line appears:
https://www.loom.com/share/948ec959328a48ec8b000b346e2d2c01

@alfetopito
Copy link
Contributor

@matextrem We have a problem with the pagination and controls. image iOS: image

bulb On mobile, maybe we can reduce the "Rows per page" font-size and margin between elements (Rows per page | page range | arrows).

Additionally, in some screens, when the "limit price" order is changed, a new line appears: https://www.loom.com/share/948ec959328a48ec8b000b346e2d2c01

Would it be too little info if on mobile we don't show rows per page text at all?
AND/OR wrap the pagination controls in another line

Another question for @biocom

@henrypalacios
Copy link
Contributor

Good job @matextrem, I agree with @alfetopito, maybe with just the 20▼ would be enough.

But maybe to avoid future problems the best is to throw it under the tabs. Is it possible with the CSS magic @alongoni?

Otherwise it occurs to me in another PR, send the extra content in header bar tabs to the main content and play with the visibility in mobile/desktop version.

I think @alongoni already mentioned these details I found.

arrows-opt
limit-opt

@matextrem
Copy link
Contributor Author

@henrypalacios I agree with the option of removing "rows per page" title on mobile to fix the pagination styling problem.

Regarding the second point, I did it this way in order to keep the separation between columns and wrap the text if necessary based on Michel comment
(Second bullet)

@elena-zh
Copy link

Changes LGTM.
However, still there is no decision how to invert prices in a mobile view.
A new nitpick: the section is jumping when invert a price.

SVID_20211012_163011_1.mp4

@matextrem
Copy link
Contributor Author

Regarding the nitpick, that was a thing discussed along with @alongoni in order to keep separation between columns so I think the behavior is desired.

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Good to go IMO

Let's keep the invert price behaviour as is implemented.

We'll revisit if there's feedback

<RowWithCopyButton
className="span-copybtn-wrap"
textToCopy={uid}
contentsToDisplay={
<Link to={`/orders/${order.uid}`} target="_blank">
<Link to={`/orders/${order.uid}`} rel="noopener noreferrer" target="_blank">
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR

Just realized would be good to use the same network component as with addresses.

Right now it works like this, but we unnecessarily query all networks before loading the order. But we already know the network it belongs to.

@henrypalacios henrypalacios changed the base branch from develop to release/2.3.0 October 14, 2021 14:37
@alfetopito alfetopito force-pushed the feature/693-responsive-table branch from a1a2918 to 31536e3 Compare October 14, 2021 18:18
@alfetopito
Copy link
Contributor

I've rebased against base branch and resolved conflicts

@alfetopito alfetopito added the Auto-merge PRs with this tag will be automatically merged when approved and CI succeeds label Oct 14, 2021
@mergify mergify bot merged commit 6a8a331 into release/2.3.0 Oct 14, 2021
@alfetopito alfetopito deleted the feature/693-responsive-table branch October 14, 2021 18:26
@alfetopito alfetopito mentioned this pull request Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auto-merge PRs with this tag will be automatically merged when approved and CI succeeds Protofire task to the protofire team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Responsive Orders table
6 participants