luniehq / lunie

Lunie is staking, simplified ✨
https://lunie.io
Apache License 2.0
279 stars 100 forks source link

Handle different Kusama algorithms (Schnorrkel and Edwards) #3929

Closed Bitcoinera closed 4 years ago

Bitcoinera commented 4 years ago

We should offer both as an option for account creation/ restore or, at the very least, add some information message in case we don't support Edwards for release.

But, ideally, we should support both

Bitcoinera commented 4 years ago

Should we then close this? I have a branch with work started on this

Bitcoinera commented 4 years ago

Sneak peak:

jbibla commented 4 years ago

as opposed to offering options, we should optimize for the happy path and provide the simplest experience possible with minimal UI changes. warnings should always be a last resort.

step 1 - user puts in any seed (12 words, 24 words, raw seed) and hits next step 2 - on the "choose name" screen, there can be a little retry button next to the address with a tooltip that says "currently using schnorkel: try a different signature scheme". step 3 - if the user clicks this it will show the loading icon again and display a different address based on a new scheme.

Screen Shot 2020-05-12 at 10 51 40 AM
faboweb commented 4 years ago

Retry button feels intransparent. How about a secondary drop down "Address wrong?" which reveals the schemas.

Bitcoinera commented 4 years ago

But how do we know the address is wrong? It is only the user who can know

faboweb commented 4 years ago

That is what I mean. If the user thinks the address is wrong, let him pick a different curve. But don't confuse him before

jbibla commented 4 years ago

i'm comfortable "hiding it" behind a tooltip because it's an advanced feature. i'd prefer not to make the average lunie user (happy path) doubt they have the right address.

Bitcoinera commented 4 years ago

So it would be then a button with a tooltip right? And the button would read "Retry"?

jbibla commented 4 years ago

So it would be then a button with a tooltip right?

i imagine a hoverable icon. the action could be triggered by clicking the icon or clicking a button inside the tooltip.

Bitcoinera commented 4 years ago

But how would newcomers know this icon is for that? It needs to be a very descriptive icon I imagine.

Can you upload some draft? 👀

faboweb commented 4 years ago

I feel against the retry. This is a concept no user understands I fear. Let's continue brainstorming.

Bitcoinera commented 4 years ago

What about a span that only appears on Kusama once you get the address (name step) and reads "Not your address?". Same styles than for the "Want to create another account?" span on extension.

You click it and it automatically derives the seed using the other algorithm. The span would stay.

Good UX right?

faboweb commented 4 years ago

That is the same as "Retry" which I think is confusing

Bitcoinera commented 4 years ago

🤔 I don't see why you find it confusing

jbibla commented 4 years ago

it's not a "retry" it's "use different signature scheme" - i think any user who inputs their seed and sees an unexpected address will consider looking for more information.

i agree with ana's thinking here.

there are only two opportunities to find out what scheme they are using - before and after.

Bitcoinera commented 4 years ago

I think it is much more natural to realize something went wrong afterwards, when you already got the address. Then you would see the "Not your address?" span, click it, and boom, right address (after the bit that polkadot/api always needs).

I see it super simple and straightforward. Also no options, just a click to change it if this address is not what you were looking for

faboweb commented 4 years ago

How about showing both addresses with a select/dropdown?

faboweb commented 4 years ago

"Retry" = something went wrong and you are doing the same action again expecting that it doesn't go wrong this time. Which is not the same here as the action actually changes.

jbibla commented 4 years ago

How about showing both addresses with a select/dropdown?

this doesn't sound like reducing friction and complexity for our users. why should we make everyone choose?

faboweb commented 4 years ago

we would default to sr25519. the user can just continue

jbibla commented 4 years ago

we would default to sr25519. the user can just continue

yeah i see what you're saying, however i think showing these options is going to be confusing for most people and will add unnecessary information for most cases.

Bitcoinera commented 4 years ago

Hey, I just came with a different solution for this.

What if what we do is that we by default derive with the two algos and in the name step we present both results, one above each other (like LiSessions). Then the user simply selects the correct one.

I can make later some dummy code to just "draw" what I mean, if you think it is needed

faboweb commented 4 years ago

Problem persists: We want to not present the user with options to not confuse him.

Bitcoinera commented 4 years ago

I think "Select your address" doesn't confuse at all? 🤷

faboweb commented 4 years ago

I am not super opposed to "Select your address"

Bitcoinera commented 4 years ago

I am not super opposed to "Select your address"

Let's do it then!

@jbibla, what are your thoughts?

jbibla commented 4 years ago

i don't think giving users more options and more decisions to make is the right approach. this is the same as just asking them which algorithm they'd like to use. the point is that most users don't care and don't need to know.

this is why i am proposing that we default to one (the one that will be most common) and let advanced users who necessarily have more context decide to override it if they know / care. my thinking is that this will address this complexity for most people, most of the time.

Bitcoinera commented 4 years ago

OK, so we are back to the "Retry" of "Not your address?" idea, or how do we give UI to these advanced users to derive using a different algorithm?

jbibla commented 4 years ago

How about a secondary drop down “Address wrong?” which reveals the schemas.

let's do something like this: "Expecting a different address?" then if a user clicks it it should display the signature scheme in the top right of the input field, switch to loading state and display the new address. if the user clicks again it will go back.

faboweb commented 4 years ago

I could live with that.

jbibla commented 4 years ago

wow. only took a month!