Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Deleting a draft tiddler should not also delete the original tiddler #4792

Open
Jermolene opened this issue Aug 6, 2020 · 9 comments

Comments

@Jermolene
Copy link
Owner

Jermolene commented Aug 6, 2020

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.

@morosanuae
Copy link
Contributor

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

@pmario
Copy link
Contributor

pmario commented Aug 6, 2020

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.

@Jermolene
Copy link
Owner Author

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.

@pmario
Copy link
Contributor

pmario commented Aug 7, 2020

@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
Copy link
Owner Author

@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.

@pmario
Copy link
Contributor

pmario commented Aug 7, 2020

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!

@twMat
Copy link
Contributor

twMat commented Aug 7, 2020

@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.

@joshuafontany
Copy link
Contributor

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.

@sobjornstad
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants