Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement multi-file code editor - WF-100 #724

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

madeindjs
Copy link
Collaborator

@madeindjs madeindjs commented Jan 8, 2025

Implement the feature to allow the user to create, update and delete any source file of the application.

The logic flow is:

  1. Python backend returns the sourceFiles in the Init request. It's an object representing the tree structure like
    {"type": "directory", "children": {"README.md": {"type": "file", "content": "This app w", "complete": false}}}
  2. the frontend stores this and creates a copy of this as sourceFilesDraft
  3. different action in the editor will trigger new sockets events I implemented: createSourceFile, deleteSourceFile or renameSourceFile

The main challenge was the synchronization between sourceFiles and sourceFilesDraft. This main logic stands in the composable useSourceFilesDraft.

Quick demo

Screen.Recording.2025-01-14.at.15.30.27.mov

@madeindjs madeindjs self-assigned this Jan 8, 2025
@madeindjs madeindjs force-pushed the WF-100 branch 4 times, most recently from e615feb to 628a16e Compare January 14, 2025 10:35
@madeindjs madeindjs marked this pull request as ready for review January 14, 2025 15:17
@madeindjs madeindjs marked this pull request as draft January 15, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant