Skip to content

feat: Add fitHeight property to action card and item card - #5233

Draft
jperals wants to merge 1 commit into
mainfrom
dev-v3-jotresse-card-components-fit-height
Draft

jperals wants to merge 1 commit into
mainfrom
dev-v3-jotresse-card-components-fit-height

Conversation

@jperals

@jperals jperals commented Nov 3, 2026

Copy link
Copy Markdown
Member

Description

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

ActionCard’s new fitHeight behavior lacks public-component tests, and both fit-height examples use fixed pixel gaps instead of shared spacing tokens.

2 open issues
What changed in this PR

Adds an optional fitHeight property to ActionCard and ItemCard so consumers can align card heights within a row, while preserving the existing Cards component behavior.

Changes:

  • Exposes fitHeight, defaulting to false, through both public components and their styles.
  • Replaces ItemCard’s internal fullHeight property and updates its caller and tests.
  • Adds layout demos and updates generated API documentation snapshots.
File Description
src/​item-card/​styles.scss Renames the height class to fit-height.
src/​item-card/​internal.tsx Applies the class through fitHeight.
src/​item-card/​internal-interfaces.ts Removes the internal-only fullHeight property.
src/​item-card/​interfaces.ts Declares and documents public fitHeight.
src/​item-card/​index.tsx Defaults, records, and forwards fitHeight.
src/​item-card/​__tests__/​card.test.tsx Tests public fitHeight class application.
src/​cards/​index.tsx Migrates the internal caller to fitHeight.
src/​action-card/​styles.scss Adds full-height styling.
src/​action-card/​internal.tsx Conditionally applies the height class.
src/​action-card/​interfaces.ts Declares and documents public fitHeight.
src/​action-card/​index.tsx Defaults, records, and forwards fitHeight.
src/​__tests__/​snapshot-tests/​__snapshots__/​documenter.test.ts.snap Records both new public API properties.
pages/​item-card/​fit-height.scss Styles the ItemCard layout demo.
pages/​item-card/​fit-height.page.tsx Demonstrates layouts with optional footers.
pages/​action-card/​fit-height.scss Styles the ActionCard layout demo.
pages/​action-card/​fit-height.page.tsx Demonstrates height alignment across layouts.

Review effort: Balanced

Comment thread pages/item-card/fit-height.scss Resolved
Comment thread src/action-card/internal.tsx Resolved
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.76%. Comparing base (c8ca653) to head (eeaa780).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5233      +/-   ##
==========================================
- Coverage   97.76%   97.76%   -0.01%     
==========================================
  Files        1003     1003              
  Lines       32572    32555      -17     
  Branches    12110    12094      -16     
==========================================
- Hits        31843    31826      -17     
- Misses        684      723      +39     
+ Partials       45        6      -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

3 active deployments
dev-pages-react18 — eeaa780a Deployed Nov 3, 2026 by jperals via deploy (React 18) / deploy #3114
dev-pages-react16 — eeaa780a Deployed Nov 3, 2026 by jperals via deploy (React 16) / deploy #3114
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