Improve home onboarding and table interactions
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s

This commit is contained in:
Shinuwa 2026-08-12 12:29:54 +02:00
parent 3cbd579fb7
commit 53ecde8d2b
9 changed files with 488 additions and 5 deletions

View file

@ -81,6 +81,10 @@ export function validateSiteContent(site) {
"home.stats.toolboxPlural",
"home.stats.toolSingular",
"home.stats.toolPlural",
"home.orientation.ariaLabel",
"home.startMap.eyebrow",
"home.startMap.title",
"home.startMap.description",
"home.origin.eyebrow",
"home.origin.title",
"home.origin.visualAlt",
@ -527,6 +531,27 @@ export function validateSiteContent(site) {
assertNonEmptyString({ tool }, "tool.description");
});
const orientationCards = valueAt(site, "home.orientation.cards");
assert.ok(Array.isArray(orientationCards), "home.orientation.cards must be an array");
assert.ok(orientationCards.length >= 2, "home.orientation.cards must contain at least 2 items");
orientationCards.forEach((card, index) => {
assert.equal(typeof card, "object", `home.orientation.cards[${index}] must be an object`);
assertNonEmptyString({ card }, "card.icon");
assertNonEmptyString({ card }, "card.title");
assertNonEmptyString({ card }, "card.text");
assertNonEmptyString({ card }, "card.action");
assertNonEmptyString({ card }, "card.href");
});
const startMapSteps = valueAt(site, "home.startMap.steps");
assert.ok(Array.isArray(startMapSteps), "home.startMap.steps must be an array");
assert.ok(startMapSteps.length >= 1, "home.startMap.steps must contain at least 1 item");
startMapSteps.forEach((step, index) => {
assert.equal(typeof step, "object", `home.startMap.steps[${index}] must be an object`);
assertNonEmptyString({ step }, "step.title");
assertNonEmptyString({ step }, "step.text");
});
const lines = valueAt(site, "home.origin.lines");
assert.ok(Array.isArray(lines), "home.origin.lines must be an array");
assert.ok(lines.length >= 2, "home.origin.lines must contain at least 2 items");

View file

@ -49,6 +49,7 @@ test("style entrypoint and theme layers are wired", async () => {
assert.match(styleToolboxes, /\.calculator-module/);
assert.match(styleToolboxes, /\.table-module/);
assert.match(styleToolboxes, /\.table-cell-input\.is-selected/);
assert.match(styleToolboxes, /\.table-cell-input\.is-move-target/);
assert.match(styleToolboxes, /\.notepad-toolbar-button\.danger/);
assert.match(styleToolboxes, /\.toolbox-icon-picker/);
assert.match(styleToolboxes, /\.toolbox-game-icon/);

View file

@ -216,6 +216,12 @@ test("toolbox module registry and modules expose expected behavior", async () =>
assert.match(tableModule, /notepad-toolbar-button/);
assert.match(tableModule, /selection/);
assert.match(tableModule, /draggingSelectionRef/);
assert.match(tableModule, /movingSelectionRef/);
assert.match(tableModule, /copiedSelectionRef/);
assert.match(tableModule, /moveSelectionCells/);
assert.match(tableModule, /pasteCellBlock/);
assert.match(tableModule, /parseTsvBlock/);
assert.match(tableModule, /is-move-target/);
assert.match(tableModule, /isMultiCellSelection/);
assert.match(tableModule, /handleCellKeyDown/);
assert.match(tableModule, /clearSelection/);