Skip to content

Fix ResizeHandles props in CanvasDesigner#78

Merged
huangyiirene merged 9 commits intocopilot/redesign-object-form-designer-againfrom
copilot/fix-action-run-issue
Jan 15, 2026
Merged

Fix ResizeHandles props in CanvasDesigner#78
huangyiirene merged 9 commits intocopilot/redesign-object-form-designer-againfrom
copilot/fix-action-run-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 15, 2026

TypeScript compilation failed in CanvasDesigner.tsx because ResizeHandles was called with incorrect props: passing non-existent nodeId prop, missing required directions array, and wrong onResizeStart callback signature.

Changes

  • Import ResizeDirection type from ResizeHandle
  • Compute directions array based on component resize constraints (width/height)
  • Pass directions prop instead of nodeId to ResizeHandles
  • Update onResizeStart callback to accept both direction and e parameters
// Before
<ResizeHandles
  nodeId={node.id || ''}
  onResizeStart={(direction) => { /* ... */ }}
/>

// After
const constraints = config?.resizeConstraints || {};
const directions: ResizeDirection[] = [];
if (constraints.width !== false) directions.push('e', 'w');
if (constraints.height !== false) directions.push('n', 's');
if (constraints.width !== false && constraints.height !== false) {
  directions.push('ne', 'nw', 'se', 'sw');
}

<ResizeHandles
  directions={directions}
  onResizeStart={(direction, e) => { /* ... */ }}
/>

This aligns CanvasDesigner with the pattern already used in Canvas.tsx.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21025710311/job/60449932067#step:6:1 fix


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action run issue in GitHub workflow Fix ResizeHandles props in CanvasDesigner Jan 15, 2026
Copilot AI requested a review from huangyiirene January 15, 2026 09:23
Copilot AI and others added 7 commits January 15, 2026 09:26
- Remove unnecessary React import from App.tsx (jsx: react-jsx handles JSX automatically)
- Update main.tsx to use named imports instead of namespace import
- Add vite/client types to tsconfig for CSS import support

Fixes TS6133 and TS2307 errors that were causing CI build failures

Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

@huangyiirene huangyiirene marked this pull request as ready for review January 15, 2026 10:28
@huangyiirene huangyiirene merged commit 8cdcda8 into copilot/redesign-object-form-designer-again Jan 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants