Editor's Path Properties has 'Stitch type' but the 'cross-stitch' type has no per-stitch size input (cross-stitch X-size) — user wanting to control the cross-stitch size has no UI #390

Closed
opened 2026-10-04 04:02:01 +00:00 by Mark · 2 comments
Owner

Finding"

grep -rn 'crossStitchSize\|crossStitchParams' src/components/editor/ returns 0. The editor has no cross-stitch parameters.

Cross-stitch has:

  • X-size (the size of each X)
  • Y-spacing (the spacing between X's)
  • The thread color (per X or per row)

A user with a cross-stitch path:

  • Wants the X's to be larger or smaller
  • No UI to set this

The fix is cross-stitch parameters.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No cross-stitch params: grep -rn 'crossStitchSize' src/components/editor/ returns 0

Suggested fix shape

  1. Type: add crossStitchSize: number and crossStitchSpacing: number to the StitchPath type (when stitchType is 'cross-stitch').

  2. UI: when stitch type is 'cross-stitch', show:

{p.stitchType === 'cross-stitch' && (
  <>
    <NumberField
      label="Cross size"
      value={p.crossStitchSize ?? 3.0}
      onChange={(v) => onUpdateCrossStitchSize(p.id, v)}
      min={1}
      max={10}
      step={0.1}
      unit="mm"
    />
    <NumberField
      label="Cross spacing"
      value={p.crossStitchSpacing ?? 1.0}
      onChange={(v) => onUpdateCrossStitchSpacing(p.id, v)}
      min={0.5}
      max={5}
      step={0.1}
      unit="mm"
    />
  </>
)}
  1. Visual: the canvas shows the cross-stitch pattern at the specified size.

  2. Use cases:

  • Cross-stitch designs (e.g., samplers)
  • Quilt patterns
  1. History: single undoable action per parameter.

Severity**

Medium. Cross-stitch size is critical for cross-stitch designs. Power users notice.

Discovered by

Gap analysis (2026-10-02) of editor path properties.

  • #314 (open) — Satin width. Same per-stitch-type parameters.
  • #373 (open) — Fill angle/spacing. Same family.
  • #319 (open) — Underlay. Same family.
  • Wilcom/Hatch have cross-stitch parameters. The editor's gap is the parallel.
## Finding" `grep -rn 'crossStitchSize\|crossStitchParams' src/components/editor/` returns 0. The editor has no cross-stitch parameters. Cross-stitch has: - X-size (the size of each X) - Y-spacing (the spacing between X's) - The thread color (per X or per row) A user with a cross-stitch path: - Wants the X's to be larger or smaller - No UI to set this The fix is cross-stitch parameters. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No cross-stitch params: `grep -rn 'crossStitchSize' src/components/editor/` returns 0 ## Suggested fix shape 1. **Type**: add `crossStitchSize: number` and `crossStitchSpacing: number` to the StitchPath type (when stitchType is 'cross-stitch'). 2. **UI**: when stitch type is 'cross-stitch', show: ```tsx {p.stitchType === 'cross-stitch' && ( <> <NumberField label="Cross size" value={p.crossStitchSize ?? 3.0} onChange={(v) => onUpdateCrossStitchSize(p.id, v)} min={1} max={10} step={0.1} unit="mm" /> <NumberField label="Cross spacing" value={p.crossStitchSpacing ?? 1.0} onChange={(v) => onUpdateCrossStitchSpacing(p.id, v)} min={0.5} max={5} step={0.1} unit="mm" /> </> )} ``` 3. **Visual**: the canvas shows the cross-stitch pattern at the specified size. 4. **Use cases**: - Cross-stitch designs (e.g., samplers) - Quilt patterns 5. **History**: single undoable action per parameter. ## Severity** Medium. Cross-stitch size is critical for cross-stitch designs. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related** - #314 (open) — Satin width. Same per-stitch-type parameters. - #373 (open) — Fill angle/spacing. Same family. - #319 (open) — Underlay. Same family. - Wilcom/Hatch have cross-stitch parameters. The editor's gap is the parallel.
Author
Owner

Closing as part of the per-stitch-type parameter family covered by #314 (satin width). Cross-stitch size, zigzag amplitude (#391), running stitch length (#392), fill angle (#373), stitch direction (#374), density profile (#388), underlay (#319), pull comp (#318) are all the same underlying gap: the editor exposes only a generic density slider, not the embroidery-specific parameters. The umbrella fix is to expose per-stitch-type parameters in the Path Properties section.

Closing as part of the per-stitch-type parameter family covered by #314 (satin width). Cross-stitch size, zigzag amplitude (#391), running stitch length (#392), fill angle (#373), stitch direction (#374), density profile (#388), underlay (#319), pull comp (#318) are all the same underlying gap: the editor exposes only a generic density slider, not the embroidery-specific parameters. The umbrella fix is to expose per-stitch-type parameters in the Path Properties section.
Mark closed this issue 2026-10-04 04:13:14 +00:00
Mark 2026-10-05 19:07:24 +00:00
Author
Owner

Cross-stitch size + spacing parameters landed in commit 785f0de.

The Path Properties block now surfaces two <input type="number"> rows when a cross-stitch path is selected:

  • Cross size (mm, 1..10, step 0.1, default 3.0) — the size of each X
  • Cross spacing (mm, 0.5..5, step 0.1, default 1.0) — the perpendicular distance between adjacent X's

Both fields follow the same per-stitch-type parameter pattern as #314 (satinWidth) and #373 (fillAngle/fillSpacing):

  • Two new optional StitchPath fields (crossStitchSize?: number, crossStitchSpacing?: number) so designs persisted before #390 keep loading with the 3.0 mm / 1.0 mm defaults.
  • Four new optional EditorRightPanel props; rows render only when the handler is wired.
  • Mixed-select renders a disabled "Mixed (primary N.NN mm)" label so a multi-path selection that disagrees falls back to a no-op.
  • Apply-to-all button stamps every path; disabled when paths.length < 2.
  • Single-commit semantics: one setPaths + one history push per user edit (matching #318).
  • 12-case test suite at src/components/editor/issue-390.test.tsx pinning the panel-side contract.

The commit also drops the underscore-prefixed destructure of previewStitchType / onPreviewStitchType and the cross-stitch props introduced by the recent #386 underscore fix — that fix passed ESLint but broke tsc -b because the type definitions don't have an underscore prefix. The truly-unused props are simply removed from the destructure; the cross-stitch props are read by the panel body so they remain in the destructure without the prefix.

Engine export (pathsToStitchObjects / WorkspaceStitchObject / drawCrossStitches) is intentionally untouched — the new fields persist in the design JSON but have no effect on PES/DST export until a follow-up issue lands. This is the editor-side UI gap only.

Verified locally before push: npx tsc -b exits 0, npx eslint exits 0 (1 pre-existing warning), npx vitest run is 364/364 across 7 test files including the new issue-390.test.tsx.

Cross-stitch size + spacing parameters landed in commit 785f0de. The Path Properties block now surfaces two `<input type="number">` rows when a cross-stitch path is selected: - **Cross size** (mm, 1..10, step 0.1, default 3.0) — the size of each X - **Cross spacing** (mm, 0.5..5, step 0.1, default 1.0) — the perpendicular distance between adjacent X's Both fields follow the same per-stitch-type parameter pattern as #314 (satinWidth) and #373 (fillAngle/fillSpacing): - Two new optional `StitchPath` fields (`crossStitchSize?: number`, `crossStitchSpacing?: number`) so designs persisted before #390 keep loading with the 3.0 mm / 1.0 mm defaults. - Four new optional `EditorRightPanel` props; rows render only when the handler is wired. - Mixed-select renders a disabled "Mixed (primary N.NN mm)" label so a multi-path selection that disagrees falls back to a no-op. - Apply-to-all button stamps every path; disabled when `paths.length < 2`. - Single-commit semantics: one setPaths + one history push per user edit (matching #318). - 12-case test suite at `src/components/editor/issue-390.test.tsx` pinning the panel-side contract. The commit also drops the underscore-prefixed destructure of `previewStitchType` / `onPreviewStitchType` and the cross-stitch props introduced by the recent `#386` underscore fix — that fix passed ESLint but broke `tsc -b` because the type definitions don't have an underscore prefix. The truly-unused props are simply removed from the destructure; the cross-stitch props are read by the panel body so they remain in the destructure without the prefix. Engine export (`pathsToStitchObjects` / `WorkspaceStitchObject` / `drawCrossStitches`) is intentionally untouched — the new fields persist in the design JSON but have no effect on PES/DST export until a follow-up issue lands. This is the editor-side UI gap only. Verified locally before push: `npx tsc -b` exits 0, `npx eslint` exits 0 (1 pre-existing warning), `npx vitest run` is 364/364 across 7 test files including the new `issue-390.test.tsx`.
Mark 2026-10-05 20:45:18 +00:00
Sign in to join this conversation.
No description provided.