Conversation
|
Caution Review failedFailed to post review comments Note
|
| Cohort / File(s) | Summary |
|---|---|
Theming System Overhaul apps/web/src/app/shared/services/darkmode.service.ts |
Introduces EThemeModes enum (LIGHT, DARK, SYSTEM) and ThemeOptions type; implements OnDestroy lifecycle; adds reactive theme signal typed to ThemeOptions; introduces activateTheme(theme) method and system media query listening; persists theme to localStorage and manages DOM attributes. |
apps/web/src/app/core/layouts/documentation/documentation.layout.ts |
|
apps/web/src/app/domain/components/header/header.component.ts apps/web/src/app/domain/components/header/header.component.html |
|
apps/web/src/app/domain/pages/dark-mode/dark-mode.page.ts apps/web/src/app/domain/pages/dark-mode/dark-mode.page.html |
|
apps/web/src/index.html |
|
apps/web/src/app/app.config.ts |
|
Sidebar & Navigation Enhancements apps/web/src/app/domain/components/sidebar/scroll-on-active.directive.ts |
New Angular directive (selector: [routerLinkActive][scrollOnActive]) that listens to RouterLinkActive.isActiveChange and smoothly scrolls active links into view; uses DestroyRef for cleanup. |
apps/web/src/app/domain/components/sidebar/sidebar.component.ts |
|
apps/web/src/app/domain/components/doc-command/doc-command.component.ts |
|
Routing & Build Configuration apps/web/prerender-routes.txt |
Adds prerender paths: /colors, /docs/blocks, /docs/pre-processors, /docs/roadmap, /docs/changelog, /docs/components/button-group, /docs/components/carousel, /docs/components/kbd. |
apps/web/update-routes.mjs |
|
apps/web/project.json |
|
Library Component Metadata Standardization libs/zard/src/lib/components/accordion/* libs/zard/src/lib/components/alert/* libs/zard/src/lib/components/avatar/* libs/zard/src/lib/components/badge/badge.component.ts libs/zard/src/lib/components/breadcrumb/breadcrumb.component.ts libs/zard/src/lib/components/button/button.component.ts |
Adds exportAs aliases to component decorators (e.g., exportAs: 'zAccordion', exportAs: 'zAlert', exportAs: 'zAvatar', exportAs: 'zButton'); standardizes changeDetection: ChangeDetectionStrategy.OnPush and encapsulation: ViewEncapsulation.None; converts non-self-closing <ng-content></ng-content> to <ng-content />; consolidates decorator metadata placement. |
Component Specs & Demos - Standalone & Metadata libs/zard/src/lib/components/*/demo/*.ts libs/zard/src/lib/components/*/*.spec.ts |
Consistently positions standalone: true after imports array in decorators; updates test host components to use standalone: true; replaces non-self-closing tags with self-closing syntax (e.g., <z-icon .../>). |
Calendar Component - ControlValueAccessor libs/zard/src/lib/components/calendar/calendar.component.ts |
Implements ControlValueAccessor interface; adds NG_VALUE_ACCESSOR provider; introduces writeValue(), registerOnChange(), registerOnTouched(), setDisabledState() methods; changes disabled from input to model; replaces new Date() calls with makeSafeDate() utility for DST-safe navigation. |
libs/zard/src/lib/components/calendar/calendar.utils.ts |
|
libs/zard/src/lib/components/calendar/doc/api.md |
|
Carousel Component - Styling & Plugin Export libs/zard/src/lib/components/carousel/carousel.component.ts |
Changes ZardCarouselControlsVariants and ZardCarouselOrientationVariants to type-only imports; updates dot indicator styling from stroke-based to fill-only with size-4; restores ChangeDetectionStrategy.OnPush in decorators. |
libs/zard/src/lib/components/carousel/index.ts |
|
libs/zard/src/lib/components/carousel/demo/* |
|
Combobox Component - Output Refactoring libs/zard/src/lib/components/combobox/combobox.component.ts |
Replaces @Output() zValueChange = new EventEmitter() with output<string | null>() signal-based output; renames zOnSelect to zComboSelected output; replaces @HostListener decorators with class methods onKeyDown(), onDocumentKeyDown(); adds exportAs: 'zCombobox'; updates template to emit zComboSelected instead of handling zOnSelect. |
Button-Group Component libs/zard/src/lib/components/button-group/button-group.component.ts |
Adds public class input; introduces classes computed property merging variants; refactors divider and text directive to expose inline templates and exportAs aliases. |
libs/zard/src/lib/components/button-group/demo/select.ts |
|
Alert Dialog System libs/zard/src/lib/components/alert-dialog/* |
Removes generic type parameter R from ZardAlertDialogRef; removes afterClosed observable; simplifies close() method (no result parameter); removes exportAs from component decorator; refactors service portal creation with explicit ViewContainerRef usage; simplifies test by removing PLATFORM_ID/SSR logic. |
Checkbox Component libs/zard/src/lib/components/checkbox/checkbox.component.ts |
Adds new public inputs/output: checkChange output, class input, disabled input (with transform), zType, zSize, zShape inputs; adds exportAs: 'zCheckbox'. |
Card Component libs/zard/src/lib/components/card/card.component.ts |
Adds zDescription input (string | TemplateRef<void>), class input; introduces computed properties for classes, headerClasses, bodyClasses; adds exportAs: 'zCard'. |
Avatar Component libs/zard/src/lib/components/avatar/avatar-group.component.ts |
Adds exportAs: 'zAvatarGroup' and template to decorator; adds/exposes computed classes property. |
Utilities & Configuration apps/web/src/styles.css |
Replaces Tailwind @apply important prefix syntax (!border-...) with postfix syntax (border-...!) across four table selectors. |
apps/web/src/app/shared/services/rehype-enhanced-code.ts |
|
libs/zard/eslint.config.mjs |
|
libs/blocks/tsconfig.json libs/blocks/tsconfig.lib.json libs/zard/src/index.ts apps/web/tsconfig.editor.json apps/web/tsconfig.json |
Sequence Diagram(s)
sequenceDiagram
participant App as App Bootstrap
participant DOM as index.html Script
participant DMS as DarkModeService
participant LS as localStorage
participant Media as System MediaQuery
participant Header as HeaderComponent
participant Doc as DocumentationLayout
App->>DOM: Load page
DOM->>LS: Read 'theme'
DOM->>Media: Check system dark mode
alt Theme in localStorage
DOM->>DOM: Apply stored theme + classes
else System dark mode detected
DOM->>DOM: Apply dark + system default
else
DOM->>DOM: Apply light (default)
end
DOM->>+DMS: Initialize DarkModeService
DMS->>DMS: Set themeSignal from stored/system
DMS->>Media: Attach listener if SYSTEM mode
DMS-->>-DOM: Service ready
rect rgb(200, 220, 240)
note right of Header: User selects theme
Header->>Header: activateTheme(EThemeModes.DARK)
Header->>+DMS: activateTheme(DARK)
DMS->>LS: Persist DARK to localStorage
DMS->>DMS: Update themeSignal
DMS->>DOM: Update data-theme, .dark class
DMS->>Doc: Notify via computed/signal
DMS-->>-Header: Theme activated
Doc->>Doc: Update currentTheme computed
end
rect rgb(240, 200, 220)
note right of DMS: System mode active
Media->>DMS: prefers-color-scheme changes
DMS->>DMS: handleSystemChanges()
DMS->>DOM: Update DOM classes
end
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~65 minutes
Key areas requiring extra attention:
libs/zard/src/lib/components/calendar/calendar.component.ts— ControlValueAccessor implementation with form integration,makeSafeDateutility usage, and internal state management changes; verify callback registration and disposal patterns.apps/web/src/app/shared/services/darkmode.service.ts— Complex theming logic with system media query listeners, localStorage persistence, lifecycle management (ngOnDestroy), signal-based state; verify theme application order, listener cleanup, and edge cases (SYSTEM mode toggle).libs/zard/src/lib/components/combobox/combobox.component.ts— Significant refactoring from@HostListener/@Outputdecorators to signal-basedoutput()API; verify keyboard navigation, popover open/close handling, and option selection flow.libs/zard/src/lib/components/alert-dialog/*— Removal of generic result type andafterClosedobservable impacts dialog consumers; verify disposal timing and error handling withwaitForTransitionEnd.libs/zard/eslint.config.mjs— Expanded ESLint rules with multiple Angular-specific settings; verify rules don't conflict and check intended severities (warn vs. error).- Breadth of component metadata updates — ~30+ component files updated with
exportAs,ChangeDetectionStrategy.OnPush, and decorator reorganization; verify consistency and no accidental removals of important metadata.
Possibly related PRs
- Feature(select)/#285 multiselect #309 — Modifies
libs/zard/src/lib/components/button-group/demo/select.ts(adds FormsModule usage); overlaps with this PR's button-group demo currency signal initialization. - feat -
kbdcomponent #314 — Adds Kbd component routing and exports; directly relates to prerender-routes.txt additions for/docs/components/kbd. - Feat/#61 carousel component restart #311 — Modifies carousel component implementation, demos, and variants; overlaps with carousel styling, demo, and plugin export changes in this PR.
Suggested reviewers
- srizzon
- Luizgomess
🌓 Themes now dance with the system's whim,
Signals glow where decorators grew dim,
ControlValue guards the calendar's rhyme,
While components bow to Angular's time. ✨
Form control embraces the combobox,
And OnPush optimization unlocks the box. 📦
Pre-merge checks and finishing touches
❌ Failed checks (3 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Title check | Title mentions fixing commit messages, but changeset contains extensive component, service, and styling modifications unrelated to commit message corrections. | Align PR title with actual changes: describe the primary architectural updates (theme system refactor, component API modernization, form control integration) or split into multiple focused PRs. | |
| Description check | Description claims to fix commit messages, but the actual changeset involves substantial feature additions and refactoring across theme handling, component APIs, carousel plugins, calendar form integration, and Angular patterns. | Update description to accurately document the PR scope: theme system improvements, component standalone/signals migration, ControlValueAccessor integration, and modernized Angular patterns. Include motivation and testing scope. | |
| Docstring Coverage | Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
fix-commits
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
What was done? 📝
Fixed two commit message that went without emoticon in master
Type of change 🏗
Breaking change 🚨
Checklist 🧐