Skip to content

Conversation

@AmunMRa
Copy link
Collaborator

@AmunMRa AmunMRa commented Sep 30, 2025

Removed conditionals and flattened properties to apply to all cards. Descriptions clarify nuance. Added image ratio and image proportions.

Description

Related Issue

Motivation and Context

Cards json was not being ingested properly into design table on v0 website due to unsupported conditional properties. Simplifies the schema to meet design intent. Relies more on descriptions for nuance between card variants.

How Has This Been Tested?

I validated the schema changes locally using the Moon workspace pipeline. After updating cards.json, I ran:

pnpm moon check

This installed the pinned pnpm version (10.17.1), resolved workspace dependencies, and executed the configured validation tasks. The pipeline reported all checks passing, confirming that the updated schema is valid and doesn’t introduce breaking issues.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Removed conditionals and flattened properties to apply to all cards. Descriptions clarify nuance. Added image ratio and image proportions.
@AmunMRa AmunMRa requested a review from GarthDB September 30, 2025 21:32
@changeset-bot
Copy link

changeset-bot bot commented Sep 30, 2025

🦋 Changeset detected

Latest commit: 4554ce4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@adobe/spectrum-component-api-schemas Patch
@adobe/spectrum-design-data-mcp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@GarthDB
Copy link
Member

GarthDB commented Sep 30, 2025

Run report for 4554ce45

Total time: 3.7s | Comparison time: 4.8s | Estimated savings: 1s (22.0% faster)

Action Time Status Info
⬛️ SetupProto(0.51.4) 0.1ms Skipped
🟩 SyncWorkspace 7.1ms Passed
🟩 SyncProject(site) 0.6ms Passed
🟩 SyncProject(componentSchemas) 0.6ms Passed
🟩 RunTask(site:copyTokenTypeSchema) 635.6ms Passed
🟩 RunTask(site:copyComponentSchema) 642.6ms Passed
⬛️ SetupToolchain(node:~20.12) 1.3s Skipped
🟥 InstallWorkspaceDeps(node:~20.12) 2.4s Aborted
Touched files
.changeset/simplify-cards-schema.md
.lintstagedrc.json
package.json
packages/component-schemas/schemas/components/cards.json

@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2025

🧩 Component Schema Changes Report

Component Schemas Changed (0 added, 0 deleted, 1 updated)

Original Branch: main

New Branch: card-schema-cleanup

🚨 Breaking Changes Detected

This PR introduces 1 breaking change(s) to component schemas. Please review carefully and ensure proper versioning.

💥 Breaking Updates ⚠️ BREAKING

cards

  • Updated: variant - removed default: "asset" - "Gallery cards display one image or video asset. Asset cards show one asset of any type. Collection cards support multiple assets. Horizontal cards place text and one asset side-by-side. Product cards use one thumbnail asset. Flex cards accept any asset type and quantity."
  • Added: size (string, default: m) - "Overall size of the card."
  • Added: state (string, default: default)
  • Added: isSelected (boolean)
  • Added: isQuiet (boolean)
  • Added: isDisabled (boolean)
  • Added: hideCheckbox (boolean) - "If true, the selection checkbox is hidden."
  • Added: title (string) - "Optional card title."
  • Added: description (string) - "Optional description shown below the title."
  • Added: actionLabel (string) - "Optional action button label."
  • Added: metadata (string) - "Optional metadata shown below the card."
  • Added: assetTypes (array)
  • Added: imageProportion (string, default: auto) - "How much of the card container the image or video occupies. Does not apply to document or thumbnail assets."
  • Added: style (string, default: primary) - "The style of the card."
  • Added: imageRatio (string, default: auto) - "Aspect ratio of the image or video. Does not apply to document or thumbnail assets."
  • Updated: variant - "Gallery cards display one image or video asset. Asset cards show one asset of any type. Collection cards support multiple assets. Horizontal cards place text and one asset side-by-side. Product cards use one thumbnail asset. Flex cards accept any asset type and quantity."
  • Added: required - ["variant", "assetTypes"]

⚠️ Breaking Change Guidelines

When introducing breaking changes:

  1. Version bump: Ensure this triggers a major version bump
  2. Migration guide: Document how consumers should adapt
  3. Deprecation: Consider deprecating before removing when possible
  4. Communication: Notify affected teams of the changes

This comment was automatically generated by the component schema diff tool. 🤖

AmunMRa and others added 5 commits September 30, 2025 18:23
Added prop for styling and required needed to be updated to correct prop.
Add prop to allow for optional title and description within cards
- Add remark-frontmatter plugin to preserve YAML frontmatter
- Update lint-staged config to use frontmatter plugin first
- Fix changeset format to use patch version for schema fix
- Mark as patch version since this fixes a previous issue
- Exclude changeset files from remark processing to preserve frontmatter
- This resolves the CI/CD pipeline failure for PR #620
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