Skip to content
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 (dialog popup) #178

Merged
merged 38 commits into from
Sep 11, 2023

Conversation

chia-yh
Copy link
Contributor

@chia-yh chia-yh commented Jul 17, 2023

Summary:

Attempt to resolve #154
Alternative to #169 as suggested in #154 (comment)

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.

Login -> Sign in to Github -> Confirm Login Account -> Issues Dashboard (Popup to select repository)

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:

  • ✨ New Feature/ Enhancement

Changes Made:

  • Add login.component, which extracts the AuthService::startOAuthProcess() call from session-selection.component.ts that allows users to login to Github
  • Add some tests for login.component in login.component.spec.test
  • Extract user data setup from ConfirmLoginComponent::completeLoginProcess() to AuthService::setupUserData(), leaving the creation of the user model, after which authentication state is changed to authenticated
  • Move handleAuthSuccess() from ConfirmLoginComponent to AuthService
  • Modify ConfirmLoginComponent tests as necessary
  • Add repoSetSource, repoSetState, isRepoSet() to AuthService
  • Change auth.component.html to show LoginComponent instead of SessionSelectionComponent by default
  • Change auth.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 process
  • initializeRepoNameInTitle() method call in HeaderComponent now subscribes to repoSetState instead of currentAuthState, and checks isAuthenticated() && isRepoSet() before calling the method, html uses isRepoSet() to display buttons requiring a current repository after one has been set
  • Subscription to currentAuthState in HeaderComponent now calls openChangeRepoDialog after user is authenticated
  • Header, button text, tooltips for RepoChangeFormComponent now differs based on if a repository has already been selected

Screenshots:

login_no_select_session

Proposed Commit Message:

Change auth process to login before selecting repo

Users select a repository before login.

WATcher does not fix a single repository, and allows users to change the
selected repository.

Having users login to Github prior to selecting a repository would
facilitate a smoother UX.

Let's allow users to login before choosing a repository.

Checklist:

  • I have tested my changes thoroughly.
  • I have created tests for any new code files created in this PR or provided a link to a issue/PR that addresses this.
  • I have added or modified code comments to improve code readability where necessary.
  • I have updated the project's documentation as necessary.

@gycgabriel
Copy link
Collaborator

gycgabriel commented Jul 26, 2023

Will review this after merging #169 because this builds on that

@gycgabriel gycgabriel added s.DoNotReview Do not review PR and removed s.toReview labels Jul 26, 2023
@gycgabriel gycgabriel added s.toReview and removed s.DoNotReview Do not review PR labels Sep 11, 2023
Copy link
Collaborator

@gycgabriel gycgabriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gycgabriel gycgabriel merged commit 67c2ab8 into CATcher-org:main Sep 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Login to Github before entering repository name
2 participants