Skip to content

PR_26179_CHARLIE_027-sprites-preview-export#263

Merged
ToolboxAid merged 1 commit into
mainfrom
PR_26179_CHARLIE_027-sprites-preview-export
Jun 28, 2026
Merged

PR_26179_CHARLIE_027-sprites-preview-export#263
ToolboxAid merged 1 commit into
mainfrom
PR_26179_CHARLIE_027-sprites-preview-export

Conversation

@ToolboxAid

Copy link
Copy Markdown
Owner

Summary

Validation

  • node --check assets/toolbox/sprites/js/index.js PASS
  • node --check dev/tests/playwright/tools/SpritesToolShell.spec.mjs PASS
  • git diff --check ... PASS
  • browser storage / inline / imageDataUrl/toDataURL guard scan PASS
  • npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs --workers=1 --reporter=list --output=<temp> PASS, 1 test passed

Artifact

  • dev/workspace/zip/PR_26179_CHARLIE_027-sprites-preview-export_delta.zip

@ToolboxAid ToolboxAid marked this pull request as ready for review June 28, 2026 20:14
@ToolboxAid ToolboxAid changed the base branch from PR_26179_CHARLIE_026-sprites-palette-panel to main June 28, 2026 20:14
@ToolboxAid ToolboxAid merged commit af37823 into main Jun 28, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51b0225232

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

function exportPreviewPng() {
const canvas = document.querySelector("[data-sprites-preview-canvas]");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Export the sprite at the selected grid size

When the user downloads after choosing either 16x16 or 32x32, this exports the fixed preview canvas, which is declared as width="160" height="160" in toolbox/sprites/index.html, so every PNG is 160×160 instead of matching the advertised draft grid dimensions. That makes the downloaded sprite asset inconsistent with the selected canvas size; render the export from an offscreen canvas sized to editorState.gridSize and keep the 160px canvas only for display.

Useful? React with 👍 / 👎.

box-shadow: 0 1px 4px var(--swatch-shadow-color)
}

.sprite-preview-shell {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire the preview styles into the loaded stylesheet

These new .sprite-preview-* rules are added to gamefoundrystudio.css, but the sprites page only links assets/theme-v2/css/theme.css, and that entrypoint does not import gamefoundrystudio.css. In the actual /toolbox/sprites/index.html page the preview/export panel therefore loses the intended shell, border, sizing, and pixelated rendering; move these rules into an imported Theme V2 module or wire this stylesheet intentionally.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant