openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

Git provider appears logged out while loading user info in the launcher. #4640

Open pmacik opened 5 years ago

pmacik commented 5 years ago
Issue Overview
Expected Behaviour

When a user goes to the git provider step in the launcher, it should look and behave appropriately - either appear logged in or be disabled while it loads the user info.

Current Behaviour

The form looks and behaves as if user has no git account linked for a while (the [Log In & Authorize Account] button is enabled and clickable) and then it changes to logged in:

git-provider-loading

Steps To Reproduce
  1. Initiate app creation via launcher
  2. (optionally select mission, runtime and pipeline)
  3. Go to the git provider step, the form looks and behaves as if user has no git account linked for a while and then it changes to logged in.
Additional Information

AFAICT, the form/ui calls GET https://forge.api.openshift.io/api/services/git/user for user info and while waiting for the response, the git provider form behaves as logged out (git provider not linked, the login button enabled).

Normally it is not an issue, but in a corner case when the git account has a lot of repositories it takes a while for this endpoint to respond (~20s in case of 2.7k repositories in github account) and for the duration of the request the form looks/behaves incorrectly.

IMHO the form should be disabled with a note that user info is being loaded.

joshuawilson commented 5 years ago

I can't reproduce this. I have over a 100 repos on my account.

That said, we can disable the form until you are logged in. What do you think @openshiftio/uxd-team ?

serenamarie125 commented 5 years ago

I think the problem being reported is that they are logged in, but it's taking a long time to show the information. In the recording, it shows that the username is NONE for a few minutes, the Login In button is enabled and the associated fields are disabled.

In my opinion, the proper solution would be, if there is a authorized GH account, (1) show the username (2) disable the Log In button (3) show some type of loading pattern, until all the locations/repositories are retrieved and accessible

@pmacik would this solve the issue for you?

@joshuawilson, this would only be possible if there are 2 separate calls: 1-is the GH account authorized and 2-get the locations/repositories

If this is feasible, we can provide a design

joshuawilson commented 5 years ago

@serenamarie125 they are 2 different calls to GitHub.

christianvogt commented 5 years ago

@serenamarie125 our app has many problems dealing with async data. We tend to show incorrect information while data is loading instead of proper progress. This is just another case where this is happening.

I agree with your suggested solution. We may not be able to show the username until the call returns (not confirmed).

serenamarie125 commented 5 years ago

@AshishDurgude can you please work on high fidelity mocks for these and incorporate into an Invision using the notes in the right side of the invision ?

gitproviderauthorization

serenamarie125 commented 5 years ago

@joshuawilson @christianvogt FYI here are the high fidelity mocks: https://redhat.invisionapp.com/share/3SPRFA3HJEM#/screens/338490463

If you approve with this proposal, please create an issue in planner, and link it in this issue.

joshuawilson commented 5 years ago

Design looks fine. Since this is bug I'm going to leave it here and just removed team/ux.

serenamarie125 commented 5 years ago

ok great thanks @joshuawilson ! I've also unassigned the UX team members