I just noticed some inconsistent behaviour (maybe inconsistent by design?) with the delete tiddler button:
for a tiddler in edit mode, clicking the delete button prompts with a confirmation “Do you wish to delete …”, which gives the opportunity to cancel if the button was clicked by mistake
for a tiddler in view mode, clicking the delete button does not prompt with any confirmation at all, immediately deleting (so not opportunity to cancel a possible mistake.)
I find that inconsistency annoying. I’d like to fix that in my TiddlyWikis, but I’m not sure how to go about it. Looking at the $:/core/ui/Buttons/delete hasn’t given me any clues.
Could somebody point me in the right direction to setup consistent behaviour upon pressing the delete button?
You may be running into something a little strange: we only request confirmation when deleting a tiddler that has a non-blank text field. I think it was a well meaning attempt to reduce the chattiness of the UI when deleting inadvertently created new tiddlers, but it’s probably something we should review now.
for a tiddler in view mode, clicking the delete button does not prompt with any confirmation at all, immediately deleting (so not opportunity to cancel a possible mistake.)
That’s by design. If you want to click the delete button in view mode
you need to open the “More” dropdown
Click the delete button.
If it contains some text content it asks
If it doesn’t it doesn’t ask
So that the tiddler is deleted needs at minimum 2 clicks.
IMO, that’s a clear indication that the user wants to perform this action. No need to ask anymore.
In edit mode it’s different. Edit mode does always ask. … Except, if you create a new tiddler, didn’t change anything and delete it again. It doesn’t ask here.
I find that inconsistency annoying. I’d like to fix that in my TiddlyWikis, but I’m not sure how to go about it. Looking at the $:/core/ui/Buttons/delete hasn’t given me any clues.
Well, when I go to click on permalink, or export, or whatever buttons under more, and click delete by mistake, it is a huge pain in the rear.
I’ve got all kinds of tiddlers that have nothing in the text field, but rather values in custom fields.
It sucks when that kind of tiddler mistakenly gets deleted, despite having custom field values, and without some kind of confirmation message.
My request in my initial post: how can I go about modifying my TiddlyWikis to have consistent behaviour when deleting?
I’m not asking for TiddlyWiki out-of-the-box design to be changed for everybody and all future editions of TiddlyWiki.
I just want to modify mine.
ALSO: I want to add extra behaviour upon delete of any tiddler in one of my TiddlyWikis. For whatever reason, the extra behaviour is not happening when I click on delete of a tiddler while that tiddler is in view mode. Either inconsistent behaviour going on or the delete buttons aren’t performing the same code?
IMO low hanging fruit. … Move the delete button to the “last” position in the list, with a separator in between, so it’s harder to accidentally click or touch it on a mobile phone
Add the empty check for all fields, except modified, created, modifier and creator, because they are always there.
This needs a bit more work. …
Same as 2, but there may be a list, that lets the user choose, which fields should not activate the “security” question.
There may be “value” in the info when and who created a tiddler. … It always depends on the users usecase.