Rename component -desc classes to -body (#668) - #1140
Draft
stephaniehobson wants to merge 1 commit into
Draft
stephaniehobson wants to merge 1 commit into
stephaniehobson wants to merge 1 commit into
Conversation
Finishes goal 2 of #1084 -- Picto already used desc/body naming as the reference implementation; this brings Billboard, Callout, Card, and Menu Item in line with it. mzp-c-callout-desc -> mzp-c-callout-body mzp-c-card-desc -> mzp-c-card-body mzp-c-menu-item-desc -> mzp-c-menu-item-body mzp-c-billboard-desc -> mzp-c-billboard-body Clean break, no aliases, matching C1's approach. Renamed carefully rather than with a blanket sed: "desc" is a substring of "description", which appears throughout the surrounding prose in every one of these config.yml/readme files, so a naive s/desc/body/g would have corrupted every "description"/"descriptions" into "bodyription"/"bodyriptions". Used anchored patterns instead -- ^\s*desc: for YAML keys, exact {{ desc }}/{% if desc %} substrings for template vars, and literal class-name strings -- verified after each file that no "description" text was touched. Left assets/js/protocol/newsletter.js and tests/unit/newsletter.js alone -- their "desc" is a Basket API response field, unrelated. Found and fixed a second pre-existing bug while at it: three render('@menu-item', ...) calls in navigation/02-menu/menu.html passed a "description:" key, but menu-item.html's actual parameter has always been "desc" (now "body") -- never "description". The menu-item demo's body paragraph has been silently blank since this was written. Renaming those calls to "body:" (matching the component's real param) fixes it -- confirmed in the built docs output. Same root cause and fix shape as the Picto bug found in the previous commit. Also fixed docs/03-contributing/02-naming.md's worked example, which still used mzp-c-card-desc, and added CHANGELOG/migration.md entries covering both this rename and the previous commit's title-to-heading component classes (neither had one yet -- that PR is already open as a draft, so rather than rewrite that pushed commit's history I've consolidated both into one Component Naming section here). Stacked on v23/heading-template-vars. Part of #1084. Verified: npm run lint, npm test (47 specs, Firefox + Chrome), a direct sass --verbose compile (confirmed 4 -body classes present, 0 -desc classes remain in the compiled output), npm run build-docs (523 items, no errors -- confirmed Card/Callout/Billboard/Card-Layout render body content, and the menu-item bug fix specifically), and npm run build-package all pass.
stephaniehobson
added this pull request to stack #1151
September 11, 2026 21:44
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
Finishes goal 2 of #1084 — Picto already used
desc/bodynaming as the reference implementation; this brings Billboard, Callout, Card, and Menu Item in line with it.mzp-c-callout-desc→mzp-c-callout-bodymzp-c-card-desc→mzp-c-card-bodymzp-c-menu-item-desc→mzp-c-menu-item-bodymzp-c-billboard-desc→mzp-c-billboard-bodyClean break, no aliases, matching the previous commit's approach.
Found and fixed a second pre-existing bug while at it: three
render('@menu-item', ...)calls innavigation/02-menu/menu.htmlpassed adescription:key, butmenu-item.html's actual parameter has always beendesc(nowbody) — neverdescription. The menu-item demo's body paragraph has been silently blank since this was written. Fixed as part of this rename.Also added the
CHANGELOG.md/migration guide entries covering both this rename and the previous commit's title→heading component classes (neither had one yet).CHANGELOG.md.Issue
#668
Testing
npm run lint,npm test(47 specs, Firefox + Chrome),npm run build-docs(523 items, no errors),npm run build-packageall pass.