inaturalist / iNaturalistAndroid

Android app for iNaturalist.org
https://market.android.com/details?id=org.inaturalist.android
MIT License
155 stars 56 forks source link

Android banner and modal for unconfirmed users #1335

Open loarie opened 4 months ago

loarie commented 4 months ago

For any unconfirmed user on any iNaturalist app, add a green banner at the top of the site styled like this:

Screenshot 2024-03-04 at 1 55 08 PM

The banner should say: "Please confirm that [email address] is the best way to contact you. Click here to resend a confirmation email"

When the user clicks on the underlined potion reveal a modal that says: "Please click the link sent to [email address] to confirm your email address."

budowski commented 3 months ago

@loarie - which part is underlined? The email address? Also, how do we detect if a user is unconfirmed? One of the fields in the /users/me API response?

kueda commented 3 months ago

A user is unconfirmed if the users/me response has a user where confirmed_at exists and is not null.

If @loarie wants the user to be able to resend the confirmation email, you're going to have to use the undocumented /users/resend_confirmation endpoint, which requires auth and resends the email to the authenticated user.

FWIW, I think it's very confusing that the banner doesn't match the screenshot, and that the banner text implies that an email will be sent but tapping the banner just opens a modal that does nothing.

loarie commented 3 months ago

@abhasinat do we need the underlined link in the banner to open a modal (analogous to what happens in the existing modal on profile) or can the underlined link in the banner just send the email directly?

abhasinat commented 3 months ago

Yep, here's the text we can use:

Yep, the intent was to make it more pervasive and annoying to encourage a user to confirm their email. We also decided to change the text to indicate that a confirmation email would be resent (see below). Clicking the banner should open a modal with the text: "Would you like to resend a confirmation email to [email address]?" with the buttons "Resend Email" and "Cancel"

After an email is sent, there should be a modal with the text "Email sent! Please click the link in the email." with a single CTA "Ok"

Mobile Announcement - Confirmation

We can also do an underline of the last line if that's better, though the entire banner should be clickable:

Android Announcement - Confirmation
loarie commented 3 months ago

thanks for adding this @budowski budowski - is this issue now closed?

budowski commented 3 months ago

Assuming it's looking good for you? @tiwane ? @abhasinat ?

loarie commented 3 months ago

I tested this on the old Huawei and it works great. I had to close/reopen the app for the banner to go away after confirming but I don't think thats a big deal. I approve closing this if you're comfortable doing so