-
Notifications
You must be signed in to change notification settings - Fork 15
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
Open UserHub on pending button click #2867
Conversation
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.
Nicely done Chris! This is much nicer to work with than before.
Tested the pending transaction:
Screen.Recording.2024-08-06.at.10.41.26.mov
Also tested it on mobile and if a failed transaction still automatically opens the userhub which is working great:
Screen.Recording.2024-08-06.at.10.46.56.mov
This is the only issue that stood out to me, it is very slow closing the userhub after the activate / withdraw modal is opened:
Screen.Recording.2024-08-06.at.10.42.35.mov
But I just checked this on QA and it is behaving the same there - not sure if there is anything simple that can be done here to improve this, but can leave it for another time as it already exists on master.
Unrelated to this PR, but I also noticed this issue when closing the userhub on mobile if you have the action sidebar open:
Screen.Recording.2024-08-06.at.10.46.38.mov
@@ -5,13 +5,15 @@ import React, { | |||
type PropsWithChildren, | |||
useCallback, | |||
useEffect, | |||
useState, | |||
// useState, |
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 comment can go
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.
Removed the comment and rebased, maybe you could re-approve?
893b04e
to
033ff17
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.
Thanks for bringing some sanity to the UserHub @chmanie!
The pending button now works flawlessly - I can click on any element of the button and it opens the transactions tab:
Screen.Recording.2024-08-06.at.20.54.58.mov
I noticed however the Completed button no longer triggers the UserHub, which is different to production:
Screen.Recording.2024-08-06.at.21.06.26.mov
If you consider this a separate issue, ping me and I'll re-approve the pending button fix.
Ah no worries, I'll fix this! |
033ff17
to
653c3a6
Compare
@jakubcolony sorted. |
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 the fix, all good!
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.
Works as advertised. Clicking on the pending pill brings up the correct transactions. Nicely done Chris!
Screencast.from.2024-08-07.23-52-19.webm
However I found two edge cases (although they should be considered separatedly)
- cancelling a action and not cancelling metamask will keep a pill active, and if clicking on it will redirect you to an action that doesn't exist / 404 (this is really edgy, I really don't think this will show up in a live environment ever)
- cancelling metamask, or failing a transaction in some other way will add a failed transaction to the list. Clicking that failed transaction will bring you to a 404 page again. I think this can be easily replicated so I definitely think this needs to be fixed
Screencast.from.2024-08-07.23-53-33.webm
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.
The Completed button triggers the user hub now, nice one @chmanie 💯
Description
This PR tries to solve the UserHub opening/closing issues by just using a single state for the visibility of the UserHub. This sadly makes things a little more complicated but there are ambitions to try to solve these issues on the UX side of things (using an improved Modal flow).
For now this should do it. We got rid of the dual state and of the ominous
data-openhubifclicked
attribute by adding some state management wizardry. We basically set the tab that should open in the UserHub from outside and then reset it once it's visible.Testing
master
.Diffs
Changes 🏗
Resolves #2834