-
Notifications
You must be signed in to change notification settings - Fork 56
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
Limit the amount of swaps in the Exchange view #445
Conversation
It's just naively slicing off what we need. This is not meant as a performance optimization, but rather to make it less noisy for the user. All swaps are available in the Trades view anyway.
I just arbitrarily picked 50. Happy to revise that if someone prefers a different number. |
50 is okay. I'm wondering if we should add some sort of message that indicates that we're just showing the last 50 swaps and not all of them though? |
@kevva How about renaming the title from |
@sindresorhus, that'd be better I think. At least gives some explanation to why not all of them are listed. |
Is there any benefit to limiting the swaps? I'm not sure it's reducing noise as you only see the amount of swaps visible in the scroll view at a given time. Unless we're seeing React perf issues I'm not sure it makes sense to limit it. I often want to scroll pretty far back when I'm testing things to compare swaps (although this is more of a dev requirement, probs not something many users would be doing)
If we decide to go for this then 👍 |
Most exchanges limit them in some way, either by using filters (like time) or by having a pagination. Maybe just limiting them to a certain number isn't the way to go... As a trader I think it's pretty useful to have the history easily available. But in other exchanges it's not just one click away like it is in HyperDEX where you can go to the Trades view at all times. |
The more you have, the more sensitive the scrolling will be, and it will also affect React performance over some absurd number. We have to limit it to something. How about we change the number to 100 then? We can have a lot there, just not thousands of swaps. |
Why not just list the 50 most recent and then more upon scrolling to the bottom then? |
That's a good point
Or a "Load More" button if it's going to cause jankyness injecting them dynamically. Unless we can pull it off super smooth I thinking auto injecting into scroll bars always looks a bit dodgy. |
Why complicate it? It's just meant as a widget to see current and recent swaps. It's a small box, so not a great interface to do anything more than view a few swaps. For history and more advanced filtering and searching, we have the Trades view. |
Ok, we should make it clear at the bottom that they should view the order history to view all trades. Just to avoid confusion so they don't think trades are disappearing. What about adding a final row that says "View all swaps" which when clicked jumps to the Trades view. Or maybe just the "Recent Swaps" title does enough to convey that information. |
I was going to suggest that too. Let's do it. |
Of course you were hun. |
Added in 3a2a291 This is how it looks when you scroll to the end: |
c2c3572
to
3a2a291
Compare
Looks great 👌 |
It's just naively slicing off what we need. This is not meant as a performance optimization, but rather to make it less noisy for the user. All swaps are available in the Trades view anyway.