Skip to content

feat: expose card component#4315

Open
SpyZzey wants to merge 12 commits intomainfrom
feat/card-component
Open

feat: expose card component#4315
SpyZzey wants to merge 12 commits intomainfrom
feat/card-component

Conversation

@SpyZzey
Copy link
Copy Markdown
Member

@SpyZzey SpyZzey commented Feb 27, 2026

Description

This pr exposes our card component externally.
Introduces the public ItemCard component in our public API, which exposes the previously internal Card component.
The internal Card is removed and replaced by ItemCard, including instances in the Cards component.

  • Adds public ItemCard component
  • Migrates Cards component to use InternalItemCard instead of Card,
  • Adds test utils (ItemCardWrapper), unit tests, and dev pages for visual regression tests,

Related links, issue #, if available: hiEUAPCbkCZS

How has this been tested?

  • Manual tests,
  • Unit tests,
  • Screenshot tests
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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.45%. Comparing base (c8acad4) to head (2d8d088).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4315   +/-   ##
=======================================
  Coverage   97.44%   97.45%           
=======================================
  Files         906      909    +3     
  Lines       26561    26632   +71     
  Branches     9582     9613   +31     
=======================================
+ Hits        25882    25953   +71     
  Misses        673      673           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 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.

@SpyZzey SpyZzey force-pushed the feat/card-component branch from d96eda4 to 9168444 Compare March 9, 2026 15:16
@SpyZzey SpyZzey force-pushed the feat/card-component branch from 5c20c44 to f28e7a1 Compare March 16, 2026 12:39
@SpyZzey SpyZzey force-pushed the feat/card-component branch from 51ff948 to 7612490 Compare March 17, 2026 11:20
@SpyZzey SpyZzey changed the title feat: expose card component [WIP] feat: expose card component Mar 20, 2026
@SpyZzey SpyZzey marked this pull request as ready for review March 20, 2026 10:59
@SpyZzey SpyZzey requested a review from a team as a code owner March 20, 2026 10:59
@SpyZzey SpyZzey requested review from avinashbot and removed request for a team March 20, 2026 10:59
import { tokens as parentTokens } from '../visual-refresh/shadows.js';

const tokens: StyleDictionary.ShadowsDictionary = {
shadowCard: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Until now, the cards in Classic were inheriting the shadow style from the container (see lines 39 to 41 in the removed file src/internal/components/card/styles.scss):

  &:not(.refresh)::after {
    box-shadow: awsui.$shadow-container;
  }

So I think to keep backwards compatibility this should be {shadowContainer}.

@SpyZzey SpyZzey force-pushed the feat/card-component branch from 418c86f to f0478e3 Compare March 27, 2026 11:53
jperals
jperals previously approved these changes Mar 27, 2026
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.

3 participants