Skip to content

Release v6.0.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 21:31
82da6db

Screenplay 6 gives templates two separate ideas: slots, the regions content is placed in, and outlets, the lists of items a template offers (actions, filters, tabs, stats and navigation). A slice's screen now says where it fits, and a hook says how it opens. This is a major version with no deprecation period: the old forms are errors, and screenplay migrate --from 5 --to 6 rewrites existing models.

Added

  • Slots with a role (page, pane or panel) and routed [by <param>], primary and optional. (part of Cratis/StudioIssues#1327)
  • Outlets: outlet <name> of actions|filters|tabs|stats|navigation [for item|for screen] [in <slot>] with default items. Lower levels write inherits, extends or overrides, hide <id> and before|after <id>, and any module or feature can contribute to <outlet>. (#1178)
  • Outlet items: button and group, filter <id> title "…" sets <Query>.<param>, tab <id> title "…" shows <Screen>, stat <id> title "…" value from <Query>.<field>, and navigation item … target …. Dialog and drawer templates declare their buttons as outlet actions of actions with the built-ins runs close and runs submit.
  • Placement and hooks: fits <role>, … on a slice's screen, and opens dialog|drawer|in slot <name>, runs, for item|for screen and enabled when <condition> on a button or item. A State Change slice may have no screen when a runs hook issues it.
  • Form pickers with field <property> choose from query <Query> show <field>, inferred when the property's concept is the key of a read model a list query returns.
  • show <Screen> by <param> from <element>.selection in a slot.
  • New checks: runs on a slice whose inputs need a form, opens in slot naming a missing, filled or unfitting slot, hide/before/after naming an item the inherited outlet does not have, items of the wrong kind, filters and stats bound to the wrong query, and screens that show data bound to nothing. The codes are listed on the diagnostics page.
  • screenplay migrate <path> --from <version> [--to <version>] [--dry-run] [--report <file>] rewrites a model from one version to the next, one step at a time. It keeps comments, layout and file encoding, reports anything it cannot decide as needing review with the file and line, and exits 0 when everything migrated, 2 when a file needs review and 1 on failure. It is also available as the MCP migrate tool and the VS Code command Screenplay: Migrate document. (#1179)
  • The MCP server, CLI, Monaco language service (including rename and find references) and the VS Code grammar understand every new form.

Changed

  • Breaking: component outlet <name> is now slot <name>, and destination outlet <name> is now destination slot <name>.
  • Breaking: navigation topbar|sidebar is now outlet <name> of navigation, <slot> contributes <Point> is now outlet <Point> of navigation, and a feature or module toolbar <name> is now outlet <name> extends. Buttons in a module's navigation region move to the layout's actions outlet.
  • Breaking: PLAY0533 (a command nobody issues) is on by default and counts runs hooks as issuers. --check PLAY0533 is still accepted.
  • To upgrade, run screenplay migrate <model root> --from 5 --to 6 before editing. Models written for Screenplay 4 use --from 5. See Migrating a model.