Stories shouldn't require use of with{}

Created on 6 February 2024, 5 months ago
Updated 13 February 2024, 4 months ago

Problem/Motivation

If you write a story without the with parameters, the drush generation will fail. It shouldn't, since it's possible to write a Story without passing parameters to with (i.e. hardcoded or highly static components or HTML chunks)

Steps to reproduce

Create a component.stories.yml file with a story without using with:

  {% story default %}

Run drush storybook:generate-all-stories. It will fail.

TypeError: Twig\Compiler::subcompile(): Argument #1 ($node) must be of type Twig\Node\Node, null given, called in /var/www/html/vendor/e0ipso/twig-storybook/src/Twig/Node/NodeTrait.php on line 76 in Twig\Compiler->subcompile() (line 77 of /var/www/html/vendor/twig/twig/src/Compiler.php).

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Twig

Created by

πŸ‡ͺπŸ‡ΈSpain idiaz.roncero Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024