Skip to content

Feat/549 update table component - #679

Merged
Luizgomess merged 8 commits into
zard-ui:masterfrom
annakocot:feat/549-update-table-component
Aug 7, 2026
Merged

Feat/549 update table component#679
Luizgomess merged 8 commits into
zard-ui:masterfrom
annakocot:feat/549-update-table-component

Conversation

@annakocot

@annakocot annakocot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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 📸

image image image

Link to Issue 🔗

(#549)

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 🚨

None - This is a component update with no breaking changes.

Checklist 🧐

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

Summary by CodeRabbit

  • New Features
    • Added table footer support with customizable bordered and muted styles.
    • Added examples for invoice previews, totals, empty states, and row actions.
    • Added edit, duplicate, and delete actions for table rows.
  • Enhancements
    • Improved header alignment, expanded-row styling, and checkbox behavior.
    • Updated the table showcase with refreshed preview, footer, and actions examples.
  • Documentation
    • Documented table footer styling and usage in the API reference.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Table redesign

Layer / File(s) Summary
Table footer component and styling
libs/zard/src/lib/shared/components/table/table.component.ts, libs/zard/src/lib/shared/components/table/table.variants.ts, libs/zard/src/lib/shared/components/table/table.imports.ts, libs/zard/src/lib/shared/components/table/table.component.spec.ts, libs/zard/src/lib/shared/components/table/doc/api.ts
Adds ZardTableFooterComponent, footer variants, shared imports, expanded-row styling, updated checkbox selectors, API documentation, and DOM-based tests.
Invoice and row-actions demos
libs/zard/src/lib/shared/components/table/demo/preview.ts, libs/zard/src/lib/shared/components/table/demo/footer.ts, libs/zard/src/lib/shared/components/table/demo/actions.ts
Adds invoice previews and totals, currency formatting, empty states, and per-row product action menus.
Demo registry and composition
libs/zard/src/lib/shared/components/table/demo/table.ts
Registers preview, footer, and actions demos. Adds escaped composition markup.
Simple demo directive migration
libs/zard/src/lib/shared/components/table/demo/simple.ts
Uses ZardTableImports and explicit table directives for table elements.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related issues

Suggested reviewers: luizgomess

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change as an update to the table component.
Description check ✅ Passed The description includes the required sections, issue link, change type, screenshots, breaking-change statement, and testing checklist.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between fc511b6 and 26a06cc.

⛔ Files ignored due to path filters (8)
  • apps/web/public/docs/components/table.md 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/src/generated/components/table/demo/actions.ts is excluded by !**/generated/** and included by apps/**
  • apps/web/src/generated/components/table/demo/footer.ts is excluded by !**/generated/** and included by apps/**
  • apps/web/src/generated/components/table/demo/payments.ts is excluded by !**/generated/** and included by apps/**
  • apps/web/src/generated/components/table/demo/preview.ts is excluded by !**/generated/** and included by apps/**
  • apps/web/src/generated/components/table/demo/simple.ts is excluded by !**/generated/** and included by apps/**
  • apps/web/src/generated/installation/manual/table.ts is excluded by !**/generated/** and included by apps/**
📒 Files selected for processing (11)
  • libs/zard/src/lib/shared/components/table/demo/actions.ts
  • libs/zard/src/lib/shared/components/table/demo/footer.ts
  • libs/zard/src/lib/shared/components/table/demo/payments.ts
  • libs/zard/src/lib/shared/components/table/demo/preview.ts
  • libs/zard/src/lib/shared/components/table/demo/simple.ts
  • libs/zard/src/lib/shared/components/table/demo/table.ts
  • libs/zard/src/lib/shared/components/table/doc/api.ts
  • libs/zard/src/lib/shared/components/table/table.component.spec.ts
  • libs/zard/src/lib/shared/components/table/table.component.ts
  • libs/zard/src/lib/shared/components/table/table.imports.ts
  • libs/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

Comment thread libs/zard/src/lib/shared/components/table/demo/actions.ts Outdated
Comment thread libs/zard/src/lib/shared/components/table/demo/actions.ts Outdated
Comment thread libs/zard/src/lib/shared/components/table/table.component.spec.ts
@Luizgomess

Copy link
Copy Markdown
Contributor

checking

@Luizgomess Luizgomess self-assigned this Aug 5, 2026
@Luizgomess
Luizgomess merged commit c9b78f2 into zard-ui:master Aug 7, 2026
3 of 6 checks passed
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.

2 participants