feature/autoSave
Auto Save functionality with default 15sec interval.
Link to discussion: https://github.com/usebruno/bruno/issues/142.
ipcRenderer.invoke('renderer:set-preferences', preferences) is throwing undefined error on playwright but is working fine on manual testing, Is this something expected?
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.
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
@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.
@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.
@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
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.
@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.
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).
Can we merge it? Great feature
Any chance of this being merged? Would really love to have this feature included.
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..
need auto save!
I can fix it, I see that it's not merged yet.