Skip to content

ISSUE: #47 login page shouldnt show please log in when already logged in#51

Merged
kosarko merged 27 commits intoclarin-v7from
47-login-page-shouldnt-show-please-log-in-when-already-logged-in
Oct 14, 2025
Merged

ISSUE: #47 login page shouldnt show please log in when already logged in#51
kosarko merged 27 commits intoclarin-v7from
47-login-page-shouldnt-show-please-log-in-when-already-logged-in

Conversation

@amadulhaxxani
Copy link
Copy Markdown

  • Showing alternative message at Login screen when user is authenticated
  • test for initializeTheAuthenticationState method

Created a guard  so a user cannot navigate to login page if authenticated
Showing alternative message when user authenticated
removing the reverse auth guard approach
optimized the code
test for initializeTheAuthenticationState
lint fix
lint fix
rolling back the app routing file
roling back the core modules
lint fixes
@kosarko kosarko requested a review from Copilot October 9, 2025 11:02
@kosarko kosarko self-assigned this Oct 9, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the user experience on the login page by displaying an alternative message and navigation options when a user is already authenticated, instead of showing the standard login form.

  • Added logic to detect authenticated users and display an appropriate message with navigation options
  • Enhanced the login page component with authentication state management
  • Added new translation keys for the already-authenticated user interface

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/assets/i18n/en.json5 Added English translations for already-authenticated user messages and reformatted existing arrays
src/assets/i18n/cs.json5 Added Czech translations for already-authenticated user messages and reformatted existing arrays
src/app/login-page/login-page.component.ts Added authentication state detection and user information retrieval logic
src/app/login-page/login-page.component.spec.ts Added comprehensive tests for the authentication state initialization method
src/app/login-page/login-page.component.html Added conditional rendering to show different content for authenticated vs non-authenticated users
Comments suppressed due to low confidence (1)

src/assets/i18n/cs.json5:1

  • The Czech translation file contains English text instead of Czech translations for the new authentication messages. These should be translated to Czech for proper internationalization.
{

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

removing the console.log statement
Copy link
Copy Markdown
Member

@kosarko kosarko left a comment

Choose a reason for hiding this comment

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

One question there, plus we should try to keep the amount of changes to a minimum - i.e. don't change formatting etc. when not necessary - it hides what the actual changes were

@kosarko kosarko assigned amadulhaxxani and unassigned kosarko Oct 9, 2025
uncommenting changes
rolling back the cs.json5 changes
removing curation-task.task translation
rolling back the en.json5
removing curation-task trans
rolling back some unnecessary changes
@kosarko kosarko requested a review from Copilot October 14, 2025 07:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

src/assets/i18n/cs.json5:1

  • The Czech translations are not localized - they contain English text. These strings should be translated to Czech to provide proper internationalization support.
{

kosarko and others added 2 commits October 14, 2025 09:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kosarko and others added 8 commits October 14, 2025 09:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
preventing memory leak by properly unsubscribing from auth observables
chnaging the sub2 option for code consistency
removed two subs and keeping one subject instead for unsubscribing

removing unused imports

removing the takeUntil from 1st Sub as  take(1) completes after one emission
using subs array for consistency
lint fixes
@kosarko kosarko merged commit 91bf102 into clarin-v7 Oct 14, 2025
5 checks passed
@kosarko kosarko deleted the 47-login-page-shouldnt-show-please-log-in-when-already-logged-in branch November 13, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login page shouldn't show "Please log in" when already logged in

3 participants