-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat: trade quote ux improvements #6080
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
cc33cbb
to
fec5601
Compare
3e50d6d
to
884922c
Compare
src/components/MultiHopTrade/components/TradeInput/components/TradeQuotes/TradeQuote.tsx
Outdated
Show resolved
Hide resolved
4aeccae
to
d29ec65
Compare
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.
First pass code review looking solid, it's clear you went deep into this one to achieve strong UX 🔥
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.
This reverts commit c378ffe936ae9395b3abc83994d8800b9a0c971b.
0bbcef8
to
be97159
Compare
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.
Price impact issue fixed, looking solid.
src/components/MultiHopTrade/components/MultiHopTradeConfirm/components/Footer.tsx
Show resolved
Hide resolved
src/components/MultiHopTrade/components/TradeInput/components/TradeQuotes/TradeQuotes.tsx
Outdated
Show resolved
Hide resolved
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.
Conceptual pass, nothing stands out as obviously wrong here, though the guts of the review will be the runtime pass coming after this one
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.
Tested locally:
Reordering of quotes while fetching
reordering.mov
Polling is still happy
polling.mov
Background polling
background.mov
Not blocking the PR for this, as this seems to somehow align with the intent code-wise, however this looks and feels weird:
- polling doesn't happen while in background (as in, we won't actually fire the refetch), which I get the rationale of, but when the window/tab is unfocused, we shouldn't get a visible countdown if nothing is actually being refetched after said countdown?
- being focused again resets the countdown, which, while it supposedly matches the intent, is also weird - this means there will always be more time to refetch than if it wasn't reset. This should either be instantly refetched on refocus, or alternatively, do nothing and keep the same countdown that was happening while in background
@woodenfurniture happy to discuss how to improve this one, but IMO the best UX here would be to simply not have any logic for resetting countdown depending on background state, simply ensure requests are only fired when focused, as well as countdown being only displayed when focused, without any changes to the underlying countdown. Additionally as a nice-to-have, we could automagically refetch on focus (which would then indeed reset the countdown timeout as it does currently, but would actually make sense with a refetch)
Description
Multiple fixes and improvemenets to trade input and quotes:
Pull Request Type
Issue (if applicable)
closes #6078
Risk
High risk
Testing
Engineering
You'll need to
yarn
to install the bumpedframer-motion
package which contains a breaking changeOperations
Screenshots (if applicable)
General overview
Screen.Recording.2024-02-01.at.7.52.20.am.mov