Tiddlywiki5: [BUG] Deleting a draft tiddler should not also delete the original tiddler

Created on 6 Aug 2020  路  9Comments  路  Source: Jermolene/TiddlyWiki5

Describe the bug
Deleting a draft tiddler also deletes the associated original tiddler.

The original idea was that the delete operation should only be available in edit mode so as to reduce the change of accidental deletions while reading a wiki, and thus the need to delete the original tiddler as well as the draft. However, it turns out that draft tiddlers often get abandoned by users, and need to be cleaned up later. The fact that deleting such drafts also deletes the original tiddler does not match the users expectations.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://tiddlywiki.com/empty.html
  2. Click the "new tiddler" button to create a new tiddler
  3. Type some text in the body of the tiddler
  4. Click the "tick" button to save the tiddler
  5. Click the "edit" button to edit the new tiddler
  6. Click the "delete" button to delete the draft tiddler
  7. Click "OK" on the confirmation alert
  8. Search for "New" to verify that the newly created tiddler has been deleted as well as its draft.

Expected behavior
Deleting a draft tiddler should not delete the associated original tiddler.

All 9 comments

Is the "more" dropdown menu available in the edit session (step 6)? Only the "delete" button on the tiddler edit toolbar is available.

I think the real problem described in : sometimes there will be a draft of draft of a tiddler in the GG is, that it happens sometimes, there is a tiddler Draft of 'Draft of 'test''.

There is a real tiddler that is named Draft of 'test', which is _not_ in edit mode. If you open such a tiddler you get the Draft of .. prefix again, which is a confusing thing.

But .. I don't have an idea, how to create a Draft of 'test' tiddler, that is _not_ in edit mode.

Thanks @morosanuae my mistake; I've corrected the OP.

@pmario it's fairly difficult to create a draft of a draft. The discussion in the Google Group didn't mention how it happened but that's what would be really interesting: to find any common scenarios that have slipped through.

@Jermolene I think the OP is a very complicated description of clicking the "Cancel" button. It does exactly what you expect.

Deleting a tiddler has always been that way. Edit a tiddler and click the delete button. ... This mechanism is the same since TWc

@Jermolene I think the OP is a very complicated description of clicking the "Cancel" button. It does exactly what you expect.

Yes, the correct behaviour of the delete button in edit mode should be the same as the cancel button.

Deleting a tiddler has always been that way. Edit a tiddler and click the delete button. ... This mechanism is the same since TWc

TWC of course didn't have drafts.

The consequence of the OP would be, that users need to delete the tiddler 2 times. I think that's a complete waste of time. eg:

  • I open an abandoned Draft Tiddler
  • I click delete
  • There is a "Are you sure dialog"
  • I click yes and the draft is gone.
  • Now I need to search for "Tiddler I wanted to delete"
  • I need to open it
  • I need to click More
  • I need to click Delete
  • I need to answer the dialog with ok

I think that's time wasted and nothing else.

The super simple solution is:

  • Open the Draft tiddler
  • Click cancel

    • If no changes are made there is no question -> Done

    • If changes are made I need to confirm that I want to undo the changes.

  • Done!

Works out of the box!

@Jermolene wrote

The fact that deleting such drafts also deletes the original tiddler does not match the users expectations.

I disagree. I think both the expected and intuitive behaviour is that the original and the draft is one and the same thing, just like when you "edit" something IRL. Compare entering edit mode of a tiddler to opening the hood of a car. If you delete this, then of course the original is deleted. For people trained in parallel manifestations, where new tiddlers magically pop into existance, I can see how this naive interpretation doesn't make sense but I wouldn't call separate deletion of these the "expected behaviour". (I expressed concern about this already several years ago).

IF there was some king of multi-drafts / tiddler-versioning feature then it would be clear that the draft(s) is something totally different than the original. I'm not requesting this, just saying that IF-then.

@pmario wrote

But .. I don't have an idea, how to create a Draft of 'test' tiddler, that is not in edit mode

[At least one way] to create a Draft of tiddler:

  1. Open any tiddler in edit mode (a new or old one)
  2. Click permaview.
  3. Reload the page i.e the permaview link.

The "Draft of" will appear as a (view mode) missing tiddler. To make this a "Draft of Draft", click edit.

I suspect permaview and "Navigation Address Bar" settings are the recurring culprits when this happens since tiddlers that really are in edit mode get the red little alert.

Drafts have the "User name for signing edits" appended to the draft's title, so multiple drafts by different usernames can exist in the same wiki.

What about changing the confirmation prompt when deleting a draft to indicate that the original will be deleted? This would hopefully reduce the likelihood of accidental deletions without requiring users who know what they're doing to make any extra clicks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saqimtiaz picture saqimtiaz  路  5Comments

saqimtiaz picture saqimtiaz  路  5Comments

TiddlyTweeter picture TiddlyTweeter  路  3Comments

joshuafontany picture joshuafontany  路  5Comments

twMat picture twMat  路  5Comments