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

feature/autoSave #582

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

feature/autoSave #582

wants to merge 4 commits into from

Conversation

srikary12
Copy link
Contributor

Auto Save functionality with default 15sec interval.

Link to discussion: #142.

@srikary12
Copy link
Contributor Author

ipcRenderer.invoke('renderer:set-preferences', preferences) is throwing undefined error on playwright but is working fine on manual testing, Is this something expected?

@Its-treason
Copy link
Member

Its-treason commented Oct 13, 2023

Quick idea: Would it be possible to listen to the user focusing another application and then auto saving? Maybe with https://stackoverflow.com/a/12486475? I feel like this would be more intuitive than the 15 seconds interval.

@helloanoop
Copy link
Contributor

helloanoop commented Oct 13, 2023

Looks promising!
We will have to refine this a bit, but a good start.

@srikary12 Fully onboard with supporting this, but I would take time to gather feedback and refine the implementation before we merge this. Just saying this early so that you are not frustrated on why the PR is not getting merged :)

Here are some ideas from my side.

In my past, I had built an a product (that colossally failed) which was a remix of Roam Research and Github.
Like a Github for Social Notetaking

There is this functionality where a small circle on the right side displays the state.
orange - changes in collection yet to be saved
green - all synced.

The sync happens every 15 seconds (which can be made configurable)
If a user wants to immediately sync, they can hover over the circle icon and a popover will show them the number of changed files, with a button to sync immediately.

In the image below, you can see the green dot in the right top

image

@srikary12
Copy link
Contributor Author

@Its-treason I'll try to get window listener done.

@helloanoop I'll add an option to update auto save time with saving when the window is closed. I'm thinking of adding colors and hover to the current save icon.

@helloanoop
Copy link
Contributor

@srikary12

I'll add an option to update auto save time

This part can wait for a second PR. For now you can keep timeout set to 15s. Let's try to keep the PR simple, I just want to get the core part right at the first go with a clear direction on what's needed in future PRs.

@douhaolee
Copy link

@srikary12

I'll add an option to update auto save time

This part can wait for a second PR. For now you can keep timeout set to 15s. Let's try to keep the PR simple, I just want to get the core part right at the first go with a clear direction on what's needed in future PRs.

is this configurable? thanks

@srikary12
Copy link
Contributor Author

@srikary12

I'll add an option to update auto save time

This part can wait for a second PR. For now you can keep timeout set to 15s. Let's try to keep the PR simple, I just want to get the core part right at the first go with a clear direction on what's needed in future PRs.

is this configurable? thanks

Not in this PR. But would make it configurable in the next iteration.

@helloanoop helloanoop added this to the v2 milestone Oct 18, 2023
@helloanoop
Copy link
Contributor

@srikary12 There is a 1.0.0 release being planned on Oct 28th. Until then stability of the platform is important.
Only bug fixes and minor features will be merged till then.
We will be reviewing this PR after Oct 28th.

@jenswegar
Copy link

Another suggestion on solving auto-save could be to listen for changes in the documents and then some X seconds after the last change do the save? That way you don't have to run a timer that saves "just in case" every 15 seconds. Though of course it in turn would require a timer that delays the saving (if the delay is necessary).

@whalemare
Copy link

Can we merge it? Great feature

@NoahKr
Copy link

NoahKr commented Apr 30, 2024

Any chance of this being merged? Would really love to have this feature included.

@uilton-oliveira
Copy link

uilton-oliveira commented May 26, 2024

it would be nice to be optional, i would not like to revert it on git every time i change some parameters to make a request, or make a accidental commit..

@kylehz
Copy link

kylehz commented Aug 6, 2024

need auto save!

@helloanoop helloanoop self-assigned this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants