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

Add Manual sync feature. #375

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

junqi-lu
Copy link

Hi, JC.

This PR fixes Issue #276 and #212

Description of the PR:
This PR enhances the Gist synchronization mechanism by implementing the following features:

  1. Manual Sync Improvements:

    • Added a warning prompt when closing tabs with unsynced changes
    • Users can choose to sync changes or discard them before closing
    • Users can manually upload files at the editor title of the opened gist
  2. File Sync Status Tracking:

    • Implemented a new unsyncedFiles tracking system in the Store
    • Files are automatically marked as unsynced when changes are made and saved without auto-sync
    • Sync status is cleared after successful synchronization
  3. Auto-sync Configuration:

    • Added configuration option autoSyncWhenSave to control sync behavior

Additional context:
This enhancement improves the user experience by:

  • Preventing accidental loss of changes when closing files
  • Reducing unnecessary API calls through configurable auto-sync behavior

…and maybe lostintangent#212)

- Introduced `gistpad.autoSyncWhenSave` configuration option.
- Implemented `syncGist` command to manually sync Gist files.
- Updated file system provider to check for auto-sync setting before firing change events.
- Implemented a warning message for unsynced files when closing tabs, prompting users to sync changes.
- Updated the `Store` interface to include a `unsyncedFiles` set for tracking unsynced Gist files.
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