peakshift / makers.bolt.fun

https://makers.bolt.fun
GNU General Public License v3.0
31 stars 21 forks source link

Create logged-out state for comments 💬 #114

Closed barefoot-88 closed 2 years ago

barefoot-88 commented 2 years ago

Issue

At the moment, if a user is logged out of their account (or has not yet created one), the Discussion section shows comments but no CTA of how to start commenting.

Screenshot 2022-08-03 at 14 40 04

Solutions

Option 1

If the user is not yet authenticated, the toast that currently shows should be replaced with one that says, "Connect with lightning to use this feature." If the user clicks the link, it should open up the login widget. Once the user is connected, it shows the standard authenticated state of the Discussion component.

The downside of this option is that we should online display one toast at a time. So if the user logs in, and the toast is immediate replaced with the "Learn about Nostr" one, it might cause some confusion, or they might be more inclined to close it and get it out of sight.

Screenshot 2022-08-03 at 14 49 43

Option 2

A more favourable solution would be to replace the "Submit" button with "Connect to comment ⚡️" one. The avatar displayed could be a blank/gray one to signify there is no user logged in. See Product Hunt's example below, as well as how we could implement it ourselves.

The downside of this option might be that a user types out a response and hits the button, not realising they have to login. If they then go through the authentication journey, will their comment be saved or will they have to type it out again?

Product Hunt

Screenshot 2022-08-03 at 14 42 37 Screenshot 2022-08-03 at 14 50 23
MTG2000 commented 2 years ago

I've implemented a solution similar to the second one, but the "Connect" button will appear on top of the comments editor and blurred a little, so that he will first go connect his profile first, and then I automatically redirect him to the article page.

image

barefoot-88 commented 2 years ago

Ok nice one, this will work for now. Was there a particular reason we went with this design decision? Don't want to slow down dev processes but we should discuss implementations if there are changes to the design before they happen.

MTG2000 commented 2 years ago

Feel free to suggest any changes.

I went with it this way cause as I said, it's close to the 2nd option, which you (and me) like more than the first 1. But it won't be very easy (and pleasent) to allow the user to write the comment, then save it temp, then send him to the login page, and later restore it (or automatically send it).

MTG2000 commented 2 years ago

If you want to have it look different (but for now let's stick with no-writing-before-login). Then just send that to me & I'll implement them.

barefoot-88 commented 2 years ago

Ok cool, just wanted to check if it was because it was difficult to implement the saved comment changes etc. Interestingly, I just completed the same journey on Product Hunt...

Whilst I'm glad I didn't write it out twice, I was left wondering if the comment was posted or not...

So yeah, think there's a better solution somewhere out there! Let's go with what you've done for now as it's more important we implement something for the time being, and like you said saves the headache of the issues with Option 2!

Apologies if it came across as pedantic, just want to make sure we have back-and-forth discussion regarding changing designs so we're on the same page ❤️

MTG2000 commented 2 years ago

Yeah sure, no worries man ❤

I should have talked about the approach that I was going to implement before implementing it, so that we could discuss it if needed to.

So will make sure to do that going forward 👍

barefoot-88 commented 2 years ago

Yeah sure, no worries man ❤

I should have talked about the approach that I was going to implement before implementing it, so that we could discuss it if needed to.

So will make sure to do that going forward 👍

All good ❤️ I'm still learning about these processes too, just thought I'd flag for future! Nice work on the implementation though