Problem/Motivation

The vartheme_bs5:heading SDC component does not appear in the Drupal Canvas library, and its Storybook stories fail to render. Both issues stem from empty-string handling around enum-typed props
(text_size, text_color, align, font_weight, font_style, target):

  • Canvas ComponentMetadataRequirementsChecker disqualifies any prop whose enum contains ''.
  • SDC strict validation rejects empty-string values passed by Storybook stories that aren't in the enum.

Steps to reproduce

  1. Install Varbase (minimal) with vartheme_bs5 and the Canvas + Storybook modules enabled.
  2. Open /canvas/editor/canvas_page/<id> → Library → Base. Heading is missing.
  3. Open /?path=/story/base-heading--default in Storybook. Story stays on Preparing story…; drush watchdog:show reports:
    [vartheme_bs5:heading/text_size] Does not have a value in the enumeration [...]. The provided value is: "".

Proposed resolution

  • heading.component.yml drop - '' from each affected enum so Canvas accepts the schema.
  • heading.stories.twig — remove empty-string args from stories and the Default empty options in argTypes; rely on the Twig template's |default('') for unset props.
  • heading.stories.json — regenerate via drush storybook:generate-all-stories.

Result: Heading appears under Base in Canvas, inserts as <h3>Your heading goes here</h3>; all five Storybook stories render and controls work.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes
  • ❌ Release varbase-11.0.0-alpha1, varbase_starter-1.0.0-alpha1, vartheme_bs5-5.0.0-alpha2

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • fix: #3587468 Heading component for Drupal Canvas + Storybook

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed d12b5374 on 5.0.x
    fix: #3587468 Heading component for Drupal Canvas + Storybook
    
rajab natshah’s picture

Assigned: rajab natshah » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-11.0.0-alpha1, +varbase_starter-1.0.0-alpha1, +vartheme_bs5-5.0.0-alpha2
rajab natshah’s picture

Assigned: josebc » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.