-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login to Github before entering repository name #169
Login to Github before entering repository name #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works good 👍
Will check code next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Let's have at least two reviews before merging this PR. |
While working on #154 (comment) , it occurred to me that I could make some changes to the current PR that would result in what I believe to be an improvement to the current implementation. I've made the changes in this branch:
These changes remove the code for setting up a separate subscription in instead of like this (current state of the PR): The user is able to logout at this point, but is unable to jump to a repository or sync with Github as there is no repository set, and "(Issue Dashboard)" is displayed, showing the current phase WATcher is in. If the changes in the branch seem appropriate, I can merge the commits from the branch onto this PR's branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are decoupling setting repository from auth, so it is better to move setting repository stuff to phase.service.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The select repo component is not hidden in the page.
Scrolling down on the logging page will reveal the component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, invalid repository like (" ") will always bring the user to the issueViewer phase.
This will then lead to a lot of error prompts.
There seems to be 'other forces' at work here as the application is still navigating to issueViewer before handleSetRepoSuccess()
is not called. (not sure why this is the case)
private logger: LoggingService | ||
) {} | ||
|
||
ngOnInit() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ngOnInit() {} |
ngOnInit()
is not used. Let's remove implements OnInit
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@gycgabriel could I check if there are any further comments with respect to changes that need to be made to this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, my comments have been addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary:
Attempt to resolve #154
WATcher allows users to change repositories, i.e., the repository is not fixed like in CATcher. Having users login first, then being able to choose the repository they wish to see would allow for a smoother UX, e.g.
Currently displays a minimal login card that redirects users to sign in to Github. Future enhancements to the UI would be desirable.
Type of change:
Changes Made:
login.component
, which extracts theAuthService::startOAuthProcess()
call fromsession-selection.component.ts
that allows users to login to Githublogin.component
inlogin.component.spec.test
ConfirmLoginComponent::completeLoginProcess()
toAuthService::setRepo()
, leaving the creation of the user model, after which authentication state is changed to authenticatedhandleAuthSuccess()
fromConfirmLoginComponent
toAuthService
, renamed tohandleSetRepoSuccess()
ConfirmLoginComponent
tests as necessaryrepoSetSource
,repoSetState
,isRepoSet()
toPhaseService
to determine whetherapp-session-selection
is displayedauth.component.html
to showLoginComponent
instead ofSessionSelectionComponent
by defaultauth.component.html
to prevent current session from being shown on the login card for confirming login account, as no session has been set at that point of the processinitializeRepoNameInTitle()
method call inHeaderComponent
now subscribes torepoSetState
instead ofcurrentAuthState
, and checksisAuthenticated() && isRepoSet()
before calling the method,html
usesisRepoSet()
to display buttons requiring a current repository after one has been setScreenshots:
Proposed Commit Message:
Checklist: