-
Notifications
You must be signed in to change notification settings - Fork 9
Create buttons component to paginate user orders table #694
Conversation
|
Hi @henrypalacios , changes LGTM! Btw, pagination is missing in the mobile view, but I hope, that it will be addressed under #693 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Henry!
I agree with Elena's comment to keep it in the radar for future improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments on the code. Overall quite good 👍
Regarding the behaviour, echoing comments I made in the other issues I feel like make part of this change:
- Changing the rows per page should reset position back to page 1
- When not on page
1
, rows should not be added/removed, only update what's already visible. Now it causes rows to "shift" down with background updates. Probably the easiest is to disable background re-fresh when not on first page. - Not sold on showing the count of orders (51 - 100). Or maybe I'm missing the page number. What about adding that in between the page controls
For follow ups/other issues
- Continuing the second page refresh issues. Keep track of what was the last order is the previous table and continue from there, avoiding showing the same order again.
- Also on that, we could add a indicator like "new orders, click here to refresh" sort of thing. Low priority, though.
- Add page controls to bottom of table as well - not part of the design but in practice I see the need
All in all, with 1
and 2
added it'll be good to merge IMO. We can discuss the rest and address in follow up tasks/PRs if we agree.
What do you think?
src/apps/explorer/components/OrdersTableWidget/PaginationOrdersTable.tsx
Outdated
Show resolved
Hide resolved
src/apps/explorer/components/OrdersTableWidget/useGetOrders.tsx
Outdated
Show resolved
Hide resolved
Thanks for the feedback @alfetopito . I agree, I wanted to make progress on 1 and 2. But I got stuck on 2. Because I didn't realize that I was testing on |
Just to be clear, Rinkeby works on any stage. And, this happened to me yesterday as well when I was testing it 😅 |
@elena-zh I have complied with points 1 and 2. Closes #700
I tried point 3. but it didn't look very good, maybe @alongoni can help shape that idea. @alfetopito @anxolin @alfetopito I have problems with the coverage of the |
Hey @henrypalacios ! However, now I have started to face order list updating issues. When I on the 1st page, and place an order, at some moment order list stops to be updating. As a result, I do not see an 'Open' order until I refresh the page or flip pages: |
@elena-zh the second case I could not reproduce, so I think it had to do with the first. @alfetopito I've taken the liberty to install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues regarding behaviour, good to go.
Did not experience the issue reported by Elena either.
Some minor nitpick comments.
src/apps/explorer/components/OrdersTableWidget/PaginationOrdersTable.tsx
Outdated
Show resolved
Hide resolved
src/apps/explorer/components/OrdersTableWidget/useGetOrders.tsx
Outdated
Show resolved
Hide resolved
No worries, let's iterate on it
No concerns if we see that's useful.
No concerns either, I liked the tests 👍 |
Changes LGTM now! |
Summary
Closes #687, #684
To Test
(687-Pager) -> Go to https://pr694--gpui.review.gnosisdev.com/rinkeby/address/0xFF714b8b0e2700303eC912BD40496C3997ceEa2b/
(684-EmptyTable) Go to https://pr694--gpui.review.gnosisdev.com/address/0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9/
Reference