On 1/5/22 5:15 AM, Petko Yotov wrote:
On 04/01/2022 21:38, Simon wrote:
I couldn't agree more.
As there is no easy undo if you close without saving, and the consequences
are severe - the loss of potentially a lot of work.

Also I think modern expectation (cf online editing such as google docs) is
that you can't/shouldn't be able to accidentally lose input.

Agreed.

I was worried what if I write and write, then preview, and decide not to save my edits. But as PmWiki stores all page history, in case of a mistake I can restore an older version.


There is a recipe AutoSave:

   https://www.pmwiki.org/wiki/Cookbook/AutoSave

However, it is somewhat complex, I don't use it, and I am not comfortable with adding the full recipe to the core.

For example, it requires for Drafts to be enabled. Also, if someone else is editing the same page, it may fail to resolve the differences.


We also have SessionPageStore:

   https://www.pmwiki.org/wiki/Cookbook/SessionPageStore

Something like this could be adapted to only temporarily store unsaved texts. It is specific to the user, another user would have a separate storage.


But the future is probably the modern browsers' LocalStorage interface, where we could store the page text until it is submitted and saved. Which would also allow offline editing (but not previewing and saving while offline).

Petko


On Wed, 5 Jan 2022 at 00:23, Petko Yotov <5...@5ko.fr> wrote:

Currently by default PmWiki doesn't warn when people edit a page, and
try to move away from the edit form without saving.

We have $EnableNotSavedWarning but it needs to be enabled in config.php
by the administrator.

I added it to sample-config.php, but I wonder if instead we should
simply enable it by default.

I believe the setting dramatically improves the user experience and
saves a lot of frustration, especially with inexperienced editors and
administrators (who have yet to read the documentation and enable the
setting).

The setting, enabled, might possibly interfere with some custom edit
forms, although I am not aware of such a case, or with some of the
existing recipes that do exactly this.

If we enable it by default, anyone who doesn't need this feature can
disable it with

   $EnableNotSavedWarning = 0;

Even if there might be existing administrators who may be annoyed to add
this line when they upgrade, I feel the benefit from having the feature
enabled outweighs the downside.

Thoughts?

Petko

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

To prevent accidental loss I use a text editor and then copy and paste, Preview, edit, proofread again, and Publish. Seems the only sane way to not lose work, be productive, and keep away from browser quirks with Text Boxes. As a touch typist though, I make bad mistakes at times and the warning has saved me a few times.

Attachment: OpenPGP_0x24260CF19C8D55BA.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to