Skip to content

Rename component -desc classes to -body (#668) - #1140

Draft
stephaniehobson wants to merge 1 commit into
v23/heading-template-varsfrom
v23/desc-to-body
Draft

stephaniehobson wants to merge 1 commit into
v23/heading-template-varsfrom
v23/desc-to-body

Conversation

@stephaniehobson

Copy link
Copy Markdown
Contributor

Description

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-descmzp-c-callout-body
mzp-c-card-descmzp-c-card-body
mzp-c-menu-item-descmzp-c-menu-item-body
mzp-c-billboard-descmzp-c-billboard-body

Clean 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 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. 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).

  • I have documented this change in the design system.
  • I have recorded this change in 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-package all pass.

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
stephaniehobson added this pull request to stack #1151 September 11, 2026 21:44
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.

1 participant