Skip to content

refactor(home): Adopt Angular Signals for reactive state management a… - #804

Merged
vishwanath1004 merged 33 commits into
ELEVATE-Project:release-3.4.0_ng20from
rohxnn:release-3.4.0-21
Feb 24, 2026
Merged

refactor(home): Adopt Angular Signals for reactive state management a…#804
vishwanath1004 merged 33 commits into
ELEVATE-Project:release-3.4.0_ng20from
rohxnn:release-3.4.0-21

Conversation

@rohxnn

@rohxnn rohxnn commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

…nd template bindings.

@coderabbitai

coderabbitai Bot commented Feb 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<div slot="start" class="img-mainDiv">
@if (user()?.image) {
<div class="image-div">
<img class="profile-image" src="{{user()?.image}}" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do property binding

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[src]="user()?.image"

fullscreen
[ngClass]="{'disable-div': user?.profile_mandatory_fields.length || !user?.about}"
>
@if (user()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use like @if (user(); as userData) this instead of @if (user()) everywhere

<ion-label class="username"><strong>{{user()?.name}}</strong></ion-label>
<div class="user-role-labels">
@if (userRoles()) {
<ion-label>{{ isMentor() ? ('MENTOR' | translate): ('MENTEE' | translate)}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

However you are using signals, so here you can use computed signal like : in TS - roleLabel = computed(() =>
this.isMentor() ? 'MENTOR' : 'MENTEE'
); in HTML - {{ roleLabel() | translate }}

Comment thread src/app/modules/private/private.page.ts Outdated
user;
user = signal<any>(null);
PAGE_IDS = PAGE_IDS;
public appPages = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move all these pages into a constant file, and fetch from there.

Comment thread src/app/modules/private/private.page.ts Outdated
@@ -32,13 +33,13 @@ import {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This component handling so many things, we are initializing everything in this component only so create a seperate service to initialize FrontendChatLibraryService,
RocketChatApiService, theme,initializeLanguage , load user , PermissionService and other things

Comment thread src/app/modules/private/private.page.ts Outdated
const response = await this.profile.getRequestCount();
const { result = {} } = response || {};
const { sessionRequestCount = 0, connectionRequestCount = 0 } = result || {};
if (sessionRequestCount > 0 || connectionRequestCount > 0) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this logic also you can move to the new service

Comment thread src/app/modules/private/private.page.ts Outdated
} catch (error) {
console.error("Error parsing theme from localStorage:", error);
getUser() {
let theme: any = localStorage.getItem('theme');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Handle this as separate method

@vishwanath1004
vishwanath1004 merged commit 01565fc into ELEVATE-Project:release-3.4.0_ng20 Feb 24, 2026
1 of 2 checks passed
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.

3 participants