Skip to content

DX: Webform styling #1347

@pmelab

Description

@pmelab

The current developer experience when styling webforms is cumbersome and error prone because Drupal javascript behaviors and additional stylesheets can't easily be replicated in storybook and therefore can't be reliably visual regression tested. Also, Drupal updates are not automatically reflected.

What we would like to achive:

  • Example webform pages are displayed as storybook stories (including all drupal assets)
  • Webform pages are visually tested in chromatic
  • Updates to Drupal or Webform are reflected in tests
  • Also works for non-Webform embeds (e.g. Drupal commerce)

Idea to solve this:

Playwrights "traces" are archives of the full current webpage, including all assets. We could use that to:

  1. Create a playwright test that runs trough the Drupal webform and generates the traces for different form steps.
  2. Find a way to import a trace including all assets (iframe?) into a storybook story
  3. Inject the UI stylesheet to style the form in storybook

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions