Text: Notify users about unsaved changes

Created on 17 Jun 2019  路  3Comments  路  Source: nextcloud/text

Our current approach may lead to changes that have been persisted to the database but not to the actual file, as the saving is handled by the frontend code. Ideally we would apply the transactions in the backend and render the markdown there, but this is not something we can achieve in the near future, as it requires us to rewrite a big chunk of prosemirror logic in PHP.

My idea now was to notify users that they have not saved their document changes to the file after some delay. So when

  • all users have left the document
  • there are unsaved changes
  • 10 minutes idle
    We send a notification to the file owner that allows to trigger a save in the frontend.

What do you think about that @jancborchardt ?

enhancement

Most helpful comment

Can鈥檛 we do some workaround that appears more seamless, like triggering a save whenever someone leaves (e.g. also when the last person leaves)?

All 3 comments

Can鈥檛 we do some workaround that appears more seamless, like triggering a save whenever someone leaves (e.g. also when the last person leaves)?

I don't really understand - the changes you make while editing aren't saved every, I dunno, 5 seconds or so?

Anyhow, I wanted to create an issue to warn ppl that the underlying file has changed at some point - now that happens but only at a very late point. It would be nice to do this more regularly... This seems a relevant issue already for that?

I don't really understand - the changes you make while editing aren't saved every, I dunno, 5 seconds or so?

This was mostly because i started with a careful value of 60s, since estimating how this performs on real life setup is not that easy. Since some bugs were fixed that occured due to saving this was a good idea in the beginning, but we can lower the value now.

So here are some more thins we should do to improve the auto save behavior:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skjnldsv picture skjnldsv  路  3Comments

gcala picture gcala  路  5Comments

doobry-systemli picture doobry-systemli  路  3Comments

palantus picture palantus  路  4Comments

themedleb picture themedleb  路  6Comments