onlook icon indicating copy to clipboard operation
onlook copied to clipboard

feat: Add create file and folder functionality to dev/code tab and file menu

Open iNerdStack opened this issue 7 months ago • 1 comments

Description

This PR introduces

  • Create File and folder action
  • Implemented file template on creation
  • Reorganise dev/code tab menu
  • Added create file and folder modal

Related Issues

Type of Change

  • [ ] Bug fix
  • [x] New feature
  • [ ] Documentation update
  • [ ] Release
  • [ ] Refactor
  • [ ] Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


[!IMPORTANT] Add file and folder creation feature with templates and validation in the dev/code tab and file menu.

  • Features:
    • Add FileModal and FolderModal components for creating files and folders in file-modal.tsx and folder-modal.tsx.
    • Implement file templates in file-templates.ts for various file types like .tsx, .ts, .js, .css, etc.
    • Add file and folder creation actions to context menu in file-tree-node.tsx and dropdown menu in index.tsx.
  • File Operations:
    • Add createFileInSandbox and createFolderInSandbox functions in file-operations.ts to handle file and folder creation in the sandbox.
    • Implement validateFileName and validateFolderName for name validation in file-operations.ts.
  • UI Enhancements:
    • Update FileTreeNode and FileTree components to support new file and folder creation features.
    • Modify DevTab to include new file and folder creation options in the dropdown menu.
  • Sandbox Management:
    • Add updateFileCache method in sandbox/index.ts to update file cache after creation.

This description was created by Ellipsis for cc7b60b100b160d5f7ed757970266e57b7248ebc. You can customize this summary. It will automatically update as commits are pushed.

iNerdStack avatar Jun 07 '25 16:06 iNerdStack

@iNerdStack is attempting to deploy a commit to the Onlook Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 07 '25 16:06 vercel[bot]