-
Couldn't load subscription status.
- Fork 0
feat(ui): comprehensive ui improvements and persona system enhancement #128
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,3 @@ | |
| <div class="top-20"> | ||
| <router-outlet /> | ||
| </div> | ||
|
|
||
| <!-- Footer Component --> | ||
| <lfx-footer class="py-8"></lfx-footer> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| // Copyright The Linux Foundation and each contributor to LFX. | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| import { Component, computed, inject } from '@angular/core'; | ||
| import { Component, computed, inject, Signal } from '@angular/core'; | ||
| import { PersonaService } from '@app/shared/services/persona.service'; | ||
| import { PersonaType } from '@lfx-one/shared/interfaces'; | ||
|
|
||
| import { HomeComponent } from '../pages/home/home.component'; | ||
| import { CoreDeveloperDashboardComponent } from './core-developer/core-developer-dashboard.component'; | ||
| import { MaintainerDashboardComponent } from './maintainer/maintainer-dashboard.component'; | ||
|
|
||
|
|
@@ -13,7 +16,7 @@ import { MaintainerDashboardComponent } from './maintainer/maintainer-dashboard. | |
| @Component({ | ||
| selector: 'lfx-dashboard', | ||
| standalone: true, | ||
| imports: [CoreDeveloperDashboardComponent, MaintainerDashboardComponent], | ||
| imports: [CoreDeveloperDashboardComponent, MaintainerDashboardComponent, HomeComponent], | ||
| templateUrl: './dashboard.component.html', | ||
| }) | ||
| export class DashboardComponent { | ||
|
|
@@ -23,9 +26,8 @@ export class DashboardComponent { | |
| * Computed signal that determines which dashboard to display | ||
| * based on the current persona selection | ||
| */ | ||
| protected readonly dashboardType = computed(() => { | ||
| protected readonly dashboardType: Signal<PersonaType> = computed(() => { | ||
| const persona = this.personaService.currentPersona(); | ||
| // Filter out 'old-ui' as it has its own route | ||
| return persona === 'old-ui' ? 'core-developer' : persona; | ||
| return persona; | ||
| }); | ||
|
Comment on lines
+29
to
32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 🧩 Analysis chainTyped Signal looks good; add a safe default to harden against bad persona values. Defensively default to 'projects' if the service ever returns null/unknown. - protected readonly dashboardType: Signal<PersonaType> = computed(() => {
- const persona = this.personaService.currentPersona();
- return persona;
- });
+ protected readonly dashboardType: Signal<PersonaType> = computed(() => {
+ const persona = this.personaService.currentPersona();
+ return (persona ?? 'projects') as PersonaType;
+ });To ensure alignment with objectives, please confirm the set of persona literals used across the app: 🏁 Script executed: #!/bin/bash
rg -nP -C2 "PersonaType|currentPersona|setPersona|\bprojects\b|\bhome\b"Length of output: 111653 Remove unnecessary fallback and add license header
🤖 Prompt for AI Agents |
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -55,6 +55,7 @@ export class ButtonComponent { | |||||||||||||||||||||||||||||
| public readonly href = input<string | undefined>(undefined); | ||||||||||||||||||||||||||||||
| public readonly target = input<string | undefined>(undefined); | ||||||||||||||||||||||||||||||
| public readonly rel = input<string | undefined>(undefined); | ||||||||||||||||||||||||||||||
| public readonly queryParams = input<Record<string, string>>({}); | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Use Angular The shared button should accept the full RouterLink -import { RouterModule } from '@angular/router';
+import { Params, RouterModule } from '@angular/router';
…
- public readonly queryParams = input<Record<string, string>>({});
+ public readonly queryParams = input<Params | undefined>(undefined);📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // Events | ||||||||||||||||||||||||||||||
| public readonly onClick = output<MouseEvent>(); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.