Editor's Path Properties has a 'Stitch type' dropdown but no 'Reset to default' per the type — user with a satin path wanting to revert to the default satin settings has to know which fields to reset #367

Closed
opened 2026-10-04 03:58:20 +00:00 by Mark · 1 comment
Owner

Finding

The Path Defaults (per #198) set the default stitch type, density, etc. The Path Properties section's fields can be reset to these defaults.

grep -rn 'resetToDefaults\|resetToPathDefault' src/components/editor/ returns 0. No reset.

A user with a satin path:

  • Has density 0.6 (changed from default 0.4)
  • Wants to reset to the default
  • Has to know "default is 0.4" and change manually

The fix is a "Reset to default" button.

This is similar to #299 (reset to initial state) but specific to the path defaults (per #198).

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • Path Defaults: src/components/workspace/pathDefaults.ts:DEFAULT_PATH_DEFAULTS (per #198)
  • No reset: grep -rn 'resetToDefaults' src/components/editor/ returns 0

Suggested fix shape

  1. UI: a "Reset to defaults" button in the Path Properties section:
<button onClick={onResetToDefaults} data-testid="reset-to-defaults" title="Reset stitch type, density, and color to the design's defaults">
  <RotateCcw size={12} /> Reset to defaults
</button>
  1. Behavior: copy the design's Path Defaults (per #198) to the path's current fields.

  2. Use cases:

  • The user changed multiple settings and wants to start over
  • The user is comparing with the default
  1. History: single undoable action.

Severity**

Low. The user can manually reset. Power users notice.

Discovered by

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

  • #198 (open) — Path Defaults. The defaults are the source.
  • #299 (open) — Reset to initial state. The path's creation state; this is the design defaults.
  • Figma/Illustrator have "Reset to defaults" on components. Standard.
## Finding The Path Defaults (per #198) set the default stitch type, density, etc. The Path Properties section's fields can be reset to these defaults. `grep -rn 'resetToDefaults\|resetToPathDefault' src/components/editor/` returns 0. No reset. A user with a satin path: - Has density 0.6 (changed from default 0.4) - Wants to reset to the default - Has to know "default is 0.4" and change manually The fix is a "Reset to default" button. This is similar to #299 (reset to initial state) but specific to the path defaults (per #198). ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - Path Defaults: `src/components/workspace/pathDefaults.ts:DEFAULT_PATH_DEFAULTS` (per #198) - No reset: `grep -rn 'resetToDefaults' src/components/editor/` returns 0 ## Suggested fix shape 1. **UI**: a "Reset to defaults" button in the Path Properties section: ```tsx <button onClick={onResetToDefaults} data-testid="reset-to-defaults" title="Reset stitch type, density, and color to the design's defaults"> <RotateCcw size={12} /> Reset to defaults </button> ``` 2. **Behavior**: copy the design's Path Defaults (per #198) to the path's current fields. 3. **Use cases**: - The user changed multiple settings and wants to start over - The user is comparing with the default 4. **History**: single undoable action. ## Severity** Low. The user can manually reset. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related - #198 (open) — Path Defaults. The defaults are the source. - #299 (open) — Reset to initial state. The path's creation state; this is the design defaults. - Figma/Illustrator have "Reset to defaults" on components. Standard.
Author
Owner

feat(#367): Reset to design defaults — committed in 59f58be on origin/main.

  • Editor.tsx: handleResetSelectedPathToDefaults fans across selectedPathIds, one setPaths + one pushHistory, no-op when every path already matches.
  • EditorRightPanel.tsx: optional onResetSelectedPathToDefaults prop renders a Sparkles-icon "Reset to defaults" button next to the existing Reset-to-initial button in the Path Properties header. ThreadColor is intentionally NOT touched (different intent; lives on the dedicated Reset-to-initial button).
  • 7 new tests in issue-367.test.tsx pin: render-when-wired+selected, render-for-legacy-paths-without-initialState, hide-when-prop-not-wired, hide-when-no-path-selected, click calls handler with no args, title attribute surfaces defaults, both buttons coexist.
  • typecheck clean. existing issue-249 / issue-299 / EditorRightPanel tests still pass (227). The four #329/#331/#333/#334 Snap-Settings failures are pre-existing on main and unrelated.
feat(#367): Reset to design defaults — committed in 59f58be on origin/main. - Editor.tsx: handleResetSelectedPathToDefaults fans across selectedPathIds, one setPaths + one pushHistory, no-op when every path already matches. - EditorRightPanel.tsx: optional onResetSelectedPathToDefaults prop renders a Sparkles-icon "Reset to defaults" button next to the existing Reset-to-initial button in the Path Properties header. ThreadColor is intentionally NOT touched (different intent; lives on the dedicated Reset-to-initial button). - 7 new tests in issue-367.test.tsx pin: render-when-wired+selected, render-for-legacy-paths-without-initialState, hide-when-prop-not-wired, hide-when-no-path-selected, click calls handler with no args, title attribute surfaces defaults, both buttons coexist. - typecheck clean. existing issue-249 / issue-299 / EditorRightPanel tests still pass (227). The four #329/#331/#333/#334 Snap-Settings failures are pre-existing on main and unrelated.
Mark closed this issue 2026-10-05 14:46:40 +00:00
Sign in to join this conversation.
No description provided.