bruno icon indicating copy to clipboard operation
bruno copied to clipboard

feature/autoSave

Open srikary12 opened this issue 2 years ago • 13 comments

Auto Save functionality with default 15sec interval.

Link to discussion: https://github.com/usebruno/bruno/issues/142.

srikary12 avatar Oct 13 '23 19:10 srikary12

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

srikary12 avatar Oct 13 '23 19:10 srikary12

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.

Its-treason avatar Oct 13 '23 20:10 Its-treason

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

helloanoop avatar Oct 13 '23 23:10 helloanoop

@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 avatar Oct 14 '23 05:10 srikary12

@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.

helloanoop avatar Oct 14 '23 06:10 helloanoop

@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

douhaolee avatar Oct 17 '23 07:10 douhaolee

@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 avatar Oct 17 '23 07:10 srikary12

@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.

helloanoop avatar Oct 18 '23 17:10 helloanoop

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).

jenswegar avatar Oct 19 '23 06:10 jenswegar

Can we merge it? Great feature

whalemare avatar Mar 31 '24 11:03 whalemare

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

NoahKr avatar Apr 30 '24 11:04 NoahKr

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..

uilton-oliveira avatar May 26 '24 19:05 uilton-oliveira

need auto save!

kylehz avatar Aug 06 '24 09:08 kylehz

I can fix it, I see that it's not merged yet.

srikary12 avatar Nov 01 '24 02:11 srikary12