Skip to content

✨ feat(context-menu): adding context menu directive#381

Merged
Luizgomess merged 6 commits intomasterfrom
feat/#196-context-menu-from-scratch
Dec 21, 2025
Merged

✨ feat(context-menu): adding context menu directive#381
Luizgomess merged 6 commits intomasterfrom
feat/#196-context-menu-from-scratch

Conversation

@mikij
Copy link
Contributor

@mikij mikij commented Dec 20, 2025

What was done? 📝

Key Changes Made

1. Context Menu Directive (context-menu.directive.ts)

  • New directive that uses Angular CDK's CdkContextMenuTrigger
  • Supports both mouse right-click and keyboard activation (ContextMenu key or Shift+F10)
  • Implements proper ARIA attributes for accessibility
  • Handles menu positioning and focus management
  • Automatically closes menu on scroll/resize events

2. Menu Label Component (menu-label.component.ts)

  • New component for labeling sections within menus
  • Supports inset styling variant
  • Uses computed signals for class merging
  • Follows Angular best practices with OnPush change detection

3. Menu Shortcut Component (menu-shortcut.component.ts)

  • Component for displaying keyboard shortcuts in menu items
  • Simple, focused component with consistent styling
  • Moved from dropdown component to shared menu component

4. Menu System Migration

  • Migrated from NgModules to standalone components/imports
  • Updated all demo files and documentation to use new ZardMenuImports
  • Added comprehensive test coverage for new components
  • Updated API documentation and usage examples

5. Documentation & Demos

  • Added context menu demo showcasing right-click functionality
  • Updated installation guides with new import syntax
  • Enhanced API documentation for all menu components
  • Added examples of nested menus and keyboard shortcuts

Technical Highlights

  • Accessibility: Full WCAG compliance with proper ARIA attributes, keyboard navigation, and focus management
  • Performance: Uses OnPush change detection and computed signals throughout
  • DX: Clean, intuitive API with standalone component imports
  • Integration: Seamlessly works with existing menu system while adding context menu capabilities

The implementation follows Angular 17+ best practices including signals, standalone components, and modern control flow syntax. The context menu provides a native-like experience with proper positioning, keyboard support, and accessibility features.

Screenshots or GIFs 📸

image

Link to Issue 🔗

closes #196

Type of change 🏗

  • New feature (non-breaking change that adds functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • Refactor (non-breaking change that improves the code or technical debt)
  • Chore (none of the above, such as upgrading libraries)

Breaking change 🚨

Based on my analysis of the feat/#196-context-menu-from-scratch branch, here are the breaking changes that will require updates for existing users:

🚨 Breaking Changes

1. Module System Removal

  • ZardMenuModule has been completely removed
  • ZardDropdownModule has been completely removed
  • Migration Required: Replace module imports with standalone imports:
    // Before
    import { ZardMenuModule } from '.../menu/menu.module';
    
    // After  
    import { ZardMenuImports } from '.../menu/menu.imports';

2. Import Path Changes

  • All relative imports have been converted to absolute imports using @/ alias
  • Migration Required: Update all import paths:
    // Before
    import { ZardButtonComponent } from '../../button/button.component';
    
    // After
    import { ZardButtonComponent } from '@/shared/components/button/button.component';

3. Component Renaming/Moving

  • ZardDropdownMenuShortcutComponent has been moved and renamed to ZardMenuShortcutComponent
  • Migration Required:
    • Update imports: ZardDropdownMenuShortcutComponentZardMenuShortcutComponent
    • Update selectors: z-dropdown-menu-shortcutz-menu-shortcut
    • Update template references: zDropdownMenuShortcutzMenuShortcut

4. Button Type Attributes

  • All button elements in demos now explicitly include type="button"
  • Migration Required: Add type="button" to menu item buttons to prevent form submissions:
    <!-- Before -->
    <button z-menu-item>Action</button>
    
    <!-- After -->
    <button type="button" z-menu-item>Action</button>

5. New Components Added (Non-Breaking)

  • ZardContextMenuDirective - New context menu functionality
  • ZardMenuLabelComponent - New menu labeling component
  • ZardMenuShortcutComponent - Enhanced shortcut component

📋 Migration Checklist

To upgrade from the previous version:

  1. ✅ Replace ZardMenuModule with ZardMenuImports in component imports
  2. ✅ Replace ZardDropdownModule with appropriate standalone imports
  3. ✅ Rename ZardDropdownMenuShortcutComponent to ZardMenuShortcutComponent
  4. ✅ Update component selectors from z-dropdown-menu-shortcut to z-menu-shortcut
  5. ✅ Update export template references if using component exports

🎯 Impact Assessment

  • High Impact: Module-based applications will need significant import refactoring
  • Medium Impact: Applications using dropdown shortcuts will need component renaming
  • Low Impact: Most existing menu functionality remains compatible
  • New Features: Context menu support added without breaking existing dropdown menus

Checklist 🧐

  • Tested on Chrome
  • Tested on Safari
  • Tested on Firefox
  • No errors in the console

Summary by CodeRabbit

  • New Features

    • Right-click context menu with keyboard support and a demo example.
    • New menu label and shortcut components for richer menu content.
  • Updates

    • Menu/dropdown organization revised for simpler imports and consistent usage.
    • Various components switched to OnPush change detection and buttons marked type="button" for safer interactions.
    • Styling and variant refinements for menus and dropdowns.
  • Tests

    • Added comprehensive context-menu and menu component tests.
  • Documentation

    • API docs updated to reflect new menu components and triggers.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (4)
  • apps/web/public/installation/manual/alert-dialog.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/dialog.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/alert-dialog.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/dialog.json is excluded by !apps/web/public/** and included by apps/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

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

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools', 'path_instructions'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Refactors imports to alias-based barrels, replaces legacy NgModules with new *Imports arrays (menu/dropdown), introduces a ZardContextMenuDirective with keyboard/right-click handling and positioning, adds menu label/shortcut components and variant refactors, and standardizes OnPush/change-detection across several UI components.

Changes

Cohort / File(s) Summary
Context Menu feature
libs/zard/src/lib/shared/components/menu/context-menu.directive.ts, libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts, libs/zard/src/lib/shared/components/menu/demo/context-menu.ts, libs/zard/src/lib/shared/components/menu/demo/menu.ts
New ZardContextMenuDirective implementing right‑click and keyboard (ContextMenu / Shift+F10) triggers, overlay positioning, focus/cleanup logic, and tests; added demo and registered example.
Menu components & variants
libs/zard/src/lib/shared/components/menu/menu-item.directive.ts, libs/zard/src/lib/shared/components/menu/menu-label.component.ts, libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts, libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts, libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts, libs/zard/src/lib/shared/components/menu/menu.variants.ts, libs/zard/src/lib/shared/components/menu/menu-content.directive.ts, libs/zard/src/lib/shared/components/menu/menu.imports.ts, libs/zard/src/lib/shared/components/menu/menu.module.ts, libs/zard/src/lib/shared/components/menu/index.ts, libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
Added z-menu-label and z-menu-shortcut, introduced zType for menu items, added host listeners and click prevention for disabled items, moved variant definitions to array-based CVA, added submenuArrow/menuLabel/menuShortcut variants, created ZardMenuImports, removed legacy ZardMenuModule, and adjusted menu-content to integrate focus trap and OnInit.
Dropdown migration & consolidation
libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts, libs/zard/src/lib/shared/components/dropdown/dropdown.module.ts, libs/zard/src/lib/shared/components/dropdown/index.ts, libs/zard/src/lib/shared/components/dropdown/dropdown-label.component.ts, libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts, libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts, libs/zard/src/lib/shared/components/dropdown/doc/api.md, libs/zard/src/lib/shared/components/dropdown/demo/default.ts
Replaced ZardDropdownModule with ZardDropdownImports, removed ZardDropdownMenuLabelComponent, removed label/shortcut variant exports, updated variant class tokens and selectors, migrated demos/docs to new menu API and alias imports.
Alias import & demo updates
libs/zard/src/lib/shared/components/*/demo/*.ts, apps/web/src/app/domain/components/*, apps/web/src/app/domain/pages/blocks/blocks.page.ts, libs/zard/src/lib/shared/components/layout/demo/sidebar.ts, libs/zard/src/lib/shared/components/button-group/demo/default.ts, libs/zard/src/lib/shared/components/input-group/demo/default.ts
Standardized demo/component imports to @/shared/... alias paths, replaced module imports with corresponding *Imports arrays, added explicit type="button" to interactive buttons, and applied OnPush change detection in several app components.
Sheet / Breadcrumb cleanup
libs/zard/src/lib/shared/components/sheet/sheet.module.ts, apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts, apps/web/src/app/domain/components/file-tree/file-tree.component.ts, apps/web/src/app/domain/pages/blocks/blocks.page.ts
Removed ZardBreadcrumbModule export/usages from module and component decorator imports; adjusted component metadata (OnPush added, standalone removed in some).
Utility renames & minor fixes
libs/zard/src/lib/shared/utils/merge-classes.ts, libs/zard/src/lib/shared/components/*/*.{ts,spec.ts}, libs/zard/src/lib/shared/components/alert-dialog/*, libs/zard/src/lib/shared/components/dialog/*, libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts, libs/zard/src/lib/shared/components/select/select-item.component.ts, libs/zard/src/lib/shared/components/sheet/sheet.component.ts
Renamed exported noop helper noopFunnoopFn and propagated fixes across consumers; small formatting/guard bracing changes; replaced some type-only inputs to TemplateRef<void> and tightened API types.

Sequence Diagram(s)

sequenceDiagram
    participant User as User (mouse/keyboard)
    participant Host as Host Element
    participant Directive as ZardContextMenuDirective
    participant CdkTrigger as CdkContextMenuTrigger
    participant Overlay as Overlay Pane / CDK Overlay
    participant Menu as z-menu-content/template

    User->>Host: right-click / Shift+F10
    Host->>Directive: contextmenu / key event (preventDefault)
    Directive->>Directive: compute coordinates (client rect or event)
    Directive->>CdkTrigger: open(coordinates)
    CdkTrigger->>Overlay: attach overlay at coordinates
    Overlay->>Menu: render template
    CdkTrigger-->>Directive: opened (emit/opened)
    Directive->>Menu: set focus if keyboard-open
    User->>Menu: navigate/select / click outside / press Escape
    Menu->>CdkTrigger: close()
    CdkTrigger->>Overlay: detach
    Directive->>Directive: remove scroll/resize listeners
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas needing extra attention:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts — event handling (keyboard/contextmenu), coordinate calc, CDK trigger usage, cleanup and a11y attributes.
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts — CVA migration and new variant shapes (verify class outputs and consumers).
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts — new zType input, host listeners, disabled-click prevention, interactions with submenus.
  • Migration of modules → *Imports arrays and updated component imports metadata across demos and app components (ensure all needed symbols are present).
  • Rename noopFunnoopFn ripple effects across utilities and default handlers.

Possibly related PRs

Suggested reviewers

  • Luizgomess
  • srizzon
  • ribeiromatheuss

Poem

Right-click whispers, menus bloom,
Imports tidy, variants loom,
Shortcuts, labels join the song,
OnPush hums and tests run strong—
Zard's context menus dance all night,
Cleaned-up code, and UI bright. 🪄

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Several significant out-of-scope changes were introduced beyond the context menu directive: removal of NgModules (ZardMenuModule, ZardDropdownModule), component renaming (ZardDropdownMenuShortcutComponent→ZardMenuShortcutComponent), menu system refactoring to standalone imports, and noopFun→noopFn rename across unrelated components. Consider splitting into focused PRs: one for context menu feature (#196), another for menu system migration, and a third for utility refactoring (noopFun→noopFn). This improves reviewability and follow the single-responsibility principle.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary feature added—context menu directive—which aligns with the main objective of the PR.
Description check ✅ Passed The PR description is comprehensive, covering key changes, technical highlights, breaking changes, and a detailed migration checklist aligned with the template.
Linked Issues check ✅ Passed The PR successfully implements all core requirements from issue #196: context menu directive with right-click support, keyboard activation, ARIA attributes, positioning, focus management, and comprehensive tests.

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.

@mikij mikij changed the title Feat/#196 context menu from scratch ✨ feat(context-menu): adding context menu directive Dec 20, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b5fc02 and f3ce405.

⛔ Files ignored due to path filters (14)
  • apps/web/public/components/breadcrumb/demo/ellipsis.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/button-group/demo/default.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/dropdown/demo/default.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/dropdown/doc/api.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/input-group/demo/default.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/layout/demo/sidebar.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/menu/demo/context-menu.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/menu/demo/default.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/menu/doc/api.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/menu/doc/context-menu.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/dropdown.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/menu.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/sheet.md is excluded by !apps/web/public/** and included by apps/**
  • packages/cli/src/core/registry/registry-data.ts is excluded by !packages/** and included by none
📒 Files selected for processing (33)
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts (2 hunks)
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts (1 hunks)
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts (1 hunks)
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts (1 hunks)
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts (2 hunks)
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts (3 hunks)
  • libs/zard/src/lib/shared/components/dropdown/doc/api.md (0 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown-label.component.ts (0 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts (1 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts (1 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown.module.ts (0 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts (1 hunks)
  • libs/zard/src/lib/shared/components/dropdown/index.ts (1 hunks)
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts (1 hunks)
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts (2 hunks)
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/demo/default.ts (4 hunks)
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts (2 hunks)
  • libs/zard/src/lib/shared/components/menu/doc/api.md (1 hunks)
  • libs/zard/src/lib/shared/components/menu/index.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts (4 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts (2 hunks)
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu.module.ts (0 hunks)
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts (1 hunks)
  • libs/zard/src/lib/shared/components/sheet/sheet.module.ts (0 hunks)
💤 Files with no reviewable changes (5)
  • libs/zard/src/lib/shared/components/dropdown/dropdown.module.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-label.component.ts
  • libs/zard/src/lib/shared/components/dropdown/doc/api.md
  • libs/zard/src/lib/shared/components/menu/menu.module.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.module.ts
🧰 Additional context used
📓 Path-based instructions (1)
libs/zard/**/*.{css,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Use CSS custom properties for design tokens and theming in the component library

Files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
🧠 Learnings (32)
📓 Common learnings
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/popover/popover.component.ts:28-29
Timestamp: 2025-11-30T13:27:41.206Z
Learning: In libs/zard/src/lib/components/core/**/*.ts files (core utilities, plugins, and providers), use relative imports for intra-core dependencies because the ZardUI CLI performs path transformations during component installation. The CLI expects specific relative path patterns and transforms them to the target project structure. For all other component imports and application code, use zard/* path aliases.
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Use path aliases `zard/*` pointing to `libs/zard/src/lib/*` for component imports
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Export all components in `libs/zard/src/lib/components/components.ts` for public API
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/core/providezard.ts:0-0
Timestamp: 2025-11-30T08:50:23.436Z
Learning: In libs/zard/src/lib/components/core/providezard.ts, the import paths `../core/event-manager-plugins/...` are intentionally structured this way because the ZardUI CLI transforms them to 'shared/components/core/event-manager-plugins/...' format. Other relative path combinations don't work with the current CLI implementation. This path pattern should not be simplified until the CLI transformation logic is updated.
Learnt from: mikij
Repo: zard-ui/zardui PR: 373
File: libs/zard/src/lib/shared/components/select/select.component.ts:33-33
Timestamp: 2025-12-15T11:43:10.889Z
Learning: For files in libs/zard/src/lib/**/*.{ts,tsx,js}, use the `@/` path alias for imports mapping to libs/zard/src/lib/* directories. For example, use `import { mergeClasses } from '@/shared/utils/merge-classes'` instead of `import { mergeClasses } from 'zard/shared/utils/merge-classes'`.
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/layout/sidebar.component.ts:22-22
Timestamp: 2025-11-26T10:13:44.258Z
Learning: The ZardUI CLI will automatically add `provideZard()` to the app configuration and install the core component before the next CLI release, addressing the breaking change requirement for the event manager plugins.
Learnt from: mikij
Repo: zard-ui/zardui PR: 326
File: libs/zard/src/lib/components/input/float.label.component.ts:71-0
Timestamp: 2025-11-14T22:52:09.135Z
Learning: In libs/zard/src/lib/components/*/*.component.ts files, move HostListener and HostBinding to the Component decorator's host property instead of using decorators on class members (e.g., host: { '(input)': 'onInput()' }).
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Create components as standalone components with `standalone: true` in Angular
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use `mergeClasses()` utility with `clsx` and `tailwind-merge` to resolve class conflicts in component styling
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/**/*.{css,ts} : Use CSS custom properties for design tokens and theming in the component library
📚 Learning: 2025-11-14T22:52:09.135Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 326
File: libs/zard/src/lib/components/input/float.label.component.ts:71-0
Timestamp: 2025-11-14T22:52:09.135Z
Learning: In libs/zard/src/lib/components/*/*.component.ts files, move HostListener and HostBinding to the Component decorator's host property instead of using decorators on class members (e.g., host: { '(input)': 'onInput()' }).

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Export all components in `libs/zard/src/lib/components/components.ts` for public API

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use Signal-based inputs with the `input()` function instead of Input decorators in Angular components

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
📚 Learning: 2025-11-30T13:27:41.206Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/popover/popover.component.ts:28-29
Timestamp: 2025-11-30T13:27:41.206Z
Learning: In libs/zard/src/lib/components/core/**/*.ts files (core utilities, plugins, and providers), use relative imports for intra-core dependencies because the ZardUI CLI performs path transformations during component installation. The CLI expects specific relative path patterns and transforms them to the target project structure. For all other component imports and application code, use zard/* path aliases.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use OnPush change detection strategy in Angular components: `changeDetection: ChangeDetectionStrategy.OnPush`

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-30T08:50:23.436Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/core/providezard.ts:0-0
Timestamp: 2025-11-30T08:50:23.436Z
Learning: In libs/zard/src/lib/components/core/providezard.ts, the import paths `../core/event-manager-plugins/...` are intentionally structured this way because the ZardUI CLI transforms them to 'shared/components/core/event-manager-plugins/...' format. Other relative path combinations don't work with the current CLI implementation. This path pattern should not be simplified until the CLI transformation logic is updated.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Create components as standalone components with `standalone: true` in Angular

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use host binding for dynamic classes in components: `host: { '[class]': 'classes()' }`

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-12-13T11:50:50.088Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 372
File: libs/zard/src/lib/shared/components/card/card.component.spec.ts:86-88
Timestamp: 2025-12-13T11:50:50.088Z
Learning: Do not flag or require removing standalone: true for test components (*.spec.ts) and demo components (demo/*.ts) within libs/zard/src/lib/shared/components/**.ts. In these contexts, an explicit standalone: true flag is acceptable; apply this exclusion when reviewing files under this path.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-12-15T11:43:06.831Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 373
File: libs/zard/src/lib/shared/components/select/select.component.ts:33-33
Timestamp: 2025-12-15T11:43:06.831Z
Learning: In files under libs/zard/src/lib/**/*.{ts,tsx,js}, prefer the @/ path alias for imports that map to libs/zard/src/lib/* directories. For example, write import { mergeClasses } from '@/shared/utils/merge-classes' instead of using the 'zard/' alias. This improves path readability and aligns with the project's alias configuration.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/demo/**/*.ts : Create demo components in the `demo/` folder with a main export, default example, and variant examples

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/dropdown/index.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Use path aliases `zard/*` pointing to `libs/zard/src/lib/*` for component imports

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/index.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use `mergeClasses()` utility with `clsx` and `tailwind-merge` to resolve class conflicts in component styling

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.imports.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.spec.ts : Co-locate test files with components using `.spec.ts` suffix next to component files

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/**/*.{css,ts} : Use CSS custom properties for design tokens and theming in the component library

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.variants.ts : Use CVA (Class Variance Authority) for type-safe styling variants in components

Applied to files:

  • libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.spec.ts : Use Angular TestBed and ComponentFixture utilities for testing components

Applied to files:

  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
📚 Learning: 2025-11-26T11:20:45.264Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/select/select.component.spec.ts:79-88
Timestamp: 2025-11-26T11:20:45.264Z
Learning: In ZardUI select component tests (libs/zard/src/lib/components/select/select.component.spec.ts), use fakeAsync() with flush() instead of setTimeout because the component uses setTimeout(..., 0) for focus management, which requires advancing macrotasks in tests.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/menu-content.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
📚 Learning: 2025-11-04T20:46:01.373Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 309
File: libs/zard/src/lib/components/select/demo/multi-select.ts:23-27
Timestamp: 2025-11-04T20:46:01.373Z
Learning: In demo files under libs/zard/src/lib/components/**/demo/*.ts, console.log statements are acceptable and often intentional to demonstrate reactivity and help users understand how the component works.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
📚 Learning: 2025-11-10T21:46:33.213Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 318
File: libs/zard/src/lib/components/select/demo/default.ts:21-21
Timestamp: 2025-11-10T21:46:33.213Z
Learning: In demo files under libs/zard/src/lib/components/**/demo/*.ts, intentionally showing different patterns (e.g., primitive values vs signals) across different demos is valuable for demonstrating the flexibility of Angular features like two-way binding.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
📚 Learning: 2025-12-08T17:34:37.975Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 367
File: libs/zard/src/lib/components/progress-bar/demo/shape.ts:9-11
Timestamp: 2025-12-08T17:34:37.975Z
Learning: In demo files under libs/zard/src/lib/components/**/demo/*.ts, intentionally mixing different variants (e.g., zType and zShape in a shape demo) is acceptable when done to showcase additional features that might not be demonstrated elsewhere.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/demo/context-menu.ts
  • libs/zard/src/lib/shared/components/menu/demo/menu.ts
  • libs/zard/src/lib/shared/components/input-group/demo/default.ts
  • libs/zard/src/lib/shared/components/layout/demo/sidebar.ts
  • libs/zard/src/lib/shared/components/button-group/demo/default.ts
  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
  • libs/zard/src/lib/shared/components/dropdown/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu.variants.ts
📚 Learning: 2025-12-15T11:43:10.889Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 373
File: libs/zard/src/lib/shared/components/select/select.component.ts:33-33
Timestamp: 2025-12-15T11:43:10.889Z
Learning: For files in libs/zard/src/lib/**/*.{ts,tsx,js}, use the `@/` path alias for imports mapping to libs/zard/src/lib/* directories. For example, use `import { mergeClasses } from '@/shared/utils/merge-classes'` instead of `import { mergeClasses } from 'zard/shared/utils/merge-classes'`.

Applied to files:

  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use computed properties in Angular components for reactive class calculations: `protected readonly classes = computed(() => ...)`

Applied to files:

  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-29T15:31:22.377Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 339
File: libs/zard/src/lib/components/carousel/carousel.component.ts:92-92
Timestamp: 2025-11-29T15:31:22.377Z
Learning: In libs/zard/src/lib/components/**/*.component.ts files using TailwindCSS, avoid suggesting individual class bindings like `[class.fill-primary]="condition"` because they can cause TailwindCSS issues. Prefer string concatenation or `[class]` binding with conditional expressions instead.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/menu-label.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-13T11:50:56.310Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 372
File: libs/zard/src/lib/shared/components/card/card.component.spec.ts:86-88
Timestamp: 2025-12-13T11:50:56.310Z
Learning: Do not flag or suggest removing `standalone: true` from test components (*.spec.ts files) or demo components (demo/*.ts files) in libs/zard/src/lib/shared/components/**/*.ts, as it is not a significant concern and the explicit flag is acceptable in these contexts.

Applied to files:

  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
📚 Learning: 2025-10-31T10:03:18.563Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 299
File: libs/zard/src/lib/components/select/select.component.ts:34-38
Timestamp: 2025-10-31T10:03:18.563Z
Learning: In Angular 19+ (including Angular 20 used in this project), components are standalone by default. The `standalone: true` flag is redundant and should be omitted unless explicitly setting `standalone: false` to opt out.

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/menu/demo/default.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-11-13T18:05:35.468Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 324
File: libs/zard/src/lib/components/breadcrumb/breadcrumb.component.ts:34-60
Timestamp: 2025-11-13T18:05:35.468Z
Learning: In breadcrumb item components using RouterLink hostDirectives for host navigation, inject the RouterLink directive and use its `href` property for anchor elements to display URLs on hover, avoiding naming collisions between hostDirective inputs and component inputs.

Applied to files:

  • libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Use Jest with `happy-dom/jest-environment` for testing Angular components

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts
📚 Learning: 2025-11-30T19:07:11.572Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 352
File: apps/web/src/app/domain/components/sidebar/scroll-on-active.directive.ts:23-27
Timestamp: 2025-11-30T19:07:11.572Z
Learning: In apps/web/src/app/domain/components/sidebar/scroll-on-active.directive.ts, the guard checking if scrollIntoView exists before calling it is necessary due to mobile browser compatibility issues. Physical testing on mobile devices shows scrollIntoView may not be present or functional. This defensive pattern should be kept despite scrollIntoView being part of the standard DOM API.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/doc/**/*.md : Write component documentation in `doc/overview.md` and `doc/api.md` files

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
📚 Learning: 2025-11-04T10:18:55.477Z
Learnt from: mihajm
Repo: zard-ui/zardui PR: 308
File: libs/zard/src/lib/components/button-group/doc/overview.md:1-3
Timestamp: 2025-11-04T10:18:55.477Z
Learning: In zardui repo, doc/overview.md files for components should contain only a brief overview description. Examples are provided through separate demo files and the api.md documentation, not in overview.md.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
🧬 Code graph analysis (11)
libs/zard/src/lib/shared/components/menu/context-menu.directive.ts (3)
libs/zard/src/lib/shared/components/menu/menu-item.directive.ts (1)
  • Directive (11-95)
libs/zard/src/lib/shared/components/menu/menu-content.directive.ts (1)
  • Directive (10-21)
apps/web/src/app/domain/components/mobile-nav/mobile-nav.component.ts (1)
  • closeMenu (26-28)
libs/zard/src/lib/shared/components/menu/menu-label.component.ts (1)
libs/zard/src/lib/shared/components/menu/menu.variants.ts (1)
  • menuLabelVariants (41-54)
libs/zard/src/lib/shared/components/input-group/demo/default.ts (2)
libs/zard/src/lib/shared/components/dropdown/demo/default.ts (1)
  • Component (8-97)
libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts (1)
  • ZardDropdownImports (7-13)
libs/zard/src/lib/shared/components/menu/menu-shortcut.component.spec.ts (4)
libs/zard/src/lib/shared/components/dropdown/demo/default.ts (1)
  • Component (8-97)
libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts (1)
  • Component (16-38)
libs/zard/src/lib/shared/components/menu/demo/context-menu.ts (1)
  • Component (7-70)
libs/zard/src/lib/shared/components/menu/menu-label.component.ts (1)
  • Component (16-41)
libs/zard/src/lib/shared/components/layout/demo/sidebar.ts (1)
libs/zard/src/lib/shared/components/menu/menu.imports.ts (1)
  • ZardMenuImports (8-15)
libs/zard/src/lib/shared/components/breadcrumb/demo/ellipsis.ts (1)
libs/zard/src/lib/shared/components/menu/menu.imports.ts (1)
  • ZardMenuImports (8-15)
libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts (1)
libs/zard/src/lib/shared/components/menu/demo/context-menu.ts (1)
  • Component (7-70)
libs/zard/src/lib/shared/components/menu/menu-item.directive.ts (2)
libs/zard/src/lib/shared/components/menu/menu-content.directive.ts (1)
  • Directive (10-21)
libs/zard/src/lib/shared/components/menu/menu.variants.ts (1)
  • ZardMenuItemTypeVariants (58-58)
libs/zard/src/lib/shared/components/menu/menu-label.component.spec.ts (2)
libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts (1)
  • Component (16-38)
libs/zard/src/lib/shared/components/menu/menu-label.component.ts (1)
  • Component (16-41)
libs/zard/src/lib/shared/components/dropdown/demo/default.ts (5)
libs/zard/src/lib/shared/components/dropdown/dropdown-menu-content.component.ts (1)
  • Component (16-38)
libs/zard/src/lib/shared/components/menu/menu-label.component.ts (1)
  • Component (16-41)
libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts (1)
  • Component (8-24)
libs/zard/src/lib/shared/components/dropdown/dropdown.imports.ts (1)
  • ZardDropdownImports (7-13)
libs/zard/src/lib/shared/components/menu/menu.imports.ts (1)
  • ZardMenuImports (8-15)
libs/zard/src/lib/shared/components/menu/menu-shortcut.component.ts (1)
libs/zard/src/lib/shared/components/menu/demo/context-menu.ts (1)
  • Component (7-70)
🪛 markdownlint-cli2 (0.18.1)
libs/zard/src/lib/shared/components/menu/doc/api.md

20-20: Multiple headings with the same content

(MD024, no-duplicate-heading)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts (2)

18-18: Fix missing import for Clipboard.

The Clipboard symbol is referenced but not imported, which will cause a runtime ReferenceError. Import the icon from your icon library (e.g., lucide-angular).

🔎 Proposed fix
+import { Clipboard } from 'lucide-angular';
 import { ZardIconComponent } from '@zard/components/icon/icon.component';

27-38: Replace setTimeout with proper Angular lifecycle hook.

Using setTimeout without a delay to defer initialization logic is an anti-pattern. Use effect() for signal reactivity or afterNextRender() for DOM-ready operations.

🔎 Proposed fix using effect()
+import { Component, input, signal, computed, ChangeDetectionStrategy, effect } from '@angular/core';

 export class BlockCodeViewerComponent {
   readonly files = input.required<BlockFile[]>();
   
   // ... other properties ...

   constructor() {
-    setTimeout(() => {
+    effect(() => {
       const currentFiles = this.files();
       if (currentFiles && currentFiles.length > 0) {
         this.selectedFile.set(currentFiles[0]);

         const tree = this.buildFileTree(currentFiles);
         const allFolderPaths = this.getAllFolderPaths(tree);
         this.openFolders.set(new Set(allFolderPaths));
       }
-    });
+    }, { allowSignalWrites: true });
   }
♻️ Duplicate comments (4)
apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts (1)

9-14: OnPush change detection strategy successfully added.

The component now includes ChangeDetectionStrategy.OnPush as recommended in the previous review, improving performance especially with signal-based state management.

libs/zard/src/lib/shared/components/menu/menu.directive.ts (1)

54-54: Verify TemplateRef generic type matches CDK expectation.

The type TemplateRef<void> suggests the menu template cannot receive context data. According to a previous review comment, the underlying CdkMenuTrigger implementation uses TemplateRef<unknown>, which properly reflects that templates can accept context. Consider updating to TemplateRef<unknown> for consistency with the CDK API.

Does Angular CDK CdkMenuTrigger use TemplateRef<void> or TemplateRef<unknown> for menu templates?
libs/zard/src/lib/shared/components/menu/doc/api.md (2)

5-20: Disambiguate duplicate "Properties" headings.

The static analysis tool flagged duplicate "Properties" headings. Consider using component-specific headings like "z-menu-label Properties" and "z-menu-shortcut Properties" to improve navigation and avoid linting warnings.


30-30: Update TemplateRef type documentation to match CDK API.

Both [zMenuTriggerFor] and [zContextMenuTriggerFor] are documented as TemplateRef<void>, but the underlying CdkMenuTrigger and CdkContextMenuTrigger implementations use TemplateRef<unknown>. Update the documentation to reflect the correct type that properly allows template context data.

What is the correct type signature for CdkMenuTrigger and CdkContextMenuTrigger template inputs in Angular CDK?

Also applies to: 42-42

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3ce405 and 36a03b5.

⛔ Files ignored due to path filters (56)
  • apps/web/public/components/dialog/doc/api.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/components/menu/doc/api.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/documentation/setup/angular/manual/helpers.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/alert-dialog.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/dialog.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/dropdown.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/menu.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/select.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/installation/manual/sheet.md is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/accordion.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/alert-dialog.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/alert.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/avatar.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/badge.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/breadcrumb.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/button-group.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/button.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/calendar.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/card.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/carousel.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/checkbox.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/combobox.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/command.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/dark-mode.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/date-picker.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/dialog.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/divider.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/dropdown.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/empty.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/form.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/icon.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/input-group.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/input.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/kbd.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/layout.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/loader.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/menu.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/pagination.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/popover.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/progress-bar.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/radio.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/registry.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/resizable.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/segmented.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/select.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/sheet.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/skeleton.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/slider.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/switch.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/table.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/tabs.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/toast.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/toggle-group.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/toggle.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/tooltip.json is excluded by !apps/web/public/** and included by apps/**
  • apps/web/public/r/utils.json is excluded by !apps/web/public/** and included by apps/**
📒 Files selected for processing (18)
  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts (2 hunks)
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts (2 hunks)
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts (1 hunks)
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts (2 hunks)
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts (2 hunks)
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts (2 hunks)
  • libs/zard/src/lib/shared/components/dialog/doc/api.md (1 hunks)
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts (2 hunks)
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/doc/api.md (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts (1 hunks)
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts (4 hunks)
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts (5 hunks)
  • libs/zard/src/lib/shared/components/select/select-item.component.ts (3 hunks)
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts (2 hunks)
  • libs/zard/src/lib/shared/utils/merge-classes.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use path aliases @zard/* to map to libs/zard/src/lib/* in imports

Files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/utils/merge-classes.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
libs/zard/**/*.{css,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Use CSS custom properties for design tokens and theming in the component library

Files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/utils/merge-classes.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use Jest with @happy-dom/jest-environment and Angular TestBed utilities for testing

Files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
🧠 Learnings (43)
📓 Common learnings
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Add barrel exports for all new components in libs/zard/src/lib/components/components.ts
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/popover/popover.component.ts:28-29
Timestamp: 2025-11-30T13:27:41.206Z
Learning: In libs/zard/src/lib/components/core/**/*.ts files (core utilities, plugins, and providers), use relative imports for intra-core dependencies because the ZardUI CLI performs path transformations during component installation. The CLI expects specific relative path patterns and transforms them to the target project structure. For all other component imports and application code, use zard/* path aliases.
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Use path aliases `zard/*` pointing to `libs/zard/src/lib/*` for component imports
Learnt from: mikij
Repo: zard-ui/zardui PR: 326
File: libs/zard/src/lib/components/input/float.label.component.ts:71-0
Timestamp: 2025-11-14T22:52:09.135Z
Learning: In libs/zard/src/lib/components/*/*.component.ts files, move HostListener and HostBinding to the Component decorator's host property instead of using decorators on class members (e.g., host: { '(input)': 'onInput()' }).
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Export all components in `libs/zard/src/lib/components/components.ts` for public API
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/core/providezard.ts:0-0
Timestamp: 2025-11-30T08:50:23.436Z
Learning: In libs/zard/src/lib/components/core/providezard.ts, the import paths `../core/event-manager-plugins/...` are intentionally structured this way because the ZardUI CLI transforms them to 'shared/components/core/event-manager-plugins/...' format. Other relative path combinations don't work with the current CLI implementation. This path pattern should not be simplified until the CLI transformation logic is updated.
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/layout/sidebar.component.ts:22-22
Timestamp: 2025-11-26T10:13:44.258Z
Learning: The ZardUI CLI will automatically add `provideZard()` to the app configuration and install the core component before the next CLI release, addressing the breaking change requirement for the event manager plugins.
Learnt from: mikij
Repo: zard-ui/zardui PR: 373
File: libs/zard/src/lib/shared/components/select/select.component.ts:33-33
Timestamp: 2025-12-15T11:43:10.889Z
Learning: For files in libs/zard/src/lib/**/*.{ts,tsx,js}, use the `@/` path alias for imports mapping to libs/zard/src/lib/* directories. For example, use `import { mergeClasses } from '@/shared/utils/merge-classes'` instead of `import { mergeClasses } from 'zard/shared/utils/merge-classes'`.
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use mergeClasses utility from zard/shared/utils for combining CVA variants with custom classes
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use Signal-based inputs with the `input()` function instead of Input decorators in Angular components
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use OnPush change detection strategy in Angular components: `changeDetection: ChangeDetectionStrategy.OnPush`

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/lib/**/*.component.ts : Block component files must use the .component.ts extension and should be standalone Angular components with explicit imports from ReactiveFormsModule and ZardUI components

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use ChangeDetectionStrategy.OnPush for performance optimization in components

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Ensure components are standalone Angular components

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-14T22:52:09.135Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 326
File: libs/zard/src/lib/components/input/float.label.component.ts:71-0
Timestamp: 2025-11-14T22:52:09.135Z
Learning: In libs/zard/src/lib/components/*/*.component.ts files, move HostListener and HostBinding to the Component decorator's host property instead of using decorators on class members (e.g., host: { '(input)': 'onInput()' }).

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Create components as standalone components with `standalone: true` in Angular

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
📚 Learning: 2025-11-30T13:27:41.206Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/popover/popover.component.ts:28-29
Timestamp: 2025-11-30T13:27:41.206Z
Learning: In libs/zard/src/lib/components/core/**/*.ts files (core utilities, plugins, and providers), use relative imports for intra-core dependencies because the ZardUI CLI performs path transformations during component installation. The CLI expects specific relative path patterns and transforms them to the target project structure. For all other component imports and application code, use zard/* path aliases.

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-10-31T10:03:18.563Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 299
File: libs/zard/src/lib/components/select/select.component.ts:34-38
Timestamp: 2025-10-31T10:03:18.563Z
Learning: In Angular 19+ (including Angular 20 used in this project), components are standalone by default. The `standalone: true` flag is redundant and should be omitted unless explicitly setting `standalone: false` to opt out.

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Add barrel exports for all new components in libs/zard/src/lib/components/components.ts

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use Signal-based inputs with the `input()` function instead of Input decorators in Angular components

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/lib/**/*.component.ts : Block components should use Angular signals for state management (e.g., signal() for loading states) and ReactiveFormsModule for form handling with Validators

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use signal-based inputs with `input()` in Angular components

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-13T11:50:56.310Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 372
File: libs/zard/src/lib/shared/components/card/card.component.spec.ts:86-88
Timestamp: 2025-12-13T11:50:56.310Z
Learning: Do not flag or suggest removing `standalone: true` from test components (*.spec.ts files) or demo components (demo/*.ts files) in libs/zard/src/lib/shared/components/**/*.ts, as it is not a significant concern and the explicit flag is acceptable in these contexts.

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/lib/**/block.ts : Each block must follow a standardized directory structure with required files: block.ts (metadata), [block-name].component.ts (Angular component), and [block-name].component.html (template)

Applied to files:

  • apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-13T11:50:50.088Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 372
File: libs/zard/src/lib/shared/components/card/card.component.spec.ts:86-88
Timestamp: 2025-12-13T11:50:50.088Z
Learning: Do not flag or require removing standalone: true for test components (*.spec.ts) and demo components (demo/*.ts) within libs/zard/src/lib/shared/components/**.ts. In these contexts, an explicit standalone: true flag is acceptable; apply this exclusion when reviewing files under this path.

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-15T11:43:06.831Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 373
File: libs/zard/src/lib/shared/components/select/select.component.ts:33-33
Timestamp: 2025-12-15T11:43:06.831Z
Learning: In files under libs/zard/src/lib/**/*.{ts,tsx,js}, prefer the @/ path alias for imports that map to libs/zard/src/lib/* directories. For example, write import { mergeClasses } from '@/shared/utils/merge-classes' instead of using the 'zard/' alias. This improves path readability and aligns with the project's alias configuration.

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts
  • libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts
  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/utils/merge-classes.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/components.ts : Export all components in `libs/zard/src/lib/components/components.ts` for public API

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use mergeClasses utility from zard/shared/utils for combining CVA variants with custom classes

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/utils/merge-classes.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use `mergeClasses()` utility with `clsx` and `tailwind-merge` to resolve class conflicts in component styling

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/utils/merge-classes.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.variants.ts : Use CVA (Class Variance Authority) for type-safe styling variants in components

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use computed properties in Angular components for reactive class calculations: `protected readonly classes = computed(() => ...)`

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Implement TailwindCSS v4 with PostCSS for styling and use class merging with tailwind-merge to resolve conflicts

Applied to files:

  • libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
📚 Learning: 2025-11-30T08:50:23.436Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/core/providezard.ts:0-0
Timestamp: 2025-11-30T08:50:23.436Z
Learning: In libs/zard/src/lib/components/core/providezard.ts, the import paths `../core/event-manager-plugins/...` are intentionally structured this way because the ZardUI CLI transforms them to 'shared/components/core/event-manager-plugins/...' format. Other relative path combinations don't work with the current CLI implementation. This path pattern should not be simplified until the CLI transformation logic is updated.

Applied to files:

  • apps/web/src/app/domain/components/file-tree/file-tree.component.ts
  • libs/zard/src/lib/shared/components/menu/menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.spec.ts : Use Angular TestBed and ComponentFixture utilities for testing components

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.spec.ts : Place tests co-located with components using the .spec.ts naming convention

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.spec.ts : Co-locate test files with components using `.spec.ts` suffix next to component files

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-26T11:20:45.264Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 348
File: libs/zard/src/lib/components/select/select.component.spec.ts:79-88
Timestamp: 2025-11-26T11:20:45.264Z
Learning: In ZardUI select component tests (libs/zard/src/lib/components/select/select.component.spec.ts), use fakeAsync() with flush() instead of setTimeout because the component uses setTimeout(..., 0) for focus management, which requires advancing macrotasks in tests.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/demo/**/*.ts : Create demo components in the `demo/` folder with a main export, default example, and variant examples

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to **/*.spec.ts : Use Jest with happy-dom/jest-environment and Angular TestBed utilities for testing

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-29T15:31:22.377Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 339
File: libs/zard/src/lib/components/carousel/carousel.component.ts:92-92
Timestamp: 2025-11-29T15:31:22.377Z
Learning: In libs/zard/src/lib/components/**/*.component.ts files using TailwindCSS, avoid suggesting individual class bindings like `[class.fill-primary]="condition"` because they can cause TailwindCSS issues. Prefer string concatenation or `[class]` binding with conditional expressions instead.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Use Jest with `happy-dom/jest-environment` for testing Angular components

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
📚 Learning: 2025-11-30T19:07:11.572Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 352
File: apps/web/src/app/domain/components/sidebar/scroll-on-active.directive.ts:23-27
Timestamp: 2025-11-30T19:07:11.572Z
Learning: In apps/web/src/app/domain/components/sidebar/scroll-on-active.directive.ts, the guard checking if scrollIntoView exists before calling it is necessary due to mobile browser compatibility issues. Physical testing on mobile devices shows scrollIntoView may not be present or functional. This defensive pattern should be kept despite scrollIntoView being part of the standard DOM API.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts
  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.variants.ts : Use CVA (Class Variance Authority) for typed variants in component styling

Applied to files:

  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use host binding with computed classes for dynamic class application

Applied to files:

  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/sheet/sheet.component.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/*.component.ts : Use host binding for dynamic classes in components: `host: { '[class]': 'classes()' }`

Applied to files:

  • libs/zard/src/lib/shared/components/select/select-item.component.ts
  • libs/zard/src/lib/shared/components/menu/context-menu.directive.ts
  • libs/zard/src/lib/shared/components/dialog/dialog.component.ts
  • libs/zard/src/lib/shared/components/menu/menu-content.directive.ts
  • libs/zard/src/lib/shared/components/accordion/accordion.component.spec.ts
  • libs/zard/src/lib/shared/components/menu/menu-item.directive.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/index.ts : All new blocks must be exported in the library's index file (libs/blocks/src/index.ts) with both component and block metadata exports

Applied to files:

  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/lib/**/block.ts : Block metadata file (block.ts) must export a Block object with required properties: id (unique identifier), title, description, component, category, image (light and dark variants), and files array

Applied to files:

  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-21T00:12:01.332Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: libs/blocks/README.md:0-0
Timestamp: 2025-12-21T00:12:01.332Z
Learning: Applies to libs/blocks/src/lib/**/*.component.ts : Block components should implement loading states using signals and conditionally render UI based on state (e.g., using if control flow)

Applied to files:

  • apps/web/src/app/domain/pages/blocks/blocks.page.ts
📚 Learning: 2025-12-21T00:11:39.443Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T00:11:39.443Z
Learning: Applies to libs/zard/src/lib/components/*/doc/*.md : Write component documentation with overview.md for use cases and basic examples, and api.md for complete API reference

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/dialog/doc/api.md
📚 Learning: 2025-11-25T18:54:01.560Z
Learnt from: CR
Repo: zard-ui/zardui PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T18:54:01.560Z
Learning: Applies to libs/zard/src/lib/components/**/doc/**/*.md : Write component documentation in `doc/overview.md` and `doc/api.md` files

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
  • libs/zard/src/lib/shared/components/dialog/doc/api.md
📚 Learning: 2025-11-04T10:18:55.477Z
Learnt from: mihajm
Repo: zard-ui/zardui PR: 308
File: libs/zard/src/lib/components/button-group/doc/overview.md:1-3
Timestamp: 2025-11-04T10:18:55.477Z
Learning: In zardui repo, doc/overview.md files for components should contain only a brief overview description. Examples are provided through separate demo files and the api.md documentation, not in overview.md.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
📚 Learning: 2025-11-21T16:17:37.255Z
Learnt from: mikij
Repo: zard-ui/zardui PR: 333
File: libs/zard/src/lib/components/core/directives/string-template-outlet/string-template-outlet.directive.ts:43-43
Timestamp: 2025-11-21T16:17:37.255Z
Learning: In the zard-ui/zardui repository, avoid using `any` type at all costs. Use proper generic types and type constraints instead, even for complex scenarios like TemplateRef variance.

Applied to files:

  • libs/zard/src/lib/shared/components/menu/doc/api.md
🧬 Code graph analysis (10)
libs/zard/src/lib/shared/components/alert-dialog/alert-dialog-ref.ts (1)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
libs/zard/src/lib/shared/components/dropdown/dropdown.service.ts (1)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts (3)
libs/zard/src/lib/shared/components/dialog/dialog.component.ts (1)
  • OnClickCallback (37-37)
libs/zard/src/lib/shared/components/sheet/sheet.component.ts (1)
  • OnClickCallback (34-34)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
apps/web/src/app/domain/components/file-tree/file-tree.component.ts (2)
apps/web/src/app/domain/components/block-code-viewer/block-code-viewer.component.ts (1)
  • Component (9-157)
apps/web/src/app/domain/components/block-container/block-container.component.ts (1)
  • Component (45-77)
libs/zard/src/lib/shared/components/menu/context-menu.directive.spec.ts (1)
libs/zard/src/lib/shared/components/menu/menu.imports.ts (1)
  • ZardMenuImports (8-15)
libs/zard/src/lib/shared/components/select/select-item.component.ts (1)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
libs/zard/src/lib/shared/components/menu/context-menu.directive.ts (1)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
libs/zard/src/lib/shared/components/sheet/sheet.component.ts (3)
libs/zard/src/lib/shared/components/alert-dialog/alert-dialog.component.ts (1)
  • OnClickCallback (37-37)
libs/zard/src/lib/shared/components/dialog/dialog.component.ts (1)
  • OnClickCallback (37-37)
libs/zard/src/lib/shared/utils/merge-classes.ts (1)
  • noopFn (19-19)
libs/zard/src/lib/shared/components/menu/menu-content.directive.ts (2)
libs/zard/src/lib/shared/utils/merge-classes.ts (2)
  • ClassValue (4-4)
  • mergeClasses (6-8)
libs/zard/src/lib/shared/components/menu/menu.variants.ts (1)
  • menuContentVariants (3-9)
libs/zard/src/lib/shared/components/menu/menu-item.directive.ts (1)
libs/zard/src/lib/shared/components/menu/menu.variants.ts (1)
  • ZardMenuItemTypeVariants (58-58)

@mikij mikij force-pushed the feat/#196-context-menu-from-scratch branch from b360e47 to ffe0ebd Compare December 21, 2025 16:30
@Luizgomess Luizgomess merged commit 4319964 into master Dec 21, 2025
5 checks passed
@Luizgomess Luizgomess deleted the feat/#196-context-menu-from-scratch branch December 21, 2025 17: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.

[Component] Context Menu

2 participants