Skip to content

fix(Layout): forward ref and remove dead code - #796

Merged
cixzhang merged 1 commit into
mainfrom
navi/fix/layout-hardening
Mar 21, 2026
Merged

cixzhang merged 1 commit into
mainfrom
navi/fix/layout-hardening

Conversation

@cixzhang

@cixzhang cixzhang commented Mar 21, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Addresses remaining Layout findings from hardening sprint #719:

  • P1: Does not forward ref — Added ref prop to XDSLayout following React 19 ref-as-prop pattern
  • P2: _lastBodyRowStyles dead code — Removed unused styles from XDSTableRow (was defined but never referenced)

Test plan

  • All Layout tests pass (12/12)
  • All Table tests pass (90/90)
  • Lint clean (0 errors)

- Add ref prop to XDSLayout for DOM access
- Remove unused _lastBodyRowStyles from XDSTableRow

Co-authored-by: Navi <[email protected]>
@cixzhang cixzhang added the hardening Component hardening and quality sweep label Mar 21, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 21, 2026
@github-actions

github-actions Bot commented Mar 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Layout · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 1.0KB N/A
Lines of Code N/A 902 -
Complexity N/A Very High (66) -
Table · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A 863B N/A
Lines of Code N/A 839 -
Complexity N/A Very High (54) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 10.9KB 17.4KB 2.7KB

Accessibility Audit

Status: 2 accessibility violation(s) found — 2 serious.

XDSLayout - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 4/10 stories · Learn more
    • WCAG: 1.4.3 (Level AA)
Selection - 1 issue(s)
  • 🟠 serious: Ensure ARIA attributes are used as described in the specification of the element's role
    • Rule: aria-conditional-attr · Affects 1/7 stories · Learn more
    • WCAG: 4.1.2 (Level A)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang marked this pull request as ready for review March 21, 2026 14:43
@cixzhang
cixzhang requested a review from josephfarina as a code owner March 21, 2026 14:43
@cixzhang
cixzhang merged commit 09631f2 into main Mar 21, 2026
13 checks passed
@cixzhang
cixzhang deleted the navi/fix/layout-hardening branch April 9, 2026 14:32
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. hardening Component hardening and quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant