Problem/Motivation
Fifteen stories pass argument values their own *.component.yml schema rejects, so SDC validation throws and the story renders an empty wrapper. Found by measuring rendered content rather than HTTP status: these all return HTTP 200 with nothing inside. Verified against 1.0.x at commit 6e974b0.
datedeclaredformat: date, given an empty string. An empty string is not a valid date. Affectsbyline(Default, Linked Author) andarticle-teaser(With Image, Text Only, Featured). The schemas also carrydefault: ''on that sameformat: dateprop, so the default is itself invalid against its own format, and any consumer omitting a date hits the same throw.colorgiven an empty string against an enum with no empty member: all fiveaccordion-containerstories. That prop is documented as optional ("Omit to use the default design"), so the empty string should simply not be passed.icon_sizegiven'2'and'1.25'onbootstrap-icon. The enum isfs-1throughfs-6; raw rem numbers are not members.icongiven'download'onbutton, twice. There is nodownloadmember in that 51-value enum.button_variantgiven'btn-outline-light'onhero-slide. The enum isbtn-primary,btn-secondary,btn-light,btn-dark. This one was already corrected upstream as part of issue 3627179.
Steps to reproduce
- Open Storybook and select, for example, Byline, Default.
- The story endpoint answers 200 and the preview shows an empty wrapper with no byline markup.
- The SDC validation error names the invalid
datevalue.
Proposed resolution
Give the dates a real value, drop the empty color args, map icon_size to fs-2 and fs-5, and use arrow-down for the button icon. After the fix, a full sweep of all 398 stories measuring rendered content drops the empty count from 28 to 18.
The invalid default: '' on the format: date props is worth fixing in the schema separately, since that changes the Canvas component version hash.
What the remaining 18 are, so nobody re-finds them: thirteen are components whose SDC slot content never reaches the render endpoint (card-slider, hero-slider-container, live-feed, accordion-container, section, all of which declare slots). The rest are carousel, pagination, card-pricing, page-title, input and live-feed-item, whose cause is not yet traced. One more, share "Vertical centered (no alignment)", passes an empty alignment against the enum start, end; there is no way to express "no alignment" through that prop, so it needs a component decision rather than a story fix.
A merge request will follow.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- Fifteen Storybook stories render their component instead of an empty wrapper.
API changes
- N/A for the story fix. Correcting the invalid
default: ''on theformat: dateprops would change the Canvas component version hash, so it is proposed as separate work.
Data model changes
- N/A
Release notes snippet
- Fixed fifteen stories whose args failed their component schema and rendered nothing.
Issue fork vartheme_bs5_rightup-3627276
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rajab natshahComment #4
rajab natshahComment #6
rajab natshah