Skip to content

PR_26179_CHARLIE_025-sprites-basic-drawing#261

Merged
ToolboxAid merged 1 commit into
mainfrom
PR_26179_CHARLIE_025-sprites-basic-drawing
Jun 28, 2026
Merged

PR_26179_CHARLIE_025-sprites-basic-drawing#261
ToolboxAid merged 1 commit into
mainfrom
PR_26179_CHARLIE_025-sprites-basic-drawing

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 / stale-code 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_025-sprites-basic-drawing_delta.zip

@ToolboxAid ToolboxAid marked this pull request as ready for review June 28, 2026 20:13
@ToolboxAid ToolboxAid changed the base branch from PR_26179_CHARLIE_024-sprites-canvas-grid to main June 28, 2026 20:13
@ToolboxAid ToolboxAid merged commit 742245d 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: 19abdfd874

ℹ️ 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".

Comment on lines +1198 to +1199
.sprite-canvas-cell.is-painted {
background: var(--text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move painted-pixel CSS into a loaded stylesheet

The new drawing code only makes painted pixels visible through this .is-painted rule, but /toolbox/sprites/index.html links only assets/theme-v2/css/theme.css, and theme.css does not import gamefoundrystudio.css (repo-wide search also found no runtime import of this file). In the actual Sprite Creator page, clicking Pencil/Fill will add the class and update the count, but the pixel background will not change, so the core drawing behavior is effectively invisible to users.

Useful? React with 👍 / 👎.


grid.replaceChildren();
editorState.gridSize = size;
editorState.paintedPixels.clear();

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 Avoid clearing the draft when reselecting current size

When a user has painted pixels and clicks the already-active 16x16/32x32 size button, the click still calls setGridSize with the same size, and this clear drops all session pixels and rebuilds the grid. Since the selected display-mode control remains enabled, reselecting the current mode should be a no-op or preserve the draft; otherwise an accidental click loses unsaved work.

Useful? React with 👍 / 👎.

Comment on lines +57 to +61
editorState.paintedPixels.delete(key);
cell.classList.remove("is-painted");
} else {
editorState.paintedPixels.add(key);
cell.classList.add("is-painted");

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 Expose painted state to assistive tech

For screen-reader users, painting or erasing a grid cell only changes the CSS class and draft count; the cell's accessible name/state remains just Pixel row ..., column ..., so navigating the grid cannot distinguish painted pixels from empty ones. When adding drawing state, update each affected cell's label or an ARIA state such as aria-selected/aria-pressed in the paint/erase/fill paths so non-visual users can edit the sprite.

Useful? React with 👍 / 👎.

Comment on lines +59 to +61
} else {
editorState.paintedPixels.add(key);
cell.classList.add("is-painted");

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 Honor Fill when it is the active canvas tool

After the Fill button is clicked, the toolbar and status leave fill as the active tool, but clicking canvas cells still follows this generic non-eraser branch and paints only the single clicked pixel. For example, if Fill is selected and the grid is then reset by changing canvas size, the UI still says Fill is active, yet the next canvas click does not fill the grid; either Fill should not remain an active tool after its button action or this path should invoke the fill behavior.

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