Use stories instead of default values

Created on 11 March 2025, 23 days ago

Problem/Motivation

According to README.md:

A fairly crucial discovery during development of this module is that it does not
really work without default values for component properties. (See
welcome.component.yml.)

This may be harmful because in SDC contrib space, JSON schema's default property is used for

To confuse matters, in
the component schema slots use "examples" while properties use "default", and
some properties may use "examples" instead of "default".

example (available for both slots & props) will be a better pick, but we can do even better :)

Proposed resolution

Those modules, similar to sdc_library, share the same stories format

Documented here: https://project.pages.drupalcode.org/ui_patterns/2-authors/1-stories-and...

What would you think about using it in sdc_library?

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

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

Comments & Activities

  • Issue created by @pdureau
  • πŸ‡ͺπŸ‡ͺEstonia mmatsoo

    @pdureau Thanks for the suggestion! I appreciate that you pointed it out and provided links to resources.

    I'll need to discuss the implications (time and effort) of supporting stories with my team.

  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Hello, I took a look at this module today since I saw it got an update.

    Looks like this module has a more robust interface vs UI Patterns Library. You can adjust the component values and change the theme.

    I have been really liking the UI Patterns modules lately. Compared to another project I'm on with Storybook, it is so much more straightforward to have it all in Drupal.

    I'd like to see more collaboration on a Drupal SDC component library (efforts feel fragmented across modules at the moment).

    Having a common format for stories is a major step forward, so big +1 from me.

Production build 0.71.5 2024