content & style opti, new tool annotation
All checks were successful
Deploy Sokko G / deploy (push) Successful in 6s

This commit is contained in:
Shinuwa 2026-07-24 09:37:32 +02:00
parent 0db35a0d2c
commit 6e1472d2fb
21 changed files with 1112 additions and 194 deletions

View file

@ -69,14 +69,70 @@ export function validateSiteContent(site) {
"toolboxes.storageHelp.text",
"toolboxes.modules.notepad.placeholder",
"toolboxes.modules.checklist.itemPlaceholder",
"toolboxes.modules.checklist.quantityLabel",
"toolboxes.modules.checklist.addButton",
"toolboxes.modules.checklist.importPlaceholder",
"toolboxes.modules.checklist.importButton",
"toolboxes.modules.checklist.decrementLabel",
"toolboxes.modules.checklist.incrementLabel",
"toolboxes.modules.checklist.currentQuantityLabel",
"toolboxes.modules.checklist.deleteTitle",
"toolboxes.modules.screenshots.addImages",
"toolboxes.modules.screenshots.pastePlaceholder",
"toolboxes.modules.screenshots.pasteAriaLabel",
"toolboxes.modules.screenshots.imageAlt",
"toolboxes.modules.screenshots.previewAriaLabel",
"toolboxes.modules.screenshots.annotateAriaLabel",
"toolboxes.modules.screenshots.annotateTitle",
"toolboxes.modules.screenshots.deleteAriaLabel",
"toolboxes.modules.screenshots.deleteTitle",
"toolboxes.modules.links.titlePlaceholder",
"toolboxes.modules.links.urlPlaceholder",
"toolboxes.modules.links.addButton",
"toolboxes.modules.links.importPlaceholder",
"toolboxes.modules.links.importButton",
"toolboxes.modules.links.copyTitle",
"toolboxes.modules.links.copiedTitle",
"toolboxes.modules.links.deleteTitle",
"toolboxes.modules.counters.labelPlaceholder",
"toolboxes.modules.counters.addButton",
"toolboxes.modules.counters.decrementLabel",
"toolboxes.modules.counters.incrementLabel",
"toolboxes.modules.counters.resetTitle",
"toolboxes.modules.counters.deleteTitle",
"toolboxes.modules.calculator.expressionLabel",
"toolboxes.modules.calculator.expressionPlaceholder",
"toolboxes.modules.calculator.resultLabel",
"toolboxes.modules.calculator.labelLabel",
"toolboxes.modules.calculator.labelPlaceholder",
"toolboxes.modules.calculator.saveButton",
"toolboxes.modules.calculator.rootButton",
"toolboxes.modules.calculator.resetTitle",
"toolboxes.modules.calculator.copyTitle",
"toolboxes.modules.calculator.copiedTitle",
"toolboxes.modules.calculator.scrollableTitle",
"toolboxes.modules.calculator.emptyResults",
"toolboxes.modules.calculator.readonlyValueTitle",
"toolboxes.modules.calculator.useEntryTitle",
"toolboxes.modules.calculator.renameTitle",
"toolboxes.modules.calculator.deleteTitle",
"toolboxes.modules.imageAnnotation.addImage",
"toolboxes.modules.imageAnnotation.replaceImage",
"toolboxes.modules.imageAnnotation.pastePlaceholder",
"toolboxes.modules.imageAnnotation.pasteAriaLabel",
"toolboxes.modules.imageAnnotation.stageAriaLabel",
"toolboxes.modules.imageAnnotation.addMarkerAriaLabel",
"toolboxes.modules.imageAnnotation.imageAlt",
"toolboxes.modules.imageAnnotation.previewTitle",
"toolboxes.modules.imageAnnotation.previewAriaLabel",
"toolboxes.modules.imageAnnotation.markerPrefix",
"toolboxes.modules.imageAnnotation.markersSingular",
"toolboxes.modules.imageAnnotation.markersPlural",
"toolboxes.modules.imageAnnotation.markerPlaceholder",
"toolboxes.modules.imageAnnotation.emptyImage",
"toolboxes.modules.imageAnnotation.emptyMarkers",
"toolboxes.modules.imageAnnotation.deleteImageTitle",
"toolboxes.modules.imageAnnotation.deleteMarkerTitle",
"toolboxes.emptyTitle",
"toolboxes.emptyText"
].forEach((path) => assertNonEmptyString(site, path));

View file

@ -19,6 +19,7 @@ test("react application defines the expected local toolbox primitives", async ()
const styleCards = await readFile("website/src/styles/_cards.scss", "utf8");
const styleHome = await readFile("website/src/styles/_home.scss", "utf8");
const styleToolboxes = await readFile("website/src/styles/_toolboxes.scss", "utf8");
const styleOverlays = await readFile("website/src/styles/_overlays.scss", "utf8");
const styleIcons = await readFile("website/src/styles/_icons.scss", "utf8");
const styleGames = await readFile("website/src/styles/_games.scss", "utf8");
const styleMhwilds = await readFile("website/src/styles/_mhwilds.scss", "utf8");
@ -46,10 +47,12 @@ test("react application defines the expected local toolbox primitives", async ()
const calculatorModule = await readFile("website/src/features/toolboxes/modules/CalculatorModule.jsx", "utf8");
const checklistModule = await readFile("website/src/features/toolboxes/modules/ChecklistModule.jsx", "utf8");
const screenshotsModule = await readFile("website/src/features/toolboxes/modules/ScreenshotsModule.jsx", "utf8");
const imageAnnotationModule = await readFile("website/src/features/toolboxes/modules/ImageAnnotationModule.jsx", "utf8");
const linksModule = await readFile("website/src/features/toolboxes/modules/LinksModule.jsx", "utf8");
const countersModule = await readFile("website/src/features/toolboxes/modules/CountersModule.jsx", "utf8");
const textImport = await readFile("website/src/features/toolboxes/modules/textImport.js", "utf8");
const reorderHook = await readFile("website/src/hooks/usePointerReorder.js", "utf8");
const bodyScrollLock = await readFile("website/src/utils/bodyScrollLock.js", "utf8");
assert.match(source, /sokkog:toolboxes/);
assert.match(source, /sokkog:game-toolbox-links/);
@ -60,7 +63,9 @@ test("react application defines the expected local toolbox primitives", async ()
assert.match(styles, /@use "mhwilds"/);
assert.match(styles, /@use "diablo4"/);
assert.match(styleTokens, /--gradient-brand/);
assert.match(styleBase, /\.card-icon-button,\n\.drawer-action-button/);
assert.match(styleBase, /:is\(/);
assert.match(styleBase, /\.card-icon-button/);
assert.match(styleBase, /\.drawer-action-button/);
assert.match(styleNebula, /@function star-field/);
assert.match(styleNebula, /body::after/);
assert.match(styleBase, /\.import-icon-button/);
@ -141,6 +146,8 @@ test("react application defines the expected local toolbox primitives", async ()
assert.match(moduleRegistry, /links:/);
assert.match(moduleRegistry, /counters:/);
assert.match(moduleRegistry, /calculator:/);
assert.match(moduleRegistry, /imageAnnotation:/);
assert.match(moduleRegistry, /Annotation d'images/);
assert.match(moduleRegistry, /editable: false/);
assert.match(moduleRegistry, /module-edit-button/);
assert.match(notepadModule, /export function NotepadModule/);
@ -162,6 +169,7 @@ test("react application defines the expected local toolbox primitives", async ()
assert.match(calculatorModule, /CalculatorEntries/);
assert.match(checklistModule, /export function ChecklistModule/);
assert.match(screenshotsModule, /export function ScreenshotsModule/);
assert.match(imageAnnotationModule, /export function ImageAnnotationModule/);
assert.match(linksModule, /export function LinksModule/);
assert.match(countersModule, /export function CountersModule/);
assert.match(textImport, /export function parseColonImportLines/);
@ -225,18 +233,43 @@ test("react application defines the expected local toolbox primitives", async ()
assert.match(source, /normalizeLinksData/);
assert.match(source, /normalizeCountersData/);
assert.match(source, /normalizeCalculatorData/);
assert.match(source, /normalizeImageAnnotationData/);
assert.match(source, /compactModuleDataForStorage\(type, value\)/);
assert.match(source, /scrollResults/);
assert.match(checklistModule, /ChecklistItem/);
assert.match(checklistModule, /parseColonImportLines/);
assert.match(checklistModule, /Number\.parseInt/);
assert.match(checklistModule, /checklist-qty-current/);
assert.match(checklistModule, /checklist-delete-button danger/);
assert.match(linksModule, /parseColonImportLines/);
assert.match(linksModule, /context\.normalizeUrl/);
assert.match(screenshotsModule, /clipboardData/);
assert.match(screenshotsModule, /createImageAnnotationModule/);
assert.match(screenshotsModule, /shot-annotate-button/);
assert.match(imageAnnotationModule, /annotation-marker/);
assert.match(imageAnnotationModule, /setImageFromFiles/);
assert.match(imageAnnotationModule, /context\.compressImageFile/);
assert.match(imageAnnotationModule, /context\.setScreenshot/);
assert.match(imageAnnotationModule, /createMarkerId/);
assert.match(source, /uid\("marker"\)/);
assert.match(source, /async function addScreenshotFiles/);
assert.match(source, /function ScreenshotViewer/);
assert.match(source, /useModalScrollLock/);
assert.match(bodyScrollLock, /modalLocks/);
assert.match(bodyScrollLock, /is-modal-open/);
assert.match(moduleRegistry, /lockBodyScroll/);
assert.match(source, /screenshot-viewer-media/);
assert.match(source, /screenshot-viewer-image-frame/);
assert.match(source, /screenshot-viewer-marker/);
assert.match(source, /function openImageInNewTab/);
assert.match(source, /!hasMarkers &&/);
assert.match(source, /<Icon name="zoom"/);
assert.match(imageAnnotationModule, /<Icon name="zoom"/);
assert.match(styleBase, /themed-scrollbar/);
assert.match(styleBase, /body\.is-modal-open/);
assert.match(styleOverlays, /overscroll-behavior: contain/);
assert.match(source, /annotation-marker-list themed-scrollbar/);
assert.match(styleIcons, /ui-icon-map/);
assert.match(screenshotsModule, /dataTransfer\.files/);
assert.doesNotMatch(`${mhwildsListing}\n${diablo4Listing}\n${diablo4Overview}`, /mhwilds-(home-grid|home-card|heading|title-row|layout|filters|results|grid)/);
});
@ -265,6 +298,7 @@ test("legacy svg icons are available for reuse", async () => {
await readFile("website/public/static/icons/copy.svg", "utf8");
await readFile("website/public/static/icons/abacus.svg", "utf8");
await readFile("website/public/static/icons/calculator.svg", "utf8");
await readFile("website/public/static/icons/map.svg", "utf8");
await readFile("website/public/static/icons/enter.svg", "utf8");
await readFile("website/public/static/icons/export.svg", "utf8");
await readFile("website/public/static/icons/scrollable.svg", "utf8");