@cratis/pi 7.191.4 → 7.191.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +3 -4
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md +46 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/deliverable-identity.md +3 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/free-screens.md +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +5 -4
- package/package.json +1 -1
|
@@ -214,10 +214,9 @@ module Sales
|
|
|
214
214
|
another place. `runs` issues the command without a form.
|
|
215
215
|
- `show <Screen> by <param> from <element>.selection` in a template slot shows another screen for the selected row.
|
|
216
216
|
|
|
217
|
-
Read [references/application-shell.md](references/application-shell.md) before
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
MCP editing and the review checklist.
|
|
217
|
+
Read [references/application-shell.md](references/application-shell.md) before editing the shell. It covers slots,
|
|
218
|
+
outlet modes and ordering, contributions, hooks, placement, blueprints, sample data and MCP edits. Append
|
|
219
|
+
`screen <Screen>` to `target <Module>.<Feature>` when an item needs a specific page rather than the landing screen.
|
|
221
220
|
|
|
222
221
|
## Interactions — what a click does
|
|
223
222
|
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/application-shell.md
CHANGED
|
@@ -161,13 +161,13 @@ outlet it changes; an outlet it does not mention **inherits** what is above it.
|
|
|
161
161
|
- Each outlet has its own mode: a module can extend the sidebar and inherit the topbar.
|
|
162
162
|
- The layout declares; it never says `inherits`, `extends` or `overrides`, and `inherits` lists no items (`PLAY0897`).
|
|
163
163
|
- `logo image "<path>" title "<text>"` belongs to the layout's navigation outlet only; a logo below the layout is `PLAY0744`.
|
|
164
|
-
- A navigation item is `<id> title "<text>" [icon <name>] [target <Module>[.<Feature>]] [slot <name>]`,
|
|
165
|
-
the layout and after `item` below it; any item nests sub-items as `item` lines. The title is a
|
|
166
|
-
`$strings.<key>`.
|
|
164
|
+
- A navigation item is `<id> title "<text>" [icon <name>] [target <Module>[.<Feature>] [screen <Screen>]] [slot <name>]`,
|
|
165
|
+
after `default` on the layout and after `item` below it; any item nests sub-items as `item` lines. The title is a
|
|
166
|
+
quoted string or `$strings.<key>`.
|
|
167
167
|
- An id is unique in the outlet, and an extending level never repeats an inherited id (`PLAY0905`). `hide <id>` drops an
|
|
168
168
|
inherited item; `before <id>` or `after <id>` under an own item places it among the inherited ones (`PLAY0899` when the
|
|
169
169
|
id is not inherited). Own items never move above inherited ones without `before`.
|
|
170
|
-
- `target` names a module
|
|
170
|
+
- `target` names a module or a feature path. An item with no target needs sub-items, and a target the
|
|
171
171
|
document does not declare is `PLAY0748`. A module with no feature warns (`PLAY0751`).
|
|
172
172
|
- `slot` names a layout slot the target renders into; without it the target renders into the layout's primary slot. A slot
|
|
173
173
|
no layout declares is `PLAY0749`.
|
|
@@ -175,6 +175,45 @@ outlet it changes; an outlet it does not mention **inherits** what is above it.
|
|
|
175
175
|
matters when switching a module from inherit to override: retarget the copied items to the module's own features.
|
|
176
176
|
- An `overrides` outlet with no items leaves the list empty and warns (`PLAY0752`).
|
|
177
177
|
|
|
178
|
+
Without `screen`, the consumer lands on the first page-capable screen in declaration order at or beneath the resolved
|
|
179
|
+
feature or module. It does not prefer a list over a command form. Use `target <Module>.<Feature> screen <Screen>` when
|
|
180
|
+
an item needs a particular page, such as a list declared after a page-capable command form. Two items can select
|
|
181
|
+
different screens of the same feature without changing declaration order or the fallback for other items. This is
|
|
182
|
+
item-local; it does not set the initial `/` route or logo destination.
|
|
183
|
+
|
|
184
|
+
Requires Screenplay 6.41.0 or later (`screenplay --version`) for `screen` on an item; on an older compiler, omit the
|
|
185
|
+
suffix to use the landing fallback.
|
|
186
|
+
|
|
187
|
+
```screenplay
|
|
188
|
+
layout AppShell
|
|
189
|
+
category Shell
|
|
190
|
+
content page routed primary
|
|
191
|
+
outlet sidebar of navigation
|
|
192
|
+
module Shop
|
|
193
|
+
outlet sidebar extends
|
|
194
|
+
item projects title "Projects" target Shop.Projects screen Projects
|
|
195
|
+
item create title "Create project" target Shop.Projects screen CreateProject
|
|
196
|
+
feature Projects
|
|
197
|
+
slice StateView Views
|
|
198
|
+
screen CreateProject
|
|
199
|
+
fits page
|
|
200
|
+
screen Projects
|
|
201
|
+
fits page
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Use a single unquoted screen name and an explicit feature path (nested features are allowed). A module-only target,
|
|
205
|
+
a grouping item without a target, or a missing, repeated, quoted or dotted screen operand is `PLAY0741`. The selected
|
|
206
|
+
screen must be executable in that exact feature, not in a descendant. A free screen counts where its first adopting
|
|
207
|
+
slice owns it. A screen is page-capable if it has no `fits` or if `fits` includes `page`.
|
|
208
|
+
|
|
209
|
+
| Code | Compiler message | Fix |
|
|
210
|
+
| --- | --- | --- |
|
|
211
|
+
| `PLAY1168` | `Navigation target '<Module>.<Feature>' has no executable screen '<Screen>'` | Correct the name or feature path, or adopt the free screen in a slice in the target feature if that feature should own it. |
|
|
212
|
+
| `PLAY1169` | `Navigation target '<Module>.<Feature>' has more than one executable screen named '<Screen>'` | Rename the competing screens so the selected name matches exactly one, and update references. |
|
|
213
|
+
| `PLAY1170` | `Navigation screen '<Screen>' does not fit page` | Select a page-capable screen, or include `page` in `fits` if this screen is intended to open as a page. |
|
|
214
|
+
|
|
215
|
+
An invalid explicit destination is an error, not a reason to fall back to another screen.
|
|
216
|
+
|
|
178
217
|
### `contribute to`: one entry from where it belongs
|
|
179
218
|
|
|
180
219
|
```screenplay excerpt
|
|
@@ -211,7 +250,7 @@ A template offers more than navigation. Each kind takes its own item form, and a
|
|
|
211
250
|
| `filters` | `filter <id> title "…" sets <Query>.<param>` - the parameter must be a `by` or `filter` parameter (`PLAY0901`) |
|
|
212
251
|
| `tabs` | `tab <id> title "…" shows <Screen>` - shown in the slot the outlet is `in` |
|
|
213
252
|
| `stats` | `stat <id> title "…" value from <Query>.<field>` - the query returns one result (`PLAY0902`) |
|
|
214
|
-
| `navigation` | `item <id> title "…" [icon] [target] [slot]`, as above |
|
|
253
|
+
| `navigation` | `item <id> title "…" [icon] [target <Module>[.<Feature>] [screen <Screen>]] [slot]`, as above |
|
|
215
254
|
|
|
216
255
|
```screenplay
|
|
217
256
|
module Catalog
|
|
@@ -523,6 +562,8 @@ apply, reopen. Resolve member names with `syntax-schema`. Details: `cratis-scree
|
|
|
523
562
|
- `cratis render <model> --name <App> --destination <out>` and `cratis run <model>` carry the shell: the navigation
|
|
524
563
|
outlets render, a module's sidebar replaces or extends the application's, a hook opens the slice's screen where it
|
|
525
564
|
fits, and the address reflects the active module, feature and routed slots. The sample data pack is not served.
|
|
565
|
+
- Rendering a selected `screen` requires updated Scene conversion and Stage rendering that carry and honor it. A
|
|
566
|
+
consumer without that support may still open the landing screen even if the compiler accepts the item.
|
|
526
567
|
- Report authoring acceptance, executable admission and runtime rendering separately (see `SKILL.md`).
|
|
527
568
|
|
|
528
569
|
## Review checklist
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/deliverable-identity.md
CHANGED
|
@@ -9,7 +9,9 @@ defaults to those when the model is silent, so declare, in every deliverable app
|
|
|
9
9
|
application title the shell shows; `logo initials` is only valid in a profile's `identity`);
|
|
10
10
|
- a `ui profile` with `root template`, shell `option` lines such as `option showFooter false`, and an `identity`
|
|
11
11
|
block (`name`, `logo initials`);
|
|
12
|
-
- a `title "<text>"` in each screen and a navigation item
|
|
12
|
+
- a `title "<text>"` in each screen and a titled navigation item for each destination the shell offers. Use
|
|
13
|
+
`target <Module>.<Feature>` for the landing screen; append `screen <Screen>` for a specific page in that feature
|
|
14
|
+
(see [navigation outlets](application-shell.md#navigation-outlets-inherit-extend-or-override));
|
|
13
15
|
- `label "<text>"` on **every** `action`.
|
|
14
16
|
|
|
15
17
|
## Example
|
|
@@ -151,7 +151,7 @@ module Invoicing
|
|
|
151
151
|
## Names, navigation, storylines and sample data
|
|
152
152
|
|
|
153
153
|
- **Names resolve from the declaration site.** A query, command or screen a free screen names resolves inside-out from where the screen is declared, then by unique match anywhere in the model. An adopting slice never changes what a name means. Ambiguous or unresolved names stay warnings, as for a slice screen; commands and screens a free screen names have no contract beyond that.
|
|
154
|
-
-
|
|
154
|
+
- `navigate to`, `show` and a storyline `screen` step resolve to a free screen or a slice screen alike, adopted or not. An [outlet item's `target <Module>.<Feature> screen <Screen>`](application-shell.md#navigation-outlets-inherit-extend-or-override) instead requires the free screen to be executable in the exact target feature, where its first adopting slice owns it.
|
|
155
155
|
- **Sample data may name a shape.** `sample data ... shape <Name>` checks its rows against the declared `shape`'s typed fields (`PLAY0710`, `PLAY0711`), as it does against a read model; rows for a screen nobody has adopted can exist before any read model does.
|
|
156
156
|
|
|
157
157
|
```screenplay expect PLAY1164
|
|
@@ -228,10 +228,11 @@ ui profile Desktop
|
|
|
228
228
|
|
|
229
229
|
## Routes, slots, toolbars and dialogs
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
named slot, optional route parameters
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
Screen navigation and screen toolbar items use the typed destination contract:
|
|
232
|
+
screen, named slot, optional route parameters and optionally a dialog. A shell
|
|
233
|
+
navigation outlet instead targets a module or feature, with optional `screen <Screen>`
|
|
234
|
+
for a specific page in the exact target feature (see [navigation outlets](application-shell.md#navigation-outlets-inherit-extend-or-override)).
|
|
235
|
+
A State Change slice's hook lets the slice's `fits` choose the place.
|
|
235
236
|
|
|
236
237
|
```screenplay excerpt
|
|
237
238
|
screen InvoiceList
|