kobotoolbox / kpi

kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
https://www.kobotoolbox.org
GNU Affero General Public License v3.0
130 stars 176 forks source link

Improve log in guidance #3318

Closed jnm closed 2 years ago

jnm commented 3 years ago

Description

After a short discussion this seems to be the plan:

Generally we have three types of routes here:

  1. url accessible to anonymous user: Public Collections, asset shared publicly
  2. main url, e.g. kf.kobotoolbox.org
  3. url not accessible to anonymous user

For case 1 we should just display the UI we have

For case 2 we should immediately redirect to login page (ideally without user noticing - not sure now if possible)

For case 3 we would display a modal with some helpful message and some buttons:

Ignacio G. Rebollo: I'd say ideally we want to inform users of what's going on and give them some options. We can simply have a modal appear explaining what happened (i.e. you were logged out automatically..., or you don't have permissions to see this, or whatever it is) and some buttons: One to take you to the log in (if applicable), maybe a link to the support site, and maybe another button that takes you to kobotoolbox.org

Before we have all required data (like whether user is logged, does they have required permissions, and also permissions configuration) to know what to display, we should show only a spinner (no application)

Additional details

When trying to access the edit route anonymously, we tell people to "try reloading the page", and then display an infinite loading spinner without any "LOG IN" button: image image

For the landing route, we still say "try reloading the page" (incorrect advice) and display an infinite spinner, but we do show the "LOG IN" button, and clicking that does let the user authenticate and be redirected to the place where they were trying to go originally. image

Requests:

Some internal discussion is now at https://chat.kobotoolbox.org/#narrow/stream/7-UX.2FUI/topic/404.20.3E.3E.20sign.20in.20to.20see.20resource

jnm commented 3 years ago

Another one to test: https://kobo.humanitarianresponse.info/#/account-settings shows an infinite loading spinner, with no informational modal, but it does include the "LOG IN" button

jnm commented 3 years ago

Another infinite loading spinner:

  1. be authenticated
  2. go to a form that doesn't exist or you can't access (e.g. https://kf.kobotoolbox.org/#/forms/blargity/landing)
  3. spinny spin
magicznyleszek commented 3 years ago

Note to self: see if previous PR in this area has some useful knowledge: https://github.com/kobotoolbox/kpi/pull/3255

magicznyleszek commented 2 years ago

Done on beta