Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 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 tofalse, through both public components and their styles. - Replaces ItemCard’s internal
fullHeightproperty 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
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.