Skip to content

Fix ResizeHandles props in CanvasDesigner - #78

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

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

Conversation

CopilotAI commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

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<ResizeHandlesnodeId={node.id||''}onResizeStart={(direction)=>{/* ... */}}/>// Afterconstconstraints=config?.resizeConstraints||{};constdirections: 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');}<ResizeHandlesdirections={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>
CopilotAI changed the title [WIP] Fix action run issue in GitHub workflowFix ResizeHandles props in CanvasDesignerJan 15, 2026
CopilotAIand 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-againJan 15, 2026
2 checks passed
Sign up for freeto 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

@huangyiirene@hotlong