CATcher-org / CATcher

CATcher is a software application used for peer-testing of software projects.
https://catcher-org.github.io/CATcher/
MIT License
70 stars 68 forks source link

Add login redirect #1256

Closed nknguyenhc closed 5 months ago

nknguyenhc commented 6 months ago

Summary:

Fixes #1229

Changes Made:

Unlike CATcher-org/WATcher#255,

Note that it only redirects to the current phase. If there are multiple open phases, the app only allows redirection to the "current phase", which is the first available phase. However, given that in CATcher, only one phase is allowed at a time,

Proposed Commit Message:

Add login redirect

Previously, upon login, users are brought to the
default landing page of the phase.

We redirect to the intended landing page,
with appropriate next route checking.
codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 9.09091% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 54.62%. Comparing base (5e7ed48) to head (951e632).

Files Patch % Lines
src/app/core/services/auth.service.ts 9.09% 9 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1256 +/- ## ========================================== - Coverage 54.82% 54.62% -0.21% ========================================== Files 105 105 Lines 2858 2867 +9 Branches 503 504 +1 ========================================== - Hits 1567 1566 -1 - Misses 1030 1038 +8 - Partials 261 263 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

luminousleek commented 6 months ago

Using an invalid URL (e.g. linking to an issue that doesn't exist) should redirect to the default landing page, but currently displays a blank page.

Screenshot 2024-04-01 at 1 10 43 PM
nknguyenhc commented 5 months ago

Using an invalid URL (e.g. linking to an issue that doesn't exist) should redirect to the default landing page, but currently displays a blank page. Screenshot 2024-04-01 at 1 10 43 PM

Fixed! In ViewIssueComponent::getAndPollIssue, I redirect to current phase landing page if there is error polling the issue.

luminousleek commented 5 months ago

Fixed! In ViewIssueComponent::getAndPollIssue, I redirect to current phase landing page if there is error polling the issue.

Cool, is it possible to have an error popup when this happens?