My first improve for TiddlyWiki This version of the tagging also can print count of tagged items via %1 Now we can use %1 param in label and etc.
======CODE==========
merge(config.macros.tagging,{ label: "%0 List (%1)", labelNotTag: "%0 List (%1)", tooltip: "List of tiddlers tagged with '%0' (%1)"});
======CODE==========
config.macros.tagging.handler = function(place,macroName,params,wikifier,paramString,tiddler) { var theList = createTiddlyElement(place,"ul"); var title = ""; if(tiddler instanceof Tiddler) title = tiddler.title; if(params[0]) title = params[0]; var tagged = store.getTaggedTiddlers(title);
theList.setAttribute("title",this.tooltip.format([title,tagged.length])); var prompt = tagged.length == 0 ? this.labelNotTag :this.label;
The suggested new labels have a significant effect on existing TiddlyWikis. Currently the macro just displays the texts "tagging:" or "not tagging". With the suggested change this will result in much longer texts that may corrupt the layout of the tiddler, especially when long tag names are used. Also it may be not so easy to quickly identify the "tagging" buttons because of their changing titles (currently the eye can immediately focus on the "tagging").
Also I personally never had the need to know the exact number of tagged tiddlers, just to know if or if not tiddlers are tagged was sufficient.
Nevertheless if there is a need for this count information I suggest to make it possible, but keep the old behaviour as the default.
I.e.
* Use the suggested code changes in config.macros.tagging.handler (i.e. allow formatting the label/tooltip with title and count). * Keep the old config labels/tooltip (without the %0, %1). When someone has the need for the counts he can just overwrite these labels with strings containing %0 and %1 (e.g. config.macros.tagging.label = "%0 List (%1)")
> The suggested new labels have a significant effect on existing > TiddlyWikis. Currently the macro just displays the texts "tagging:" or > "not tagging". With the suggested change this will result in much > longer texts that may corrupt the layout of the tiddler, especially > when long tag names are used. Also it may be not so easy to quickly > identify the "tagging" buttons because of their changing titles > (currently the eye can immediately focus on the "tagging").
> Also I personally never had the need to know the exact number of tagged > tiddlers, just to know if or if not tiddlers are tagged was sufficient.
> Nevertheless if there is a need for this count information I suggest to > make it possible, but keep the old behaviour as the default.
> I.e.
> * Use the suggested code changes in config.macros.tagging.handler (i.e. > allow formatting the label/tooltip with title and count). > * Keep the old config labels/tooltip (without the %0, %1). When someone > has the need for the counts he can just overwrite these labels with > strings containing %0 and %1 (e.g. config.macros.tagging.label = "%0 > List (%1)")
>I reckon that Udo's right: we should make the code change because it's >pretty trivial, but keep the current lingo strings for backwards >compatibility.
>>The suggested new labels have a significant effect on existing >>TiddlyWikis. Currently the macro just displays the texts "tagging:" or >>"not tagging". With the suggested change this will result in much >>longer texts that may corrupt the layout of the tiddler, especially >>when long tag names are used. Also it may be not so easy to quickly >>identify the "tagging" buttons because of their changing titles >>(currently the eye can immediately focus on the "tagging").
>>Also I personally never had the need to know the exact number of tagged >>tiddlers, just to know if or if not tiddlers are tagged was sufficient.
>>Nevertheless if there is a need for this count information I suggest to >>make it possible, but keep the old behaviour as the default.
>>I.e.
>>* Use the suggested code changes in config.macros.tagging.handler (i.e. >>allow formatting the label/tooltip with title and count). >>* Keep the old config labels/tooltip (without the %0, %1). When someone >>has the need for the counts he can just overwrite these labels with >>strings containing %0 and %1 (e.g. config.macros.tagging.label = "%0 >>List (%1)")
I think that's ok, and another question - is there a way to tagging many tags like this <<tagging OpenTask Contact>> i know that the way is to using 2 tagging macros but it will be in separated lists.
and also maybe a good feature to inclusive tagging
<<tagging Contact=>Friend >> that will show list of the my friends contacts or it will be so complicated with these feature.
> I think that's ok, and another question - is there a way to tagging > many tags like this > <<tagging OpenTask Contact>> > i know that the way is to using 2 tagging macros but it will be in > separated lists.
> and also maybe a good feature to inclusive tagging
> <<tagging Contact=>Friend >> > that will show list of the my friends contacts or it will be so > complicated with these feature.