@cosmicdrift/kumiko-renderer-web 0.209.0 → 0.210.0

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-renderer-web",
3
- "version": "0.209.0",
3
+ "version": "0.210.0",
4
4
  "description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -16,9 +16,9 @@
16
16
  "./styles.css": "./src/styles.css"
17
17
  },
18
18
  "dependencies": {
19
- "@cosmicdrift/kumiko-dispatcher-live": "0.209.0",
20
- "@cosmicdrift/kumiko-headless": "0.209.0",
21
- "@cosmicdrift/kumiko-renderer": "0.209.0",
19
+ "@cosmicdrift/kumiko-dispatcher-live": "0.210.0",
20
+ "@cosmicdrift/kumiko-headless": "0.210.0",
21
+ "@cosmicdrift/kumiko-renderer": "0.210.0",
22
22
  "@radix-ui/react-dialog": "^1.1.15",
23
23
  "@radix-ui/react-dropdown-menu": "^2.1.16",
24
24
  "@radix-ui/react-label": "^2.1.8",
@@ -64,7 +64,7 @@
64
64
  "@types/react-dom": "^19.2.3",
65
65
  "jsdom": "^29.1.1",
66
66
  "tailwindcss": "^4.3.0",
67
- "@cosmicdrift/kumiko-locale-de": "0.209.0"
67
+ "@cosmicdrift/kumiko-locale-de": "0.210.0"
68
68
  },
69
69
  "repository": {
70
70
  "type": "git",
@@ -176,12 +176,12 @@ describe("KumikoScreen / projectionDetail", () => {
176
176
  await waitFor(() => screen.getByTestId("kumiko-screen-record-missing"));
177
177
  });
178
178
 
179
- // fw#2245: a projectionDetail has no write path its footer is Cancel-only
180
- // and defaults to shown (pre-fw#2245 behavior) so existing screens without
181
- // an explicit opt-in keep working; `hideActions: true` turns it off without
182
- // losing back-navigation (shell-breadcrumb.ts also resolves listScreenId
183
- // for this screen type, independent of the footer — see shell-breadcrumb.test.ts).
184
- test("shows Cancel by default when listScreenId is set", async () => {
179
+ // A projectionDetail has no write path, so there's nothing for a "Cancel"
180
+ // button to discard RenderEdit's Cancel is never wired up for this
181
+ // screen type, regardless of `listScreenId`. Back-navigation goes through
182
+ // the breadcrumb instead (shell-breadcrumb.ts resolves `listScreenId`
183
+ // independently of the footer — see shell-breadcrumb.test.ts).
184
+ test("never shows Cancel, even when listScreenId is set", async () => {
185
185
  const withListScreen: ProjectionDetailScreenDefinition = {
186
186
  ...detailScreen,
187
187
  listScreenId: "session-list",
@@ -208,19 +208,30 @@ describe("KumikoScreen / projectionDetail", () => {
208
208
  </DispatcherProvider>,
209
209
  );
210
210
 
211
- await waitFor(() => screen.getByTestId("render-edit-cancel"));
211
+ await waitFor(() => screen.getByTestId("render-edit-form"));
212
+ expect(screen.queryByTestId("render-edit-cancel")).toBeNull();
212
213
  });
213
214
 
214
- test("hideActions:true hides the Cancel button", async () => {
215
- const hiddenActionsScreen: ProjectionDetailScreenDefinition = {
215
+ // Regression: declared `actions` used to disappear along with Cancel
216
+ // whenever a screen hid its RenderEdit footer to get rid of the latter —
217
+ // both now render independently of each other.
218
+ test("declared actions render alongside no Cancel button", async () => {
219
+ const withActionsScreen: ProjectionDetailScreenDefinition = {
216
220
  ...detailScreen,
217
221
  listScreenId: "session-list",
218
- hideActions: true,
222
+ actions: [
223
+ {
224
+ kind: "navigate",
225
+ id: "open-user",
226
+ label: "sessions.detail.action.openUser",
227
+ screen: "user-detail",
228
+ },
229
+ ],
219
230
  };
220
- const hiddenActionsSchema: FeatureSchema = {
231
+ const withActionsSchema: FeatureSchema = {
221
232
  featureName: "sessions",
222
233
  entities: {},
223
- screens: [hiddenActionsScreen],
234
+ screens: [withActionsScreen],
224
235
  };
225
236
  const dispatcher: Dispatcher = createMockDispatcher({
226
237
  query: (async () => ({
@@ -232,14 +243,14 @@ describe("KumikoScreen / projectionDetail", () => {
232
243
  render(
233
244
  <DispatcherProvider dispatcher={dispatcher}>
234
245
  <KumikoScreen
235
- schema={hiddenActionsSchema}
246
+ schema={withActionsSchema}
236
247
  qn="sessions:screen:session-detail"
237
248
  entityId="sess-1"
238
249
  />
239
250
  </DispatcherProvider>,
240
251
  );
241
252
 
242
- await waitFor(() => screen.getByTestId("render-edit-form"));
253
+ await waitFor(() => screen.getByTestId("render-edit-action-open-user"));
243
254
  expect(screen.queryByTestId("render-edit-cancel")).toBeNull();
244
255
  });
245
256
 
@@ -76,10 +76,10 @@ describe("resolveDetailBreadcrumb", () => {
76
76
  ]);
77
77
  });
78
78
 
79
- // fw#2245: projectionDetail has no entity for `listFromEntity` to pair
80
- // against — listScreenId is its only back-navigation source, same role it
81
- // plays for `custom` above. Matters once a screen hides its RenderEdit
82
- // action-bar footer (hideActions) and has no entityList rowAction either.
79
+ // projectionDetail has no entity for `listFromEntity` to pair against —
80
+ // listScreenId is its only back-navigation source, same role it plays for
81
+ // `custom` above. Matters because RenderEdit's Cancel button is never
82
+ // wired up for this screen type and there's no entityList rowAction either.
83
83
  test("projectionDetail uses listScreenId", () => {
84
84
  const screens: ScreenDefinition[] = [
85
85
  {
@@ -35,9 +35,8 @@ export function resolveDetailBreadcrumb(
35
35
 
36
36
  // projectionDetail has no entity to pair with an entityList (unlike
37
37
  // entityEdit above) — `listScreenId` is its only back-navigation source.
38
- // Needed so the breadcrumb still offers "back" when a screen hides its
39
- // RenderEdit action-bar footer (fw#2245's `hideActions`) and isn't
40
- // reachable via a listFromRowAction either.
38
+ // Needed because RenderEdit's Cancel button is never wired up for this
39
+ // screen type and isn't reachable via a listFromRowAction either.
41
40
  const listFromProjectionDetailParent =
42
41
  detail.type === "projectionDetail" && detail.listScreenId !== undefined
43
42
  ? screens.find((s) => lastSegment(s.id) === detail.listScreenId)