Skip to content

feat: highlight variants for cards and related-recipes#388

Merged
fkakatie merged 14 commits intomainfrom
more-variants
Apr 3, 2026
Merged

feat: highlight variants for cards and related-recipes#388
fkakatie merged 14 commits intomainfrom
more-variants

Conversation

@fkakatie
Copy link
Copy Markdown
Contributor

@fkakatie fkakatie commented Apr 3, 2026

This PR simplifies and aligns the cards and related-recipes implementations for the use cases described in #385 (campaign/highlight cards and recipe cards with metadata), while keeping the intended designs intact.

Key adjustments:

  1. Clarified variant responsibilities
  • Consolidated overlapping variants (avoiding parallel patterns like existing cards (grid) vs. proposed cards (grids))
  • cards (highlight) (formerly “gifts”) is used for flexible, authorable, content-driven cards (campaigns, promos, etc.)
  • Recipe-specific cards are handled by related-recipes (featured), since they rely on structured recipe data (time, servings, difficulty, etc.)
  • This avoids mixing fundamentally different patterns (generic content vs. recipe data) in a single block.
  1. Simplified and normalized authoring
  • Removed the need to manually author duplicate content (titles, images, metadata) when a link is already provided
  • Recipe cards now derive their data from the linked recipe instead of requiring manual entry
  • Eliminated custom config patterns (e.g. badge: / eyebrow:) in favor of existing conventions (e.g. native eyebrow handling)
  1. Reduced duplication and complexity
  • Reused existing utilities (e.g. recipe formatting functions and icons) instead of duplicating logic
  • Simplified JS and CSS to align with existing block conventions
  • Leveraged base styles and the cascade instead of introducing highly specific overrides

All intended designs are still supported. The changes focus on reducing complexity, improving authoring, and aligning with existing patterns.

Test URLs:

Reference: https://card-grid-gift--vitamix--aemsites.aem.page/drafts/ashleya/cards

Visualization: https://pianomister.github.io/diffsite/

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync bot commented Apr 3, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync bot commented Apr 3, 2026

Page Scores Audits Google
📱 /us/en_us/drafts/fkakatie/more-cards PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /us/en_us/drafts/fkakatie/more-cards PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@fkakatie fkakatie changed the title More variants feat: highlight variants for cards and related-recipes Apr 3, 2026
Copy link
Copy Markdown
Collaborator

@ashleyanness ashleyanness left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for your help!

@fkakatie fkakatie merged commit 8c5c583 into main Apr 3, 2026
2 checks passed
@fkakatie fkakatie deleted the more-variants branch April 3, 2026 19:48
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