@etardiff some interesting ideas in your conditional-display, it expands in my mind what can be passed into a macro. I too have exploered this further but its better I stop exploring this path for now. I wont start another topic. So here is my somewhat final example;
\widget $value.icon(field:"fieldname" tiddler tiddlervar:"currentTiddler")
\function yes() ✅
\function no() ❌
\function pending() ◎
\function tiddlername() [<tiddler>!is[blank]] :else[<tiddlervar>getvariable[]]
\function fieldvalue() [<tiddlername>get<field>]
\function value.icon() [<fieldvalue>getvariable[]!is[blank]] :else[<fieldvalue>]
<span title={{{ [<field>] [[has value:]] [<fieldvalue>] +[join[ ]] }}}><<value.icon>></span>
\end $value.icon
# <$let currentTitle="value icons with suffix"><$value.icon tiddlervar="currentTitle" /></$let>
# <$value.icon/>
# <$value.icon field=status/>
# <$value.icon tiddler="value icons with suffix" />
# <$value.icon field=status tiddler="value icons with suffix" />
Replace the tiddler names and fields with ones relavant to your own test data
- Using the get variable we can actualy pass in a tiddlervar to use, otherise it uses currentTiddler or tiddlername (this is a great feature to use elsewhere)
- We can use simple names for the value icons because they are only known within this widget, Keep It Simple Sweetheart (principal)
- Widgets are good if the only thing you need from them is to display the result, as is the case, with displaying icons.
- For any value you use you can come to the widget and give that value an icon and just use the same widget.
- There is a tooltip for each icon, you could add the tiddlername as well.
- If there is no matching icon the value will be displayed, so you can find an icon later if desired.