-
Notifications
You must be signed in to change notification settings - Fork 167
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
Integration of folders mode with Google Drive/GitHub #2902
Draft
sumomomomomo
wants to merge
79
commits into
replace-gapi
Choose a base branch
from
folders-public-wip
base: replace-gapi
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update dependency query-string to v8 * Fix breaking changes Done because the previous version of the dependency was imported as a namespace instead of default import. * Bump target to ES2020 * Fix test errors due to ESM dependencies not being ignored --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sayomaki <[email protected]>
… in fileSystemView related files
…nd into folders-public-wip
…opriate save/save as
…nd into folders-public-wip
…entries of deleted folder as well
… syncing work when either gdrive or github is syncing
…nd into folders-public-wip
…ve As to use BrowserFS instead of editor tab value for GDrive
…e file mode GDrive
… sync GDrive to return when Github is active
sumomomomomo
force-pushed
the
folders-public-wip
branch
from
April 15, 2024 09:15
31dd5ec
to
22642e1
Compare
sumomomomomo
force-pushed
the
folders-public-wip
branch
from
April 15, 2024 10:12
351c431
to
7b375e7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolves #2404
Resolves #2405
Blocked by #2762
No playground PersistenceFile
Save
Button is disabled.
Save As
Google Drive picker is opened, user chooses to create new file, or overwrite existing file.
Github is the same.
Both:
Playground PersistenceFile is not set.
Save All
Both:
Checks if only a single top level folder is present. If it is not present or there are multiple files/folders in the root directory, will open an error dialog.
Google Drive:
Google Drive picker is opened, user chooses a location to save the top level folder. If folder of the same name exists in the chosen location, confirmation dialog appears, warning user that for files with filenames overlapping locally and remotely, their remote contents will be updated. New files will be created remotely if they are not found. No files will be removed remotely.
Github:
Github picker is opened, user chooses a location to save the top level folder. There will be no warning and any files with the same path will be overwritten.
Both:
Playground PersistenceFile set with isFolder: true, and name of top level folder. persistenceFileArray populated with all files/folders.
Create/Delete/Rename
As persistenceFileArray is empty, these functions will not call any Google Drive API or Github functions
Playground PersistenceFile is of a File, not Folder
Save
Saves file, updates lastSaved of playground PersistenceFile.
Save As
Google Drive picker is opened, user chooses to create new file, or overwrite existing file.
Github is the same.
Playground PersistenceFile is not set.
Save All
(Identical behaviour to Save All with no playground PersistenceFile)
Create/Delete/Rename
As persistenceFileArray is empty, these functions will not call any Google Drive API or Github functions.
Playground PersistenceFile is of a Folder
Save
Saves file, updates lastSaved of PersistenceFileArray entry of saved file.
If because of this save, for all files, if lastSaved is more recent than lastEdit, then lastSaved of playground PersistenceFile will also update.
Save As
Picker for Google Drive or Github is opened, user chooses to create new file, or overwrite existing file.
If user picks a location tracked under top level folder, persistenceFileArray entry of target file will be updated.
If because of this overwriting save as operation, for all files in persistenceFileArray, if lastSaved is more recent than lastEdit, then lastSaved of playground PersistenceFile will also update.
Save All
For each file entry in persistenceFileArray, calls Google Drive API or Github function to update their content, and their lastSaved will be updated.
Playground PersistenceFile lastSaved is updated.
Create/Delete/Rename
Each function will get the target file/folder's entry in persistenceFileArray, and call respective Google Drive API functions or Github functions to create/delete/rename.
For create/delete/rename, persistenceFileArray will be updated accordingly to add/remove/rename entries.
If folders are renamed, all child files/folder entries in persistenceFileArray are also renamed accordingly.
If folders are deleted, all child files/folder entries in persistenceFileArray are also deleted.
If top level folder is renamed, playground PersistenceFile name entry will be updated.
If top level folder is deleted, playground PersistenceFile will update to undefined.
Currently implemented features
UI
TODO:
Type of change
How to test
No specific instructions to test apart from what is outlined in the wiki for obtaining Google/Github API keys and inserting them into .env.
Checklist