Skip to content

Commit a3c51a0

Browse files
authored
fix(ui): replace contrast severity with secondary for consistent styling (#208)
* refactor(logging): migrate to singleton logger service - Created LoggerService singleton with WeakMap-based operation tracking - Prevents duplicate logs and memory leaks - CloudWatch-optimized structured JSON logging - Updated 10 controllers, 2 middleware, 7 services, 2 utils - Improved error handling with centralized error middleware logging - Removed redundant error logs before next(error) calls - Net reduction of 706 lines LFXV2-903 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <[email protected]> * refactor(logging): extend logger service for infrastructure operations Extended LoggerService to support both request-scoped and infrastructure operations by making req parameter optional. Migrated all 41 direct serverLogger calls across services, utilities, and routes to use the unified logger service pattern. Changes: - Extended LoggerService methods to accept Request | undefined - Migrated 11 request-scoped operations to pass req parameter - Migrated 30 infrastructure operations to use logger with undefined - Updated ai.service, user.service, project.service method signatures - Replaced serverLogger calls in nats, snowflake, lock-manager services - Updated CLAUDE.md with comprehensive logging documentation - Removed serverLogger imports from all service/utility files Benefits: - Unified logging interface for all operations - Better request correlation when context available - Consistent error handling with err field - Infrastructure operations now use same pattern LFXV2-903 Signed-off-by: Asitha de Silva <[email protected]> * docs(logging): update docs for infrastructure logging Updated logging-monitoring.md to reflect the new dual-mode logger service that supports both request-scoped and infrastructure operations. Added documentation for the new server-logger.ts file that breaks the circular dependency between server.ts and logger.service.ts. Changes: - Added logging architecture layers diagram showing server-logger.ts - Updated all method signatures to show req | undefined pattern - Added infrastructure logging examples for all methods - Documented circular dependency resolution - Clarified when to use request-scoped vs infrastructure logging LFXV2-903 Signed-off-by: Asitha de Silva <[email protected]> * refactor(meetings): move agenda generation to controller Moved AI agenda generation logic from inline route handler to MeetingController.generateAgenda method for better separation of concerns and consistency with other route patterns. Also improved logger usage in middleware and services: - auth.middleware: better error tracking with startTime - error-handler.middleware: use operation startTime when available - access-check.service: move startOperation before try block - etag.service: use debug instead of silent startOperation - persona-helper: use success/error instead of warning LFXV2-903 Signed-off-by: Asitha de Silva <[email protected]> * docs(logging): update architecture diagram for server-logger Updated CLAUDE.md logging architecture diagram to reflect the new server-logger.ts file that breaks the circular dependency between server.ts and logger.service.ts. LFXV2-903 Signed-off-by: Asitha de Silva <[email protected]> * fix: claude.md linting issues Signed-off-by: Asitha de Silva <[email protected]> * refactor(meetings): standardize generateAgenda error handling LFXV2-903 Use ServiceValidationError.fromFieldErrors() and next() for validation errors instead of manual 400 response, consistent with other controller methods. Provides field-level error details and centralized error handling through middleware. Signed-off-by: Asitha de Silva <[email protected]> * fix: linting issues for docs Signed-off-by: Asitha de Silva <[email protected]> * fix(ui): replace contrast severity with secondary for consistent styling Replace 'contrast' severity with 'secondary' across meeting and committee components for improved visual consistency and better theme compatibility. Changes: - Member card: secretary role badge severity - Dashboard meeting card: button severities and meeting type badges - Meeting card: join button severities and meeting type badges - Meeting join: button styling and meeting type badges LFXV2-905 Signed-off-by: Asitha de Silva <[email protected]> --------- Signed-off-by: Asitha de Silva <[email protected]>
1 parent 1cb6ac8 commit a3c51a0

File tree

7 files changed

+15
-8
lines changed

7 files changed

+15
-8
lines changed

apps/lfx-one/src/app/modules/committees/components/member-card/member-card.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class MemberCardComponent {
4848
const role = this.member().role?.name?.toLowerCase();
4949
if (role === 'chair' || role === 'chairperson') return 'info';
5050
if (role === 'vice chair' || role === 'vice-chair') return 'success';
51-
if (role === 'secretary') return 'contrast';
51+
if (role === 'secretary') return 'secondary';
5252
return 'secondary';
5353
});
5454

apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@
9999
<div class="flex gap-2">
100100
<!-- See Meeting button - full width when alone, flex-1 when both buttons present -->
101101
<lfx-button
102-
class="w-full border border-gray-300 text-gray-900 hover:bg-gray-50 h-8 text-sm font-medium"
102+
class="w-full"
103+
severity="secondary"
104+
size="small"
105+
styleClass="w-full"
103106
label="See Meeting Details"
104107
[href]="meetingDetailUrl()"
105108
target="_blank"
@@ -122,7 +125,8 @@
122125
type="button"
123126
rel="noopener noreferrer"
124127
icon="fa-light fa-video"
125-
styleClass="w-full bg-emerald-500 hover:bg-emerald-600 text-white h-8 text-sm font-semibold"
128+
severity="success"
129+
styleClass="w-full h-8"
126130
data-testid="dashboard-meeting-card-join-button" />
127131
}
128132
}

apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class DashboardMeetingCardComponent {
103103
if (config.textColor.includes('red')) severity = 'danger';
104104
else if (config.textColor.includes('blue')) severity = 'info';
105105
else if (config.textColor.includes('green')) severity = 'success';
106-
else if (config.textColor.includes('purple')) severity = 'contrast';
106+
else if (config.textColor.includes('purple')) severity = 'secondary';
107107
else if (config.textColor.includes('amber')) severity = 'warn';
108108

109109
return {

apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ <h3 class="text-base font-medium text-gray-900 leading-tight tracking-tight" dat
208208
target="_blank"
209209
rel="noopener noreferrer"
210210
icon="fa-light fa-video"
211-
styleClass="w-full !bg-emerald-500 hover:!bg-emerald-600 !text-white !font-semibold"
211+
severity="success"
212+
styleClass="w-full"
212213
data-testid="join-meeting-button">
213214
</lfx-button>
214215
} @else {
@@ -221,7 +222,8 @@ <h3 class="text-base font-medium text-gray-900 leading-tight tracking-tight" dat
221222
[queryParams]="joinQueryParams()"
222223
rel="noopener noreferrer"
223224
icon="fa-light fa-video"
224-
styleClass="w-full !bg-emerald-500 hover:!bg-emerald-600 !text-white !font-semibold"
225+
severity="success"
226+
styleClass="w-full"
225227
data-testid="join-meeting-button">
226228
</lfx-button>
227229
}

apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ export class MeetingCardComponent implements OnInit {
571571
case 'marketing':
572572
return { badgeClass: 'bg-green-100 text-green-500', severity: 'success', icon: 'fa-light fa-chart-line-up', text: meetingType };
573573
case 'technical':
574-
return { badgeClass: 'bg-purple-100 text-purple-500', severity: 'contrast', icon: 'fa-light fa-code', text: meetingType };
574+
return { badgeClass: 'bg-purple-100 text-purple-500', severity: 'secondary', icon: 'fa-light fa-code', text: meetingType };
575575
case 'legal':
576576
return { badgeClass: 'bg-amber-100 text-amber-500', severity: 'warn', icon: 'fa-light fa-scale-balanced', text: meetingType };
577577
default:

apps/lfx-one/src/app/modules/meetings/meeting-join/meeting-join.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ <h1 [attr.data-testid]="'meeting-title'">
116116
<div class="w-full md:w-[296px]">
117117
<lfx-button
118118
class="w-full h-[40px]"
119+
styleClass="w-full"
119120
label="Join Meeting"
120121
icon="fa-light fa-video"
121122
severity="success"

apps/lfx-one/src/app/modules/meetings/meeting-join/meeting-join.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export class MeetingJoinComponent {
336336
case 'marketing':
337337
return { badgeClass: 'bg-green-100 text-green-500', severity: 'success', icon: 'fa-light fa-chart-line-up', text: meetingType };
338338
case 'technical':
339-
return { badgeClass: 'bg-purple-100 text-purple-500', severity: 'contrast', icon: 'fa-light fa-code', text: meetingType };
339+
return { badgeClass: 'bg-purple-100 text-purple-500', severity: 'secondary', icon: 'fa-light fa-code', text: meetingType };
340340
case 'legal':
341341
return { badgeClass: 'bg-amber-100 text-amber-500', severity: 'warn', icon: 'fa-light fa-scale-balanced', text: meetingType };
342342
default:

0 commit comments

Comments
 (0)