[TW5] Document dirty even without committing any changes [Resolved]

78 views
Skip to first unread message

Hegart Dmishiv

unread,
Sep 28, 2015, 9:40:36 AM9/28/15
to tiddl...@googlegroups.com
I've noticed that the "save changes" icon in the sidebar changes colour, to indicate that changes have been made to my TW wiki, even when I haven't committed any changes. If I open a tiddler in edit mode just to see the underlying code, then click the "discard changes to this tiddler" button, the "save changes" button remains lit, indicating that the document is dirty (something has changed) and the committed changes therefore need to be saved. Even though nothing actually was changed. I think this might be a bug. Is this the normal behaviour for TiddlyWiki?

I have been able to reproduce this effect on both my local (live) offline instance, and my online (dev) instance hosted on GitHub.

Evolena

unread,
Sep 28, 2015, 10:37:24 AM9/28/15
to tiddl...@googlegroups.com
As soon as you open the edit mode of a tiddler, the tiddler "Draft of tiddler" is added in the StoryList. Even if you discard your change, the StoryList tiddler has been changed, and thus your TW "needs" saving.

It is particularly visible when you use the node.js configuration: the $:/StoryList tiddler is continuously modified.

Hegart Dmishiv

unread,
Sep 28, 2015, 10:48:27 AM9/28/15
to TiddlyWiki
Thanks for explaining that, Evolena. I would have thought that clicking the "discard changes to this tiddler" button would have deleted the "Draft of..." tiddler, thus returning the TW wiki instance to the state it was in prior to entering edit mode, with no changes having been made at all. Are you saying that I'll have a whole heap of random "Draft of..." tiddlers somewhere in my wiki then? Because it still seems to think the document is dirty, even after clicking the "discard changes to this tiddler" button.


On Tuesday, 29 September 2015 03:37:24 UTC+13, Evolena wrote:
As soon as you open the edit mode of a tiddler, the tiddler "Draft of tiddler" is added in the StoryList. Evenif you discard your change, the StoryList tiddler has been changed, and thus your TW "needs" saving.

Evolena

unread,
Sep 28, 2015, 10:53:13 AM9/28/15
to TiddlyWiki


Le lundi 28 septembre 2015 16:48:27 UTC+2, Hegart Dmishiv a écrit :
Thanks for explaining that, Evolena. I would have thought that clicking the "discard changes to this tiddler" button would have deleted the "Draft of..." tiddler, thus returning the TW wiki instance to the state it was in prior to entering edit mode, with no changes having been made at all. Are you saying that I'll have a whole heap of random "Draft of..." tiddlers somewhere in my wiki then? Because it still seems to think the document is dirty, even after clicking the "discard changes to this tiddler" button.

No, they aren't existing tiddlers, the draft are discarded. But their name remain in the $:/HistoryList tiddler (and not $:/StoryList as I said before, sorry). Open this HistoyList tiddler, use your TW, and see what happens.

Hegart Dmishiv

unread,
Sep 28, 2015, 11:11:32 AM9/28/15
to tiddl...@googlegroups.com
Ah, I see now, so the only thing that is keeping the document dirty is $:/HistoryList itself then? That seems a bit silly to me. If I didn't commit the changes then TW should treat the "Draft of..." as if it never had existed, and delete that entry from the history list, IMHO.

The reason this matters to me is that I leave my browser open constantly, and have my local, offline (live) instance of TW loaded in a tab all the time. This means that sometimes I can't remember whether my TW wiki really does need saving or not, so I rely on the feedback from the colour of the "save changes" icon, and it seems to be telling me porkies!

Jeremy Ruston

unread,
Sep 28, 2015, 12:03:01 PM9/28/15
to TiddlyWiki
Hi Hegart

There has been some discussion of this point before:


I think the source of the confusion is the logic I discuss at the end of the thread: the wiki is considered dirty if any change has been made to it, without regard for whether those changes cancel one another out.

Best wishes

Jeremy.


On Mon, Sep 28, 2015 at 4:11 PM, Hegart Dmishiv <hegart....@gmail.com> wrote:
Ah, I see now, so the only thing that is keeping the document dirty is $:/HistoryList itself then? That seems a bit silly to me. If I didn't commit the changes then TW should treat the "Draft of..." as if it never had existed, and delete that entry from the history list, IMHO.
On Tuesday, 29 September 2015 03:53:13 UTC+13, Evolena wrote:


Le lundi 28 septembre 2015 16:48:27 UTC+2, Hegart Dmishiv a écrit :
Thanks for explaining that, Evolena. I would have thought that clicking the "discard changes to this tiddler" button would have deleted the "Draft of..." tiddler, thus returning the TW wiki instance to the state it was in prior to entering edit mode, with no changes having been made at all. Are you saying that I'll have a whole heap of random "Draft of..." tiddlers somewhere in my wiki then? Because it still seems to think the document is dirty, even after clicking the "discard changes to this tiddler" button.

No, they aren't existing tiddlers, the draft are discarded. But their name remain in the $:/HistoryList tiddler (and not $:/StoryList as I said before, sorry). Open this HistoyList tiddler, use your TW, and see what happens.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/a919d675-7801-44f4-b990-cdca36d8803c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Hegart Dmishiv

unread,
Sep 28, 2015, 7:23:04 PM9/28/15
to TiddlyWiki, jeremy...@gmail.com
Hi @Jeremy,

Thanks for pointing me to that issue on GitHub. I understand what you're saying about two actions canceling each other out, sure. But you also replied in that issue to @giffmex, to the effect that, if a tiddler is a state tiddler in $:/state then the core will "exclude it from the dirty handling". Why not move $:/HistoryList to $:/state/HistoryList to give it the same exclusion? After all, I would have thought that the history list, by its very existence, is part of the state of the wiki.

Kind regards,

Hegart.

Tobias Beer

unread,
Sep 29, 2015, 1:29:12 AM9/29/15
to TiddlyWiki, jeremy...@gmail.com
Hi Hegart, @Jeremy,

 
After all, I would have thought that the history list, by its very existence, is part of the state of the wiki.

I tend to agree that it would be much more sensible
to have to be explicit about wanting to save any of those state tiddlers
rather than having to be explicit about not wanting that.

Best wishes,

— tb
Reply all
Reply to author
Forward
0 new messages