onlook
onlook copied to clipboard
feat: Add create file and folder functionality to dev/code tab and file menu
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
FileModalandFolderModalcomponents for creating files and folders infile-modal.tsxandfolder-modal.tsx.- Implement file templates in
file-templates.tsfor various file types like.tsx,.ts,.js,.css, etc.- Add file and folder creation actions to context menu in
file-tree-node.tsxand dropdown menu inindex.tsx.- File Operations:
- Add
createFileInSandboxandcreateFolderInSandboxfunctions infile-operations.tsto handle file and folder creation in the sandbox.- Implement
validateFileNameandvalidateFolderNamefor name validation infile-operations.ts.- UI Enhancements:
- Update
FileTreeNodeandFileTreecomponents to support new file and folder creation features.- Modify
DevTabto include new file and folder creation options in the dropdown menu.- Sandbox Management:
- Add
updateFileCachemethod insandbox/index.tsto update file cache after creation.This description was created by
for cc7b60b100b160d5f7ed757970266e57b7248ebc. You can customize this summary. It will automatically update as commits are pushed.
@iNerdStack is attempting to deploy a commit to the Onlook Team on Vercel.
A member of the Team first needs to authorize it.