Conversation
3 tasks
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.
See #5405.
Summary
This PR introduces Single Directory Components for both layers of card rendering:
az_cardis now the item-level SDC for an individual cardaz_cardsis now a paragraph-level SDC that composes theaz_cardSDC for each item in the deckThe
az_cardtheme hook remains as a presenter layer, so existing formatter and widget preview paths continue to work without a broader PHP refactor. The newaz_cardsparagraph template now acts as the paragraph-level presenter, making deck title rendering and title color explicit while composing the existing rendered card collection.This PR also adopts a hybrid asset-packaging approach for card assets:
az_cardcomponentaz_cardcomponentWhat changed
az_cardSDC for individual card markup and metadataaz_cardTwig template to act as a presenter that includes the componentaz_cardsparagraph-level SDC for deck/title compositionaz_cardsparagraph presenter template that includes the new paragraph componentaz_card_defaultformatter as the item renderer in this first phaseaz_cardcomponent directoryaz_cardcomponent directoryWhy
This is a staged SDC migration for cards.
The first step was to make the shared
az_cardrendering layer a component without rewriting the formatter. The next step, included here, was to give theaz_cardsparagraph bundle its own component boundary so the paragraph can explicitly own deck-level composition concerns such as wrapper/title rendering while continuing to compose the existing card item renderer.The asset-packaging decision was also intentional: assets are now closer to the component they belong to, but loading behavior is still controlled by the existing library and formatter flow instead of switching to always-on component metadata assets.
Scope notes
This PR makes
az_cardsa paragraph-level SDC composition layer, but it does not fully move all deck/grid responsibility out ofAZCardDefaultFormatteryet. In this first phase, the formatter still provides the rendered card collection, and the newaz_cardscomponent wraps and composes that output.Testing
lando drush crlando phpstanlando eslint .az_carddirectly viadrush php:evalto verify component-backed outputaz_cardsparagraph and confirmed both component markers are present:az_paragraphs_cards:az-cardsaz_card:az-card