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: add save/revert functionality and improve file modification tracking #114

Closed
wants to merge 1 commit into from

Conversation

vgcman16
Copy link

Add save/revert functionality and improve file modification tracking
Changes
Added save/revert functionality:

Save button to persist file changes
Revert button to restore original content
Buttons only appear for modified files
Fixed file modification tracking:

Files no longer show orange indicator during initial creation
Orange indicator only appears after first modification of existing file
Improved sync between stores for consistent modification state
Technical Details
Modified files.ts to properly track new vs existing files
Updated workbench.ts to check file state before marking as modified
Updated editor.ts to handle save/revert operations
Simplified action-runner.ts to delegate modification tracking to files.ts
Added version history tracking for better file state management
Testing
Create new file: No orange indicator
Modify existing file: Shows orange indicator
Save changes: Persists modifications
Revert changes: Restores original content

@vgcman16 vgcman16 changed the title Add save/revert functionality and fix file modification tracking feat: Add save/revert functionality and improve file modification tracking Oct 29, 2024
@vgcman16 vgcman16 changed the title feat: Add save/revert functionality and improve file modification tracking feat: add save/revert functionality and improve file modification tracking Oct 29, 2024
@hillct
Copy link

hillct commented Nov 1, 2024

This is really great work. I wonder though if nanostores is a bit too low level and versioning this way might represent a maintainability challenge on a going forward basis, relative to something like https://github.com/isomorphic-git/isomorphic-git

I'm throwing this into the mix not because I have time to implement this and see if it is in some way better/worse a solution, but just to get @vgcman16's thoughts on why one approach is superior to the other.

Areas of consideration:

  • Dependency project upkeep and documentation (nanostores vs isomorphic-git)
  • Convenience of future remote integrations (push a git repo, for example)
  • Robustness & maintainability of local versioning functionality
  • Duplication of effort

To be clear, these are meant to potentially be arguably construed in support of either approach.

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.

2 participants