[Idea] Improved handling of overwritten shadows?

59 views
Skip to first unread message

TonyM

unread,
Jun 1, 2020, 3:58:35 AM6/1/20
to TiddlyWikiDev
Folks,

If the upgrade process detected tiddlers that where overwritten could it not rename them?, under a namespace eg $:/overidden/tiddlername so the new upgraded tiddler is the one that is used, then a simple process to review each edited tiddlers differences with the shadow tiddler could be used to selectively reapply the changes?

It seems to me this would support the common practice of overwriting shadow tiddlers.

Regards
Tony

PMario

unread,
Jun 3, 2020, 8:59:30 AM6/3/20
to TiddlyWikiDev
Hi,

What happens if you import the same stuff 4 times. Do you get 4 renamed and duplicated tiddlers, where nobody knows, which one to use?

I think, this is plugin territory. In TW one of several "strong" principle says: "User content always wins" ... and I think, that shouldn't change.

I personally wouldn't want, that the import process invalidates content that I created. The import dialog has a possibility to view and evaluate every single tiddler, if it should be imported or not. It's simple to see, the "difference" between existing tiddler and the imported one.  ... If users don't do that, imo it's not the fault of the mechanism.

There is a th-importing-tiddler hook, which can be used to create a behaviour as you describe it, but I think this is usecase dependent and should be implemented as a plugin first.

-mario

TonyM

unread,
Jun 3, 2020, 8:00:56 PM6/3/20
to TiddlyWikiDev
Mario,

Perhaps I was a bit brief in my original post but I only want the mechanism to detect and you can leave the user to handle them, renaming them is so they can still be imported and reviewed, If I do that 4 times without review and making a decision then I deserve the confusion.

It already happens somewhat with the upgrade mechanism, rejecting shadows and core, but I want to to quarantine edited shadows to help the upgrade. Then provide a method to review and apply.

Regards
Tony

PMario

unread,
Jun 4, 2020, 4:49:31 AM6/4/20
to TiddlyWikiDev
On Thursday, June 4, 2020 at 2:00:56 AM UTC+2, TonyM wrote:

It already happens somewhat with the upgrade mechanism, rejecting shadows and core, but I want to to quarantine edited shadows to help the upgrade. Then provide a method to review and apply.

I think importing is the right time to review, if tiddlers should be imported or not. ... If someone imports the whole TW file, they have to review many tiddlers.

In this case I would prefer the possibility to "sort" eg: Show all tiddlers that overwrite shadows. ... Which should be a short list, that should be easy to review.

Or There may be a possibility for a "partial import". EG: split the list into Content Tiddlers, System Tiddlers and Shadow Tiddlers. The user should be allowed to import content and system tiddlers without much review. ... But have a closer look at shadows.

The later mechanisms should be possible to implement with import hooks. ... Similar to the bundler import extension.

Just some ideas.

-mario

TonyM

unread,
Jun 4, 2020, 8:47:04 AM6/4/20
to TiddlyWikiDev
Mario

We are thinking along the same lines. The import tiddler is just a json file of tiddlers dropped. If we develop the ability to filter and sort tiddlers in the import queue we can simultaneously make json tiddler tools. I would also like to add a prefix inbound tiddlers.

I discovered if you save the import tiddler you and change the plugin type it becomes a plugin, remove plugin type and its a json tiddler.

So being able to list and apply changes to tiddlers as they move or copy from json to tiddlers, tiddlers to json will be useful in many ways including distribution of sets of tiddlers. An advance on the bundler plugin with no need to export.

This method could be coopted to store sets of configuration settings for different users and other things we have discussed in the past, including this thread where we can quarenteen overwriting shadows.

The ability to drag a tiddler into the same wikis import process would help as well. Build a json file from tiddlers in the wiki in the wiki.

Regards
Tony

Manipulating the import process is just manipulating a json.

Reply all
Reply to author
Forward
0 new messages