Problem/Motivation

Several SDC components declare a prop with an enum but a default value that is not a member of that enum, which is invalid against the SDC component schema:

  • atoms/heading: text_size, text_color, align, font_weight, font_style each set default: "", but "" is not listed in their enum.
  • organisms/views-view-summary: type sets default: '' while its enum is only ul and ol.

Note: heading is a Drupal Canvas component used in authored content, so adding "" to the enum is the wrong fix — Canvas then refuses to register the component. The default must instead be removed (or set to a valid member).

Steps to reproduce

  1. Validate the component schemas, or drop a Heading component in Drupal Canvas.
  2. The stored default value ("") is not a member of the prop's enum.

Proposed resolution

  • heading: remove the invalid default: "" from the five utility props. The Twig already falls back via prop|default(''), and the enum stays Canvas-clean (do not add "" as an enum option).
  • views-view-summary: set default: 'ul' (a valid enum member; the prop is otherwise hard-coded in the template).

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 and Update Helper on new feature change/addition
  • ❌ Release

Varbase update type

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

User interface changes

  • N/A

API changes

  • N/A (component schema only; no template or markup change).

Data model changes

  • N/A

Release notes snippet

  • Fixed invalid default values on the Heading and View Summary components so they validate and work correctly in Drupal Canvas.

AI usage disclosure

AI-Generated: Yes — an AI assistant helped draft this summary and the merge-request code; all changes were reviewed and tested by the contributor on Drupal 11 + Varbase 11, per the AI contribution policy.

Command icon 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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Title: SDC prop default value is not a member of its enum (heading, views-view-summary) » Heading & Summary components have an invalid default that breaks Drupal Canvas (fix the SDC enum defaults)
Issue summary: View changes

  • rajab natshah committed bee7f174 on 5.0.x
    fix: #3605959 Remove SDC prop default values that are not members of...
rajab natshah’s picture

Status: Active » Fixed

Fixed and released in vartheme_bs5 5.0.0-beta1.

https://www.drupal.org/project/vartheme_bs5/releases/5.0.0-beta1

Credit: Rajab Natshah (RajabNatshah).

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

Status: Fixed » Closed (fixed)

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