Skip to content
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

Improve UI on log-in modal. #350

Merged
merged 23 commits into from
Jan 21, 2025

Conversation

gianfra-t
Copy link
Contributor

@gianfra-t gianfra-t commented Jan 3, 2025

Closes: #351 (and #362)

A re-use of the signing box needs to show when the user attempts to login. This box should not show a progress bar on this stage.

Changes

  • Modify the SigningBox component to allow for this new "phase". Amount of signatures to display are adjusted depending on the phase. Also an animation would rapidly load the progress bar to 100% after finish all signatures, to "dampen" the sudden dismissal of the box.
  • Modify useSiweSignature hook to work without the modal.
  • Improve error display and recovery when user rejects signing/network change requests. Errors are shown using a toast now.
  • We now clear the sep24 variables upon network change. This resets the state and allow the user to click confirm again.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit f5af08a
🔍 Latest deploy log https://app.netlify.com/sites/pendulum-pay/deploys/678fd1391745ad000713b209
😎 Deploy Preview https://deploy-preview-350--pendulum-pay.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gianfra-t gianfra-t linked an issue Jan 3, 2025 that may be closed by this pull request
@gianfra-t gianfra-t changed the title [DRAFT] Improve UI on log-in modal. Improve UI on log-in modal. Jan 8, 2025
@gianfra-t gianfra-t changed the title Improve UI on log-in modal. [DRAFT] - Improve UI on log-in modal. Jan 8, 2025
@gianfra-t gianfra-t changed the title [DRAFT] - Improve UI on log-in modal. Improve UI on log-in modal. Jan 13, 2025
@gianfra-t gianfra-t requested a review from a team January 13, 2025 13:46
@@ -368,7 +374,7 @@ export const SwapPage = () => {
from,
selectedNetwork,
fromAmountString,
requiresSquidRouter: selectedNetwork === Networks.Polygon,
requiresSquidRouter: isNetworkEVM(selectedNetwork),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not related to this change, but we need this after support of other EVM networks.

Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

I tested it. Works overall 👍 I pushed a commit to add the progress bar and footer also for the login. IMO it looks better with both indicators and there is no need to hide them. I put the progress of the login to 15% by default so that it's clearer that the progress bar is indicating progress which is not clear with an empty bar.

I think we should spend more time on re-thinking the retry button. It's a nice feature overall but I wouldn't merge it the way it is. The concern I have is that when I reject a signature and click on the retry button, I would expect that the app continues where it stopped, ie. it would ask me to sign again. This is not the case at the moment and I need to click on the 'Confirm' button again. It doesn't seem like a big deal but would only lead to confusion if we don't do it properly. I propose we remove the retry button from this PR and discuss with the product team.

src/pages/swap/index.tsx Outdated Show resolved Hide resolved
@gianfra-t
Copy link
Contributor Author

@ebma I removed the retry button. Also we discussed we wanted to add a toast when detecting user rejection, and just reset the app. So that type of error is not shown on the UI now.

@gianfra-t gianfra-t requested a review from a team January 21, 2025 14:39
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Tested it again. Seems to work as expected 🙏 Let's change the wording and finally get this out to staging.

@gianfra-t gianfra-t merged commit 6252890 into polygon-prototype-staging Jan 21, 2025
1 check passed
@gianfra-t gianfra-t deleted the improve-feedback-on-login branch January 21, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve UX on sign-in modal.
3 participants