fix: #3627180 Render the Hero Slider stories by passing slides as strings

Both Hero/Heroslider stories rendered nothing. The slides were passed as render arrays keyed "'#markup'", which Drupal rejects as an invalid render array key.

The key cannot be fixed. The JSON key text is consumed verbatim by two consumers that want opposite things: "#markup" emits a bare #markup: key into the generated JavaScript, a syntax error that breaks the entire Storybook preview build, while "'#markup'" reaches Drupal as the literal key '#markup'. Both were tried and both fail.

So the render array goes away. Slides are plain HTML strings in items, and the story converts each to raw markup before the include, the idiom this same story already used for its empty prop. The slide's sample copy changes with it.

Issue: https://www.drupal.org/project/vartheme_bs5_rightup/issues/3627180

Verified: "Three Slides" renders 3 carousel items and 3 titles, "One Slide" renders 1, "Empty Hero Slider" renders its empty state, and the Storybook preview build compiles and serves 474 entries.

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading