Feat/549 update table component - #679
Conversation
…able-component # Conflicts: # apps/web/public/r/registry.json
📝 WalkthroughWalkthroughThe table component gains a styled footer directive, updated variants, and shared imports. The demos now cover invoice previews, totals, row actions, and composition markup. The simple demo uses explicit table directives, with matching API documentation and tests. ChangesTable redesign
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/zard/src/lib/shared/components/table/demo/actions.ts`:
- Around line 6-7: Replace the relative internal library imports with the `@/`
alias: update ZardDropdownImports and ZardTableImports in
libs/zard/src/lib/shared/components/table/demo/actions.ts (lines 6-7), the demo
component and TABLE_API imports in
libs/zard/src/lib/shared/components/table/demo/table.ts (lines 9-12), and
ZardTableImports in libs/zard/src/lib/shared/components/table/demo/simple.ts
(line 3). Use `@/shared/components/`... paths targeting the same modules.
- Around line 35-36: Remove the duplicate z-dropdown attribute from the affected
template element, leaving exactly one z-dropdown attribute so Angular can parse
the template successfully.
In `@libs/zard/src/lib/shared/components/table/table.component.spec.ts`:
- Around line 272-295: Rewrite the ZardTableFooterComponent suite to use Angular
Testing Library’s render and screen APIs instead of TestBed, ComponentFixture,
and fixture.nativeElement. Update the setup and both tests to render the footer
(directly or within a table using <tfoot z-table-footer>) and assert its
presence and default classes through screen-based queries.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 5a84da24-53ae-43fa-9222-c8c50fd436ab
⛔ Files ignored due to path filters (8)
apps/web/public/docs/components/table.mdis excluded by!apps/web/public/**and included byapps/**apps/web/public/r/table.jsonis excluded by!apps/web/public/**and included byapps/**apps/web/src/generated/components/table/demo/actions.tsis excluded by!**/generated/**and included byapps/**apps/web/src/generated/components/table/demo/footer.tsis excluded by!**/generated/**and included byapps/**apps/web/src/generated/components/table/demo/payments.tsis excluded by!**/generated/**and included byapps/**apps/web/src/generated/components/table/demo/preview.tsis excluded by!**/generated/**and included byapps/**apps/web/src/generated/components/table/demo/simple.tsis excluded by!**/generated/**and included byapps/**apps/web/src/generated/installation/manual/table.tsis excluded by!**/generated/**and included byapps/**
📒 Files selected for processing (11)
libs/zard/src/lib/shared/components/table/demo/actions.tslibs/zard/src/lib/shared/components/table/demo/footer.tslibs/zard/src/lib/shared/components/table/demo/payments.tslibs/zard/src/lib/shared/components/table/demo/preview.tslibs/zard/src/lib/shared/components/table/demo/simple.tslibs/zard/src/lib/shared/components/table/demo/table.tslibs/zard/src/lib/shared/components/table/doc/api.tslibs/zard/src/lib/shared/components/table/table.component.spec.tslibs/zard/src/lib/shared/components/table/table.component.tslibs/zard/src/lib/shared/components/table/table.imports.tslibs/zard/src/lib/shared/components/table/table.variants.ts
💤 Files with no reviewable changes (1)
- libs/zard/src/lib/shared/components/table/demo/payments.ts
|
checking |
What was done? 📝
Updated the Table component wit latest shadcn/ui reference:
✨ Added table footer;
🎨 Visual design matches latest shadcn/ui reference light and dark mode;
♿ Accessibility support with ARIA labels;
🧪 Updated test coverage (2 tests);
Screenshots or GIFs 📸
Link to Issue 🔗
(#549)
Type of change 🏗
Breaking change 🚨
None - This is a component update with no breaking changes.
Checklist 🧐
Summary by CodeRabbit