Giveth / giveth-next

Giveth 2.0 implementation in NextJS
https://next.giveth.io
GNU General Public License v3.0
20 stars 13 forks source link

add drop down menu for non-signed in users #486

Closed divine-comedian closed 2 years ago

divine-comedian commented 2 years ago

currently the only way to switch wallet provider is to sign-in with the currently cached wallet provider then click change wallet

one solution we proposed was to have the regular drop down menu appear which allows the user to change wallet without having to sign-in, clicking anyother button except for change wallet will prompt the user to sign in with the current wallet provider

MoeNick commented 2 years ago

I was thinking of this flow: Slide1.JPG Slide2.JPG Slide3.JPG Slide4.JPG Slide5.JPG Slide6.JPG

divine-comedian commented 2 years ago

@MoeNick this flow looks good!

MoeNick commented 2 years ago

@markoprljic would you pls confirm for nextjs version?

markoprljic commented 2 years ago

The drop-down should overlay the rewards button.

MoeNick commented 2 years ago

@RamRamez The final flow is this: https://whimsical.com/giveth-SLPFhtNjpD4G4L84cLF2jD

Steps: 1- Replace "Connect Wallet" with "SIGN IN" (just the wording - not functions) 2- Let the menu be like what we have., even if the user is not signen In, we have to show the menu. 3- Bring Sign-In Modal in the page, whenever it's needed. @mosaeedi is on it in Figma to make it finalized.

MoeNick commented 2 years ago

Questions just to keep the record of it: 1- Sign Out should be hidden before sign-in? and be appear after the user signs the address with his wallet? 2- We can't disconnect the app from wallet, but we only can invalidate the sign token form the app. so what behavior do you except after sign out? shout it be the state that user see the sign modal? or it should get back to SIN IN button from the header? 3- We kinda blocked by new Sign In modal in Figma, I think @Mo 🤖 is pushing to finalize it right now.

divine-comedian commented 2 years ago
    • Yes
    • When user signs-out it should show the initial state before sign-in - is it possible to return the user to this state? image
markoprljic commented 2 years ago

@divine-comedian Here's a demo https://www.figma.com/proto/nVoinu0tgJ565enN5R4WDE/Giveth.io-%26-GIVeconomy?page-id=2354%3A78970&node-id=2981%3A83718&viewport=380%2C48%2C0.14&scaling=min-zoom&starting-point-node-id=2981%3A83718

@MoeNick This is how the flow should be.

divine-comedian commented 2 years ago

@markoprljic there's just one state that's missing from the figma - its the user who has a profile and a wallet connected - normally if they have a profile we would show them their username instead of their ethereum address?

markoprljic commented 2 years ago

Of course we do. It will be like that.

MoeNick commented 2 years ago

Of course we do. It will be like that.

Im a little bit confused, we cant do it for Laurens version for sure, Is it desired flow for typescript version?

And what about https://whimsical.com/giveth-SLPFhtNjpD4G4L84cLF2jD ? is it finalized or not? @markoprljic

markoprljic commented 2 years ago

Im a little bit confused, we cant do it for Laurens version for sure, Is it desired flow for typescript version? Yes. And what about https://whimsical.com/giveth-SLPFhtNjpD4G4L84cLF2jD ? is it finalized or not? Yes.

divine-comedian commented 2 years ago

@RamRamez which parts of this issue can be tested? sorry the title is confusing - I'm not sure what to check in the drop-down menu now

and is it on next.giveth.io or typescript.giveth.io?

RamRamez commented 2 years ago

@divine-comedian It's on next.giveth.io

When user wallet is not connected, user should see just SIGN IN on menu bar. When wallet is connected but user has not yet signed the message with his wallet, should see the user details menu on hover (without sign out option) When user signs the message, he see user details menu on hover (with sign out option)

If user is registered, he see his name on main menu, if not, he see his wallet address.

divine-comedian commented 2 years ago

okay thank you for explaining it in a bit more detail.

I went through the drop down menu flow -

on a fresh load totally signed out there is no drop down menu when I log into my wallet my profile name, and wallet address show up but there is no option to sign out once I sign the message I can see an option to sign out

looks to be working as described! - moving to DONE