Shiraz Plugin: Partial Update - Stay Tuned

Cheers! :smiley:

TT

Important

@Mohammad … Please do not misuse the comment syntax. This can and probably will bite us hard in the future.

Comments may be excluded from other 3rd party plugins that export or compress content, which imo is legit.

So this can cause bad compatibility problems.

Here is the HTML COMMENT spec HTML Standard … Especially see point 2

  1. Optionally, text, with the additional restriction that the text must not start with the string “>”, nor start with the string “->”, nor contain the strings “<!--”, “-->”, or “--!>”, nor end with the string “<!-”.

The TW parser will use this spec if any problems with comments come up. … There are some restrictions to the text that can be inside a comment and violations may cause problems.

1 Like

Yes, that’s right!

Here a captioned form of comments are used: <!---id.
The reason is they are naturally hidden and here when you code, you put your todos inside comments! That is why I used them!

I know I can use a div or section with a class its display set to none!

Please don’t … It will cause problems. … Trust me.

It will also limit the future development of the core, if we need to take care about elements that can safely be ignored otherwise.

1 Like

One question: In programming writing codes with enough comments to explain how the code is written or what is every variable is good practice and very recommended!

Do you think in TiddlyWIki, we have cases where core or third party plugins remove the comment blocks??

Yes, but it can safely be removed if the program is compiled, or compressed.

I don’t know if flibbles uglify plugin does remove comments. … But it needs to be possible to do so in the future. So it doesn’t matter, if we ignore it now. …

We do already ignore it in the TW parse-tree. So there is no possibility to cache the content and may be other limitations which may have an impact on the performance.

1 Like

Thank you for your explanation Mario!

Sorry. … I didn’t want to hinder your creativity. … There may be a possibility once the PR https://github.com/Jermolene/TiddlyWiki5/pull/6666 landed in the core. Which will be after v5.2.3 is released

It will include the possibility to create user-defined wikitext-widgets. See the heading Custom Widgets in the first post.

The names of user defined widgets must start with the prefix $.

BUT we are not sure yet. … That prefix may change. …

See: Open Questions

Is $ the best prefix for custom widgets? We have a (very) loose guideline that $ stands for “system”, and it is used as a kind of warning sign for system-y stuff that generally doesn’t need to bother casual users. But we don’t have an equivalent prefix for a user defined namespace. Perhaps ., as we’re using with custom operators?

@pmario
To make things a litter simple, one other solution is to use custom html tag!
HTML Custom Tags | Define HTML5 Element or Tag | Tuts Insider

I can define a tag like todos

<todos>
..
..
</todos>

That should work, if you define some CSS with display: none. The TW parser will handle that as a custom HTML element.

1 Like

No at all. I always welcome feedbacks.

Yes! custom widget is one solution! Still I like to keep overheads as minimum as possible! So, I like to use a simple syntax.

2 Likes

I found this the simplest

@@.todo
x, Call Jeremy
-, Write the docs
@@
1 Like

@pmario
This is a class in WikiText! and should be better than the user defined html tag!

Yes, it will crate a P element if interpreted as a block. or if used inline it will create a SPAN with the .todo class assigned. … That looks good for me. It uses something that TW can handle well, is “compact” and is easy to remember by users.

1 Like

Based on above discussions, and @pmario comments I updated the code for simple in tiddler checklist and interstitial journaling! Here is a short demo. The good news is they are searchable as they reside in their tiddler. No extra system tiddler, nor third party tiddler,…

These new features will be published on their own.

Simple checklist

msedge_8EG1LA0UVa

Simple interstitial journaling

msedge_3jByFHT4Z9

Both use data block a new term coined here. A data block is a hidden block of data inside

@@.dblock

@@

dblock is a css class.

5 Likes

This has been published as a small separate plugin:

Kara Plugin: First Public Release - Plugins - Talk TW (tiddlywiki.org)

2 Likes

Have just installed Kara- neat, i love it! -via the Kookma Plugin Library… But then i noticed the yellow “Update” button (as viewed in TiddlyDesktop v.0.0.14 (15)) beside my Shiraz plugin, which carries the notation:

$:/plugins/kookma/shiraz

2.5.2
This plugin is already installed at version 2.5.1

… which notation & version code does not change, though i’ve pushed the “Update” button and reloaded multiple times.

So @Mohammad, i’m confused: is the latest version of Shiraz in fact 2.5.2? Is there indeed an update available? If so, is there another way to update it on my instance? Or is it perhaps the case that v.2.5.2 is installed, only this list of plugin versions is for some reason failing to reflect the fact?

Yes, Shiraz release is 2.5.2. It got some fixes on dynamic tables (tags column template to show colors correctly).

By the way I pushed a new update to kookma plugin library.

@Mohammad Thanks for updates. It is working now.

Following the suggestions [tw5] Re: customize order of tag display - #2 by Gavin_Gamboa and Grok TiddlyWiki — Build a deep, lasting understanding of TiddlyWiki, I add color for each category of tags, and then add modify this tiddler ($:/plugins/kookma/shiraz/templates/body/tags) in Line 2 from

<$list filter="[title<currentRecord>tags[]]">

to

<$list filter="[title<currentRecord>tags[]sort[title]sort[color]sortby{$:/config/TagsOrder}]">

Now all my tags are sorted by category (colour), then title, then configured in $:/config/TagsOrder (less important one).

1 Like