TiddlyWiki5
TiddlyWiki5 copied to clipboard
[Bug] tm-new-tiddler message creates tags field even if it is empty. -- It should not
tm-new-tiddler
message does create an empty tags:
field, if there is no value set to: $:/config/NewTiddler/Tags
To reproduce
- Click the NewTiddler button at tw-com
- Save the new tiddler
- Open Tiddler (i)nfo area -> Fields tab
Expected behaviour: If there is no tag defined, there should be no tags-field
It is not a "doomsday" problem, but it is problem with Testcase Tiddlers, that contain buttons, that create a new tiddler using that message. Eg: (simplified testcase)
- Use the following code with a testcase-tiddler with https://tiddlywiki.com/prerelease/
- title: test-new-tiddler-button
- tag: $:/tags/wiki-test-spec
- type: text/vnd.tiddlywiki-multiple
title: Narrative
This code tests action-sendmessage with tm-new-tiddler
+
title: Output
<$button>
<$action-sendmessage $message="tm-new-tiddler" />
Create a new tiddler
</$button>
Problem: I did not specify an additional parameter, but the tags
field is still there. That was very confusing with my real testcase, where I did create the docs for rewritten toc-macros.
The tags
field was there, but the code should have only created tagLike
-- So I started to investigate
Just to find out the that's the default behaviour for TW tm-new-tiddler message. -- time wasted.
Proposal
I would like to remove that redundant field, if it is empty. I think the change should be backwards compatible and it will save other developers some time once they start using the Testcase compound tiddlers.