Skip to content

Commit d4361f7

Browse files
committed
Fix Toolbox tile layout and Planned filter display - PR_26160_064-toolbox-tile-layout-and-planned-filter
1 parent 70c4e07 commit d4361f7

4 files changed

Lines changed: 252 additions & 9 deletions

File tree

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
Order Tool Group Status Complete
2+
1
3+
AI Assistant
4+
AI
5+
Wireframe No
6+
2
7+
Project Workspace
8+
Build/Create
9+
Ready Yes
10+
3
11+
Project Journey
12+
Build/Create
13+
Ready Yes
14+
4
15+
Game Design
16+
Design
17+
Ready Yes
18+
5
19+
Game Configuration
20+
Build/Create
21+
Ready Yes
22+
6
23+
Assets
24+
Design
25+
Ready Yes
26+
7
27+
Colors
28+
Design
29+
Ready Yes
30+
8
31+
Fonts
32+
Design
33+
Wireframe No
34+
9
35+
Sprites
36+
Design
37+
Wireframe No
38+
10
39+
Characters
40+
Design
41+
Wireframe No
42+
11
43+
Objects
44+
Design
45+
Wireframe No
46+
12
47+
Worlds
48+
Design
49+
Wireframe No
50+
13
51+
Animations
52+
Design
53+
Wireframe No
54+
14
55+
Audio
56+
Audio
57+
Wireframe No
58+
15
59+
Music
60+
Audio
61+
Wireframe No
62+
16
63+
Voices
64+
Audio
65+
Wireframe No
66+
17
67+
Videos
68+
Audio
69+
Wireframe No
70+
18
71+
Build Game
72+
Build/Create
73+
Wireframe No
74+
19
75+
Game Testing
76+
Play
77+
Wireframe No
78+
20
79+
Controls
80+
Platform
81+
Wireframe No
82+
21
83+
Hitboxes
84+
Platform
85+
Wireframe No
86+
22
87+
Saved Data
88+
Platform
89+
Wireframe No
90+
23
91+
Debug
92+
Platform
93+
Wireframe No
94+
24
95+
Performance
96+
Platform
97+
Wireframe No
98+
25
99+
Events
100+
Platform
101+
Wireframe No
102+
26
103+
Publish
104+
Marketplace
105+
Planned No
106+
27
107+
Marketplace
108+
Marketplace
109+
Wireframe No
110+
28
111+
Community
112+
Marketplace
113+
Wireframe No
114+
29
115+
Languages
116+
Platform
117+
Wireframe No
118+
30
119+
Achievements
120+
Play
121+
Wireframe No
122+
31
123+
Ratings
124+
Play
125+
Wireframe No
126+
32
127+
Cloud
128+
Platform
129+
Hidden No
130+
33
131+
Custom Extensions
132+
Build/Create
133+
Hidden No
134+
34
135+
MIDI
136+
Audio
137+
Hidden No
138+
35
139+
Particles
140+
Audio
141+
Hidden No
142+
36
143+
Audio Effects
144+
Audio
145+
Hidden No
146+
37
147+
Voice Capture
148+
Audio
149+
Hidden No
150+
38
151+
Voice Output
152+
Audio
153+
Hidden No
154+
39
155+
Users
156+
Platform
157+
Planned No
158+
40
159+
Environments
160+
Platform
161+
Planned No
162+
41
163+
Game Migration
164+
Platform
165+
Planned No
166+
42
167+
Platform Settings
168+
Platform
169+
Planned No
170+
Tools Progress lists 42/42 planned or active tools in intended build sequence. Complete: 6/42.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# PR_26160_064-toolbox-tile-layout-and-planned-filter
2+
3+
## Branch Validation
4+
5+
- Current branch: `main`
6+
- Expected branch: `main`
7+
- Branch validation: PASS
8+
9+
## Summary
10+
11+
- Split Toolbox tile action, group, and status into separate card lines.
12+
- Preserved existing group colors and group assignments.
13+
- Fixed Planned tile visibility for normal users when the Planned status filter is selected.
14+
- Added regression coverage proving Planned (28) renders 28 planned tiles and Tool Count reflects visible cards.
15+
16+
## Requirement Checklist
17+
18+
| Requirement | Status | Evidence |
19+
| --- | --- | --- |
20+
| Tile line 1 is badge icon and Open Tool/Planned Details action | PASS | `toolbox/tools-page-accordions.js` now keeps `createToolActionRow()` to badge + action link only; Playwright validates action row order. |
21+
| Tile line 2 is group color marker and group name | PASS | `createToolCard()` now appends `createGroupLabel(tool.group)` as its own card child after the action row; Playwright validates group badge is not inside the action row. |
22+
| Tile line 3 is status badge | PASS | `createToolCard()` appends `stateBadge` immediately after the group line; Playwright validates group and status are separate lines. |
23+
| Do not render group and status on same line | PASS | Playwright checks the status badge top position is below the group badge top position. |
24+
| Preserve group colors and assignments | PASS | No registry/group mapping files changed; existing group color/assignment Playwright validation passed. |
25+
| Fix Planned filter regression | PASS | `baseVisibleForCreator()` now permits planned tools only when the Planned filter is active. |
26+
| Tool Count reflects visible tiles when Planned is selected | PASS | Playwright validates `Tool Count: 38/38` after selecting Planned with default active non-planned filters. |
27+
| Support multiple active status filters without hiding Planned tools | PASS | Existing multi-filter Build Path test passed; new normal tile assertion validates Planned + default filters show all 38 tiles. |
28+
| Keep Complete as the only default active Build Path filter | PASS | Existing Build Path Playwright assertions still validate Complete-only default. |
29+
| Add regression validation so Planned (28) displays 28 planned tiles | PASS | `tests/playwright/tools/ToolboxRoutePages.spec.mjs` asserts 28 planned tile cards after selecting Planned. |
30+
| No inline script/style/event handlers | PASS | Static `rg` checks found no runtime/page inline additions; only existing Playwright source assertions matched. |
31+
32+
## Validation
33+
34+
- PASS: `node --check toolbox/tools-page-accordions.js`
35+
- PASS: `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs`
36+
- PASS: `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --project=playwright` (8 passed)
37+
- PASS: `git diff --check` (line-ending warning only, no whitespace errors)
38+
- PASS: Inline handler/style/script scan on changed active Toolbox files.
39+
40+
## Impacted Lane
41+
42+
- Targeted Toolbox validation: Toolbox index tile layout, Planned status filtering, Tool Count, and multi-filter behavior.
43+
44+
## Skipped Lanes
45+
46+
- Full samples validation: skipped because no sample runtime or shared sample loader changed.
47+
- Full repo smoke: skipped per request; targeted Toolbox coverage exercised the affected page behavior.
48+
49+
## Manual Test Notes
50+
51+
- Default Toolbox tile view still shows Wireframe, Beta, and Complete tools.
52+
- Selecting Planned displays all 28 planned tools while keeping the default visible status filters active.
53+
- Tile metadata now appears as action row, group row, then status row.

tests/playwright/tools/ToolboxRoutePages.spec.mjs

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ test("toolbox index shows wireframe and beta tools while Planned remains opt-in"
128128
await expect(page.locator("[data-toolbox-tool-name-link='Project Journey']")).toBeVisible();
129129
await expect(page.locator("[data-toolbox-tool-name-link='Project Workspace']")).toBeVisible();
130130
await expect(page.locator("[data-toolbox-tool-name-link='Publish']")).toHaveCount(0);
131+
await expect(page.locator("[data-tools-count]")).toHaveText("Tool Count: 10/38");
132+
await page.locator("[data-toolbox-status-filter='planned']").click();
133+
await expect(page.locator("[data-toolbox-status-filter='planned']")).toHaveAttribute("aria-pressed", "true");
134+
await expect(page.locator("[data-toolbox-tool-card][data-toolbox-release-channel='planned']")).toHaveCount(28);
135+
await expect(page.locator("[data-toolbox-tool-card]")).toHaveCount(38);
136+
await expect(page.locator("[data-tools-count]")).toHaveText("Tool Count: 38/38");
137+
await expect(page.locator("[data-toolbox-tool-name-link='AI Assistant']")).toBeVisible();
138+
await expect(page.locator("[data-toolbox-tool-name-link='Publish']")).toBeVisible();
131139

132140
await setServerSession(server, MOCK_DB_KEYS.users.admin);
133141
await page.goto(`${server.baseUrl}/toolbox/index.html`, { waitUntil: "networkidle" });
@@ -248,18 +256,27 @@ test("toolbox status kickers, filters, card order, and voting controls work from
248256
return child.tagName.toLowerCase();
249257
})
250258
));
251-
expect(actionOrder).toEqual(["badge", "Open Tool", "group"]);
259+
expect(actionOrder).toEqual(["badge", "Open Tool"]);
252260
const bodyOrder = await wireframeCard.locator(".card-body").evaluate((body) => (
253261
Array.from(body.children).map((child) => {
254262
if (child.hasAttribute("data-toolbox-tile-action-row")) return "action";
263+
if (child.hasAttribute("data-toolbox-group-badge")) return "group";
255264
if (child.hasAttribute("data-toolbox-vote-controls")) return "feedback";
256265
if (child.hasAttribute("data-toolbox-plan-details")) return "plan-details";
257266
if (child.hasAttribute("data-toolbox-state-badge")) return "state";
258267
return child.tagName.toLowerCase();
259268
})
260269
));
261-
expect(bodyOrder.slice(2, 6)).toEqual(["action", "feedback", "plan-details", "state"]);
262-
expect(bodyOrder.at(-1)).toBe("state");
270+
expect(bodyOrder.slice(2, 7)).toEqual(["action", "group", "state", "feedback", "plan-details"]);
271+
const groupAndStateTop = await wireframeCard.locator(".card-body").evaluate((body) => {
272+
const group = body.querySelector("[data-toolbox-group-badge]");
273+
const state = body.querySelector("[data-toolbox-state-badge]");
274+
return {
275+
group: Math.round(group.getBoundingClientRect().top),
276+
state: Math.round(state.getBoundingClientRect().top),
277+
};
278+
});
279+
expect(groupAndStateTop.state).toBeGreaterThan(groupAndStateTop.group);
263280

264281
const buildVotes = wireframeCard.locator("[data-toolbox-vote-controls='Build Game']");
265282
await expect(buildVotes).toBeVisible();
@@ -345,9 +362,9 @@ test("toolbox status kickers, filters, card order, and voting controls work from
345362
await expect(designGroupLabel).toHaveCSS("background-color", "rgb(255, 79, 139)");
346363
await expect(designGroupLabel).toHaveCSS("color", "rgb(255, 255, 255)");
347364
const designActionRow = page.locator("[data-toolbox-tile-action-row='Colors']");
348-
await expect(designActionRow.locator("[data-toolbox-group-label='Design']")).toHaveCSS("background-color", "rgb(255, 79, 139)");
349-
await expect(designActionRow.locator("[data-toolbox-group-label='Design']")).toHaveCount(1);
350-
await expect(page.locator("[data-toolbox-tool-card='Colors'] .card-body > :last-child")).toHaveAttribute("data-toolbox-state-badge", "complete");
365+
await expect(designActionRow.locator("[data-toolbox-group-label='Design']")).toHaveCount(0);
366+
await expect(page.locator("[data-toolbox-tool-card='Colors'] .card-body > [data-toolbox-group-badge] [data-toolbox-group-label='Design']")).toHaveCSS("background-color", "rgb(255, 79, 139)");
367+
await expect(page.locator("[data-toolbox-tool-card='Colors'] .card-body > [data-toolbox-state-badge]")).toHaveAttribute("data-toolbox-state-badge", "complete");
351368

352369
await page.goto(`${server.baseUrl}/admin/tool-votes.html`, { waitUntil: "networkidle" });
353370
await expect(page.getByRole("heading", { level: 1, name: "Tool Votes" })).toBeVisible();

toolbox/tools-page-accordions.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ import { getSessionCurrent } from "../src/engine/api/session-api-client.js";
310310
return tool.adminOnly !== true && (
311311
tool.releaseChannel === "complete" ||
312312
tool.releaseChannel === "beta" ||
313-
tool.releaseChannel === "wireframe"
313+
tool.releaseChannel === "wireframe" ||
314+
(tool.releaseChannel === "planned" && visibleReleaseChannels.has("planned"))
314315
);
315316
}
316317

@@ -900,7 +901,7 @@ import { getSessionCurrent } from "../src/engine/api/session-api-client.js";
900901
link.textContent = tool.href.indexOf("toolbox/") === 0 || tool.href.indexOf("../toolbox/") === 0 ? "Open Tool" : "Open Page";
901902
}
902903

903-
row.append(badge, link, createGroupLabel(tool.group));
904+
row.append(badge, link);
904905
return row;
905906
}
906907

@@ -1069,6 +1070,7 @@ import { getSessionCurrent } from "../src/engine/api/session-api-client.js";
10691070
const description = document.createElement("p");
10701071
description.textContent = tool.description;
10711072
const actionRow = createToolActionRow(tool, registryTool, body);
1073+
const groupLabel = createGroupLabel(tool.group);
10721074
const voteControls = createToolVoteControls(tool);
10731075
const plannedDetails = createPlanDetails(tool);
10741076
const values = createToolValues(tool, options);
@@ -1082,6 +1084,8 @@ import { getSessionCurrent } from "../src/engine/api/session-api-client.js";
10821084
cardParts.push(statusDiagnostic);
10831085
}
10841086
cardParts.push(actionRow);
1087+
cardParts.push(groupLabel);
1088+
cardParts.push(stateBadge);
10851089
if (voteControls) {
10861090
cardParts.push(voteControls);
10871091
}
@@ -1091,7 +1095,6 @@ import { getSessionCurrent } from "../src/engine/api/session-api-client.js";
10911095
if (values) {
10921096
cardParts.push(values);
10931097
}
1094-
cardParts.push(stateBadge);
10951098

10961099
body.append(...cardParts);
10971100
article.append(media, body);

0 commit comments

Comments
 (0)