Page MenuHomePhabricator

[frontend] Add OAuth to the frontend
Closed, ResolvedPublic

Description

Here are my thoughts on this task;
Without having to log in a user should be able to see

  1. On the Homepage
  2. see task details
  3. 'Skip to Next' to see the next task details
  1. the Leaderboard tables
  2. Should not be able to see the dashboard since it includes their own metrics
  3. click 'Yes Please' on the Homepage

A user should be prompted to log in when ;

  1. they click the 'Yes Please' button
  2. they click on the dashboard

Tasks

  1. call the /api/user endpoint to check if the user is logged in
  2. On the Homepage page if the user is not logged in and clicks 'Yes Please' show them a dialog stating login with Toolhub
  3. On the Dashboard page if not logged in show the user a card that states login with Toolhub

Event Timeline

Hannah_Njoroge updated the task description. (Show Details)
Hannah_Njoroge updated the task description. (Show Details)

We talked about this in the team meeting and came up with the following ideas:

  1. The Dashboard should still be visible to users who aren't logged in, but of course they won't be able to see any data specific to a logged-in user (e.g., "My Contributions"). So the Dashboard needs to be configured to only render certain components if there is a currently logged-in user. We could also have some kind of message indicating that the user ought to log in to see more.
  1. Related to the above, the "My Contributions" table element needs to display something when the currently-logged in user has no contributions. Slavina suggested something like "Click here to get started." (presumably a link that would return to the Home view)
  1. We were in broad agreement about Slavina's idea that the input bar for tasks be rendered immediately on the Homepage, without the user having to click "Yes Please." It reduces unnecessary clicking and makes for a more streamlined user experience.
  1. So if we drop the "Yes Please" button, we could prompt the user to log in upon clicking "submit", but it might be even better to prompt them to login if they click the input bar (I'm thinking this because, in the process of logging in, any data entered into the input bar may be lost -- unless you capture and store it somehow -- and that would mean that the user's time had been wasted).
NicoleLBee changed the task status from Open to In Progress.Mar 6 2023, 8:08 PM
NicoleLBee claimed this task.
NicoleLBee moved this task from Done to In review on the Toolhunt board.

Idea #3 has been addressed with a previous PR.

The other issues here have been (more or less) addressed by PR #39 (currently in need of review)

NicoleLBee moved this task from In review to Done on the Toolhunt board.