Skip to content

Add website-targeted JavaScript Skin Designer integration#4758

Open
liannacasper wants to merge 29 commits intomasterfrom
codex/build-javascript-version-of-skindesigner
Open

Add website-targeted JavaScript Skin Designer integration#4758
liannacasper wants to merge 29 commits intomasterfrom
codex/build-javascript-version-of-skindesigner

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Provide a web-friendly JavaScript build of the existing Skin Designer so it can be embedded into the website similarly to the Playground and Initializr, and enable save/export flows in browser mode.

Description

  • Add a website-native ShouldExecute implementation for the JavaScript port that returns true and posts a cn1-skindesigner-ui-ready message to the parent page to support embedded hosting (file: scripts/skindesigner/javascript/src/main/javascript/com_codename1_tools_skindesigner_ShouldExecute.js).
  • Add a new site page and Hugo layout that embeds the JavaScript bundle at /skindesigner/ with loading UI and dark-mode sync (files: docs/website/content/skindesigner.md and docs/website/layouts/_default/skindesigner.html).
  • Add a Developers menu entry for "Skin Designer" in docs/website/hugo.toml.
  • Extend scripts/website/build.sh to optionally build and extract the Skin Designer JavaScript bundle into docs/website/static/skindesigner-app using WEBSITE_INCLUDE_SKINDESIGNER, following the same pattern used for Playground/Initializr.

Testing

  • Ran bash -n scripts/website/build.sh which reported no syntax errors in the modified build script.
  • Attempted to build the JavaScript module with sh ./mvnw -q -pl javascript -am -DskipTests -Dcodename1.platform=javascript package in scripts/skindesigner, but the build failed in this environment due to missing Java 8 (JAVA_HOME path not present) and network/maven wrapper download errors (java.net.SocketException: Network is unreachable).
  • Changes were committed and a branch/PR message was prepared; no further automated tests were executed due to the environment limitations described above.

Codex Task

@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

Comment thread docs/website/layouts/_default/skindesigner.html Fixed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator

shai-almog commented Apr 17, 2026

Compared 7 screenshots: 7 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

liannacasper and others added 4 commits April 19, 2026 13:09
Replace the stacked ImageViewer + overlay with a single custom
Component. Eliminate per-drag full-image allocation from createMute,
add Screen/Safe/Pan mode toggles so the safe area can be moved
independently, and let zoom operate on one shared view so overlay
and skin no longer desync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a 'Use Safe Area' toggle on each image card; when off, the
safe area fields disable and the save file uses the screen values
for safe area. When on, defaults clamp safe area to stay inside the
screen and the aim form constrains safe-mode drags to the screen
rect.

Polish the aim form: style all nav buttons consistently with center
alignment, give every control a tooltip, show a ToastBar hint when
switching modes (especially Pan), give the form a title, and wire a
back command to the cancel action so ESC / system back still exits
cleanly even if the Cancel button is tapped through content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Save the calling form on entry and call previousForm.showBack() on
  Done/Cancel. Form.showBack() re-shows the form it is called on, so
  calling it on the aim form was a no-op; that is why Done and Cancel
  appeared unresponsive.
- Remove the Pan mode button and constant. Zoom in/out now auto-center
  the view on the currently active rectangle, which covers the use
  case Pan mode was supposed to address.
- Add mirrored X / Y / W / H TextFields inside the aim form for both
  screen and safe area. Edits commit to the main form fields and the
  view repaints; drags/nudges propagate back into the mirror fields.
- Add drag-to-resize on the safe area: press near an edge or corner
  to resize, press in the interior to move. Draw small handles at the
  corners and edge midpoints when Safe mode is active.
- Show a single entry ToastBar when the aim form opens that explains
  how to drag, resize, and enter numeric values.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants