Repository navigation
Release v6.0.0
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,paneorpanel) androuted [by <param>],primaryandoptional. (part of Cratis/StudioIssues#1327) - Outlets:
outlet <name> of actions|filters|tabs|stats|navigation [for item|for screen] [in <slot>]withdefaultitems. Lower levels writeinherits,extendsoroverrides,hide <id>andbefore|after <id>, and any module or feature cancontribute to <outlet>. (#1178) - Outlet items:
buttonandgroup,filter <id> title "…" sets <Query>.<param>,tab <id> title "…" shows <Screen>,stat <id> title "…" value from <Query>.<field>, and navigationitem … target …. Dialog and drawer templates declare their buttons asoutlet actions of actionswith the built-insruns closeandruns submit. - Placement and hooks:
fits <role>, …on a slice's screen, andopens dialog|drawer|in slot <name>,runs,for item|for screenandenabled when <condition>on a button or item. A State Change slice may have no screen when arunshook 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>.selectionin a slot.- New checks:
runson a slice whose inputs need a form,opens in slotnaming a missing, filled or unfitting slot,hide/before/afternaming 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 MCPmigratetool 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 nowslot <name>, anddestination outlet <name>is nowdestination slot <name>. - Breaking:
navigation topbar|sidebaris nowoutlet <name> of navigation,<slot> contributes <Point>is nowoutlet <Point> of navigation, and a feature or moduletoolbar <name>is nowoutlet <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
runshooks as issuers.--check PLAY0533is still accepted. - To upgrade, run
screenplay migrate <model root> --from 5 --to 6before editing. Models written for Screenplay 4 use--from 5. See Migrating a model.