EditorHeader "Export PES" and "Settings" buttons have no onClick handlers #71

Closed
opened 2026-09-14 03:17:02 +00:00 by Mark · 0 comments
Owner

Where: src/components/editor/EditorHeader.tsx:92-108 (Export PES), :148-162 (Settings icon).

Bug: Both buttons render with no onClick prop. Clicks do nothing.

Fix consistent with existing patterns:

  1. Export PES: extend EditorHeaderProps with onExport?: () => void. In Editor.tsx, build a minimal WorkspaceState-shaped object from the current paths (reuse src/lib/stitch-adapters.ts if it fits, otherwise convert StitchPath[] → StitchObject[] inline) and open the existing ExportDialog from src/components/workspace/ExportDialog.tsx. The pattern lives at useWorkspace.ts:173-175 (handleExport) and Workspace.tsx:272-280 (the overlay mount).

  2. Settings icon: there is no /settings route (App.tsx:12-18 confirms). Either:

    • add disabled + cursor: not-allowed styling consistent with the disabled Undo/Redo buttons at :112-113, 131-132, or
    • drop the button from the header until a Settings page is planned.

Recommended: disable-and-tooltip (title="Settings — coming soon") until #67 (Group) and friends are tracked, then bundle them under a real Settings page.

**Where:** `src/components/editor/EditorHeader.tsx:92-108` (Export PES), `:148-162` (Settings icon). **Bug:** Both buttons render with no `onClick` prop. Clicks do nothing. **Fix consistent with existing patterns:** 1. **Export PES**: extend `EditorHeaderProps` with `onExport?: () => void`. In `Editor.tsx`, build a minimal `WorkspaceState`-shaped object from the current `paths` (reuse `src/lib/stitch-adapters.ts` if it fits, otherwise convert `StitchPath[]` → `StitchObject[]` inline) and open the existing `ExportDialog` from `src/components/workspace/ExportDialog.tsx`. The pattern lives at `useWorkspace.ts:173-175` (`handleExport`) and `Workspace.tsx:272-280` (the overlay mount). 2. **Settings icon**: there is no `/settings` route (`App.tsx:12-18` confirms). Either: - add `disabled` + `cursor: not-allowed` styling consistent with the disabled Undo/Redo buttons at `:112-113, 131-132`, or - drop the button from the header until a Settings page is planned. Recommended: disable-and-tooltip (`title="Settings — coming soon"`) until #67 (Group) and friends are tracked, then bundle them under a real Settings page.
Mark 2026-09-14 03:17:02 +00:00
Sign in to join this conversation.
No description provided.