Skip to content

Table: Perf tests, lint fixes, minor refactoring - #101

Merged
cixzhang merged 3 commits into
mainfrom
perf-tests
Feb 12, 2026
Merged

cixzhang merged 3 commits into
mainfrom
perf-tests

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Some adjustments to the table. Refactored it so data and children mode will render the same components. Lint fixes.

Added performance tests to the table to ensure that we avoid over rendering with this API.

- Add MemoizedTableRow component with React.memo for row-level updates
- Only changed rows re-render when data items change (with stable columns)
- Fix plugin stability by using constant empty array defaults
- Rename XDSTableRow/Cell to XDSBaseTableRow/Cell for clarity
- Remove children mode from XDSTable (data-driven only)
- XDSBaseTable retains children mode support
- Add performance tests validating memoization behavior
- Renamed XDSBaseTableRow → XDSTableRow and XDSBaseTableCell → XDSTableCell
- XDSTable now supports both data-driven and children modes with consistent styling
- Children mode uses TableContext for styling (density, dividers, striped, hover)
- XDSBaseTable uses XDSTableRow/Cell internally for unified rendering
- Renamed TableContext.ts → XDSTableContext.ts
- Renamed TableContext → XDSTableContext
- Renamed TableContextValue → XDSTableContextValue
- Updated all imports and usages
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 12, 2026
@cixzhang
cixzhang requested a review from czarandy February 12, 2026 01:27
@cixzhang
cixzhang merged commit 96ef199 into main Feb 12, 2026
1 check passed
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 5.1KB 8.5KB 1.4KB

Accessibility Audit

Status: 37 accessibility violation(s) found.

XDSAspectRatio - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSAvatar - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSBadge - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSButton - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSCalendar - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSCard - 2 issue(s)
  • critical: Form elements must have labels
    • Rule: label
  • serious: Links must have discernible text
    • Rule: link-name
XDSCenter - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSCheckboxInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSDateInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSDivider - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSField - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSFontWrapper - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSGrid - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSHStack - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSHeading - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSHoverCard - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSIcon - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSLayout - 2 issue(s)
  • critical: Form elements must have labels
    • Rule: label
  • serious: Links must have discernible text
    • Rule: link-name
XDSLink - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSNumberInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSSection - 2 issue(s)
  • critical: Form elements must have labels
    • Rule: label
  • serious: Links must have discernible text
    • Rule: link-name
XDSSelector - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSSkeleton - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSStackItem - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSSwitch - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTabList - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTable - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSText - 2 issue(s)
  • critical: Form elements must have labels
    • Rule: label
  • serious: Links must have discernible text
    • Rule: link-name
XDSTextArea - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTextInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTimeInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTooltip - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSVStack - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name

Generated by PR Enrichment workflow | Storybook | View full report

@cixzhang
cixzhang deleted the perf-tests branch February 20, 2026 14:41
cixzhang added a commit that referenced this pull request Apr 26, 2026
* Add row memoization and refactor table API

- Add MemoizedTableRow component with React.memo for row-level updates
- Only changed rows re-render when data items change (with stable columns)
- Fix plugin stability by using constant empty array defaults
- Rename XDSTableRow/Cell to XDSBaseTableRow/Cell for clarity
- Remove children mode from XDSTable (data-driven only)
- XDSBaseTable retains children mode support
- Add performance tests validating memoization behavior

* Rename XDSBaseTableRow/Cell to XDSTableRow/Cell and unify styling

- Renamed XDSBaseTableRow → XDSTableRow and XDSBaseTableCell → XDSTableCell
- XDSTable now supports both data-driven and children modes with consistent styling
- Children mode uses TableContext for styling (density, dividers, striped, hover)
- XDSBaseTable uses XDSTableRow/Cell internally for unified rendering

* Rename TableContext to XDSTableContext for consistency

- Renamed TableContext.ts → XDSTableContext.ts
- Renamed TableContext → XDSTableContext
- Renamed TableContextValue → XDSTableContextValue
- Updated all imports and usages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant