regen-network / regen-web

:seedling: Website and marketplace application
https://app.regen.network
13 stars 9 forks source link

Web2 Login/Profile testing #2248

Closed blushi closed 6 months ago

blushi commented 8 months ago

This should be testing from https://dev.app.regen.network/ In the following, web2 account means account with a login and/or google email but no wallet address and web3 account means account with a wallet address.

Log in:

Connect login providers

This feature provides multiple ways of logging in into a same account. This can be tested from https://dev.app.regen.network/profile/edit/settings while being logged in.

Add and switch account

This feature behaves similarly to google accounts switcher but with the added complexity of maintaining the active account wallet address (if any) consistent with the account select in Keplr extension. The list of authenticated accounts are only persistent to the current session.

Perform on chain actions

Create project

This feature allows to create project using any type of account (web2 or web3). This can be tested from https://dev.app.regen.network/profile/projects

A web3 account that is a class issuer can still create on chain projects but can also choose to create off chain projects without any credit class.

Log in via Keplr using an address that is a class issuer.

  1. Create a new project with a credit class. Make sure the entire flow still works as before, in particular an on chain project is created at the end of the flow.

  2. Edit a project with a credit class that is not on chain yet, it should go back to the step you left off in the project create flow

  3. Edit an on chain project, behavior should be unchanged: on chain actions gets triggered when editing anchored data (basic info, location, roles and metadata)

  4. Create a new project without any credit class:

    • no metadata form
    • the project shouldn't be created on chain but after final submission, it should be "published" meaning that if you go to the project page before this step, it will return 404 whereas if you go to the project page after the final review step submission, it will show the project data (use the UUID in the URL to go to the project page: https://deploy-preview-2178--regen-marketplace.netlify.app/project/{someUUID})
  5. Edit a project without a credit class that hasn't been published, it should go back to the step you left off in the project create flow

  6. Edit a project without any credit class that has been published:

    • no metadata form
    • you should be redirected to the project edit flow and editing shouldn't trigger any on chain actions (contrary to 3.)

A web2 account or a web3 account that is not a class issuer can only create off chain projects without any credit class.

Log in with such an account and go through the steps 4, 5 and 6. The only difference should be that it won't show the "choose a credit class" page at the start of the project creation.

erikalogie commented 7 months ago

TO DO- ping Cory to also QA

blushi commented 7 months ago

@erikalogie @clevinson I added testing instructions. If you have any questions, feel free to ask.

erikalogie commented 7 months ago

@blushi here are some things I've discovered so far that aren't working correctly:

erikalogie commented 7 months ago

@blushi this error makes it difficult to test

UPDATE: this seems to have been resolved with the latest bug fix on dev.

erikalogie commented 7 months ago

@blushi

erikalogie commented 7 months ago

@blushi while testing the wallet connect stuff, I logged out and then tried to log back in with wallet connect and it is not working, see the video:

Private Zenhub Video

Also, I'm realizing that the warning for any wallet connect account that "Please switch to this address in Keplr to access this profile." doesn't make sense if they are trying to use wallet connect on desktop. This is a total edge case, but if they want to switch to a wallet connect account on desktop then they have to log out and log back in in order to do that.

erikalogie commented 7 months ago

Wallet connect on mobile appears to be broken. I am getting the message on my mobile phone to scan the QR code instead of open the keplr app and I get no signing message inside the keplr mobile app. image.png

erikalogie commented 7 months ago

@blushi I am done testing

@clevinson if you have any time to test, I would focus on reproducing the errors that I found in the comments above

blushi commented 7 months ago

@blushi

  • "Edit a project without any credit class that has been published: no metadata form. You should be redirected to the project edit flow and editing shouldn't trigger any on chain actions (contrary to 3.)" I am getting redirected to the project create form instead of the project edit form. See "Offchain project Jan 2024" in the shared testing account as an example.

I tested this and it does go to the edit form https://dev.app.regen.network/project-pages/ba1d299e-b097-11ee-8628-0267c2be097b/edit/basic-info but I'm suspecting some caching issue. Did that happen right after publishing the project (without you reloading the app in between)?

blushi commented 7 months ago

@blushi

  • "Edit a project without any credit class that has been published: no metadata form. You should be redirected to the project edit flow and editing shouldn't trigger any on chain actions (contrary to 3.)" I am getting redirected to the project create form instead of the project edit form. See "Offchain project Jan 2024" in the shared testing account as an example.

I tested this and it does go to the edit form https://dev.app.regen.network/project-pages/ba1d299e-b097-11ee-8628-0267c2be097b/edit/basic-info but I'm suspecting some caching issue. Did that happen right after publishing the project (without you reloading the app in between)?

Ok I tested it myself and this is indeed what happens, I'll create a separate issue to fix this.

blushi commented 7 months ago

Also, I'm realizing that the warning for any wallet connect account that "Please switch to this address in Keplr to access this profile." doesn't make sense if they are trying to use wallet connect on desktop. This is a total edge case, but if they want to switch to a wallet connect account on desktop then they have to log out and log back in in order to do that.

I'm not sure how this would get triggered. Could you give precise steps to reproduce? @erikalogie

blushi commented 7 months ago

I've created a new issue for the Wallet Connect issues: https://github.com/regen-network/regen-web/issues/2263 seems like it is broken already on prod.

erikalogie commented 7 months ago

Also, I'm realizing that the warning for any wallet connect account that "Please switch to this address in Keplr to access this profile." doesn't make sense if they are trying to use wallet connect on desktop. This is a total edge case, but if they want to switch to a wallet connect account on desktop then they have to log out and log back in in order to do that.

I'm not sure how this would get triggered. Could you give precise steps to reproduce? @erikalogie

@blushi so if you add a wallet connect address to your account dropdown, then switch to a different account, then try to switch back to the wallet connect account, there is no way to actually re-authorize with wallet connect because that is not an option. We could tackle this separately as it is an edge case.

blushi commented 7 months ago

@blushi so if you add a wallet connect address to your account dropdown

This is not possible. When adding an account, there's no Wallet Connect option.

image
erikalogie commented 7 months ago

This is not possible. When adding an account, there's no Wallet Connect option.

Ok weird. Maybe there was a bug before that allowed me to do this previously, but I can't reproduce it now. So no worries here.

paul121 commented 7 months ago

Log in with Keplr using wallet address A and switch to address B from Keplr which is not part of the authenticated accounts, you should be prompted to sign the arbitrary transaction. If this is successful, the account with address B will be added to the authenticated accounts and set as the active account.

This works as described. But while it is convenient that an account is created for address B I wonder if this is always the desired behavior. It's not clear that the Keplr popup to sign an arbitrary transaction will auto-create an account. This caused an issue when I wanted to add address B to an existing web2 account (email) - but after switching the active Keplr wallet, the account got auto-created before I could add to my web2 account.

paul121 commented 7 months ago

Log in with WC

When I first click "Wallet Connect" I get a loading spinner that never completes. Closing the modal and clicking Login -> Wallet Connect again I get the QR code. This happens consistently on my 1st attempt after loading the webpage.

blushi commented 7 months ago

Log in with Keplr using wallet address A and switch to address B from Keplr which is not part of the authenticated accounts, you should be prompted to sign the arbitrary transaction. If this is successful, the account with address B will be added to the authenticated accounts and set as the active account.

This works as described. But while it is convenient that an account is created for address B I wonder if this is always the desired behavior. It's not clear that the Keplr popup to sign an arbitrary transaction will auto-create an account. This caused an issue when I wanted to add address B to an existing web2 account (email) - but after switching the active Keplr wallet, the account got auto-created before I could add to my web2 account.

It would makes sense to add some kind of warning modal before displaying the Keplr popup when the user could decide to continue or not, thoughts @erikalogie? We need to warn him that no on chain action will be available until he switches back to the account address he's logged in with, this logic is already implemented:

image
blushi commented 7 months ago

Log in with WC

When I first click "Wallet Connect" I get a loading spinner that never completes. Closing the modal and clicking Login -> Wallet Connect again I get the QR code. This happens consistently on my 1st attempt after loading the webpage.

I can't reproduce this, which browser are you using?

erikalogie commented 7 months ago

Log in with Keplr using wallet address A and switch to address B from Keplr which is not part of the authenticated accounts, you should be prompted to sign the arbitrary transaction. If this is successful, the account with address B will be added to the authenticated accounts and set as the active account.

This works as described. But while it is convenient that an account is created for address B I wonder if this is always the desired behavior. It's not clear that the Keplr popup to sign an arbitrary transaction will auto-create an account. This caused an issue when I wanted to add address B to an existing web2 account (email) - but after switching the active Keplr wallet, the account got auto-created before I could add to my web2 account.

It would makes sense to add some kind of warning modal before displaying the Keplr popup when the user could decide to continue or not, thoughts @erikalogie?

Would something like popup that we used to have work for this? https://www.figma.com/file/2ORMWGHMsB1rzGMrRIAtEV/Keplr-Log-In?type=design&node-id=972%3A41935&mode=design&t=nO4tweaR97x3gy0b-1

blushi commented 6 months ago

@paul121 I can reproduce the WC issue now, created an issue to fix that #2275, thanks for testing!

clevinson commented 6 months ago

Issues I came across as I spent time testing today:

Managing a Custom Profile

After logging in with email, I went to create a custom profile, and ran into few errors:

Screenshot 2024-02-06 at 6 05 43 PM Screenshot 2024-02-06 at 6 05 48 PM Screenshot 2024-02-06 at 6 06 58 PM

Project Creation Flow

blushi commented 6 months ago

Thanks for testing @clevinson

Adding images (either avatar or header image) does not show the "Save" button, it is hidden in the overflow in modal, so this is confusing to users who may not know that they can scroll in the modal.

We could simply have less vertical margin around this modal, wdyt @erikalogie?

After editing the profile, clicking "View Profile" sends me to https://dev.app.regen.network/connect-wallet, which says "You must connect to Keplr in order to view the content of this page." instead of directing me to the profile page

I'll try to reproduce and investigate.

When editing the project page, I got confused between the Arrow keys and the "Save & Next" button. "Save & Next" was disabled / grey since I hadn't selected project size, and so I just filled out the form hitting the arrow keys. No data got saved. And then when I reached the final page, I had a green "Save & Next" button, but clicking on the button did nothing.

Any thoughts @erikalogie? Maybe we could add a one-time warning saying the arrow keys are just for navigating the form, without saving the data. I think this was originally designed for the project plan creation forms where you had quite long forms and this could have been useful to move on to the next form while you gather the info for the current one. But I'm not sure if that's so much useful here. Maybe we should just have some prev button and "save and next".

blushi commented 6 months ago

Log in with Keplr using wallet address A and switch to address B from Keplr which is not part of the authenticated accounts, you should be prompted to sign the arbitrary transaction. If this is successful, the account with address B will be added to the authenticated accounts and set as the active account.

This works as described. But while it is convenient that an account is created for address B I wonder if this is always the desired behavior. It's not clear that the Keplr popup to sign an arbitrary transaction will auto-create an account. This caused an issue when I wanted to add address B to an existing web2 account (email) - but after switching the active Keplr wallet, the account got auto-created before I could add to my web2 account.

It would makes sense to add some kind of warning modal before displaying the Keplr popup when the user could decide to continue or not, thoughts @erikalogie?

Would something like popup that we used to have work for this? https://www.figma.com/file/2ORMWGHMsB1rzGMrRIAtEV/Keplr-Log-In?type=design&node-id=972%3A41935&mode=design&t=nO4tweaR97x3gy0b-1

I'll create a task for that, we can have this done after the release since it's nice to have.

Instead of "connect wallet address", I would say "add account" since it's not about connecting a wallet address to your existing account but really creating a new account (if not exist) and adding it to your authenticated accounts.

blushi commented 6 months ago

After editing the profile, clicking "View Profile" sends me to https://dev.app.regen.network/connect-wallet, which says "You must connect to Keplr in order to view the content of this page." instead of directing me to the profile page

I'll try to reproduce and investigate.

@clevinson Good catch, I've got a fix here: https://github.com/regen-network/regen-web/pull/2280

clevinson commented 6 months ago

We could simply have less vertical margin around this modal, wdyt @erikalogie?

In general I would be in favor of us never having scrollable modals. I understand there may be exceptions to the rule sometimes, but its usually very unintuitive and feels like more of a UI bug then design. I also noticed the same issue with the login modal, which I can scroll, even though I didn't expect it to be a scrollable div.

Screenshot 2024-02-07 at 4 27 35 PM Screenshot 2024-02-07 at 4 27 32 PM
clevinson commented 6 months ago

I sat down with Dave today and went over this flow. We probably have a few other items that we may want to tackle before marketing this feature (either publicly, or socializing it with partners via a soft launch). I'll work on getting more clarity on that list with him and @erikalogie soon, so we can discuss w/ the dev team next week about prioritizing it against other tasks.

Regardless tho, I wouldn't consider the issues that Dave and I are tracking as blocking closing this issue or a release from dev to main, if the rest of the team feels that the core technical bugs have been sufficiently resolved.