Shiraz plugin 2.0.0 beta 10: Dynamic Tables

415 views
Skip to first unread message

Mohammad

unread,
Dec 4, 2019, 2:34:07 PM12/4/19
to TiddlyWiki

Announcement:Shiraz plugin
Date: Dec 4th,  2019
Release: 2.0.0 beta 10
Status: beta under development

A new beta update is available.
Star it if you like it and send your feedback!
Documentation proof reading for English is welcome!


This update has an amazing new feature: Dynamic Tables. see the tutorial here
Dynamic tables can be created from tiddler fields OR data tiddler indexes (json or dictionary)


Dynamic tables in Shiraz is based on the great plugin TiddlyTables by Alan Aldrich, so all kodous goes to Alan.

Dynamic tables is a very simple with limited features comparing to TiddlyTables. Shiraz dynamic tables has some features not available in TiddlyTables 0.6.13 (at the time of release Dec 2019) like

  • inline editor
  • data tiddler support
  • independency from host tiddler (e.g. having many tables in one tiddler)
  • minimum settings

These make Shiraz dynamic tables a simple and easy to use limited version of Tiddlywiki dynamic tables.


Image 094.png



Image 095.png

--Mohammad

David Gifford

unread,
Dec 4, 2019, 7:12:12 PM12/4/19
to TiddlyWiki
Nice! Great to have you back.

I added Dynamic tables (Shiraz) right under Dynamic tables (ooktech) in the toolmap.

TonyM

unread,
Dec 4, 2019, 7:30:41 PM12/4/19
to TiddlyWiki
Mohammad,

Lovely work and look. Just as with TiddlyTables by Alan Aldrich, this has great potential that comes from the ease of use. It makes more sense to build a table than build a list widget to list tiddlers view and edit various fields.

The List widget is a staple for tiddlywiki, including when researching or designing but dynamic tables are a far quicker way. It would like to see a version of you and Alans work in the standard edition. Why? because such methods are essential to using, maintaining or exploring any tiddlywiki.

For example you could use the following;

<<table-fd filter:"[is[system]prefix[$:/config]]" fields:"title description" sortOp:"sort" tblCaption:"Caption" tblClass:"" stateTiddler:"$:/temp/test">>

To Create and edit the description field for all config tiddlers.

Good work as usual
Thanks
Tony

TonyM

unread,
Dec 4, 2019, 7:40:49 PM12/4/19
to TiddlyWiki
Mohammad,

In edit mode the columns reduce to a short minimum and the table does not use 100% of the Width. Would there be a way to provide or alter the table width to 100% to make editing easier perhaps with a custom class or table style parameter?

Regards
Tony

On Thursday, December 5, 2019 at 6:34:07 AM UTC+11, Mohammad wrote:

Mohammad

unread,
Dec 5, 2019, 3:42:28 AM12/5/19
to TiddlyWiki
@David
Thank you for adding it to Tiddly toolmap!

@TonyM
Yes, dynamic table can have a lot of use case and it is a more flexible tool comparing to listing tiddlers using $list widget.
I will check the css to see how keep the edit cell wider.


--Mohammad

TonyM

unread,
Dec 6, 2019, 2:20:45 AM12/6/19
to TiddlyWiki
Mohammad

Using html I often set the table style to width: 100%;

it expands to fit the tiddler.

Regards
Tony

Mohammad

unread,
Dec 6, 2019, 2:49:33 AM12/6/19
to TiddlyWiki
Tony
 There is a class in Shiraz called w-100
If you pass it to tblClass then the table occupy the whole 100% width of tiddler.

Hope this help

--Mohammad

HC Haase

unread,
Dec 6, 2019, 4:43:18 AM12/6/19
to tiddl...@googlegroups.com
Very nice. simpler than tiddlytable but still versatile.

I think I found a small bug.




when pressing the arrow to show the tiddler content in the table, it (most of the time) shows the content of the top tiddler (at the time I opend TW, so sorting differently  will still show this tiddler) for every tiddler.


Mohammad

unread,
Dec 6, 2019, 5:00:00 AM12/6/19
to TiddlyWiki
Hi HC Haase,
In the example given in the demo page there are several example works fine!

I think the problem is with transclusion!
Could you kindly paste the text of second tiddler here!


--Mohammad

HC Haase

unread,
Dec 6, 2019, 5:07:18 AM12/6/19
to TiddlyWiki
I think you are right

this is the txt of the second tid (and all the rest for that matter)

!! {{!!title}}
by {{!!artist}}

{{!!genre}}

{{!!url}}

{{!!note}}

{{!!year}}


Mohammad

unread,
Dec 6, 2019, 5:07:40 AM12/6/19
to TiddlyWiki
I confirm the bug!
It is a problem with transclusion!

If you use {{!!title}} or any other filed transclusion through {{!!xxxx}}
this problem occurred!

Thank you for report! I will soon submit a new update!

--Mohammad

TiddlyTweeter

unread,
Dec 6, 2019, 9:47:02 AM12/6/19
to TiddlyWiki
Ciao Mohammad

At design level there has always been the problem of the WIDTH of tables. The issue goes back forever.

Deriving CSS that matches wide end user needs is not easy.

In TW one remaining issue I have not yet seen a good answer to is HOW would you display well a table that is wider than the story river?

Just thoughts.

Best wishes
TT

TiddlyTweeter

unread,
Dec 6, 2019, 9:52:06 AM12/6/19
to TiddlyWiki
I think {{!!field}}  causes no end of trouble once you start level two transclusion? 

It is more a matter of docs, rather than an issue per se?

HOW do you transclude a field dynamically at several levels of transclusion?

My query
TT

Mohammad

unread,
Dec 6, 2019, 10:19:38 AM12/6/19
to TiddlyWiki
Hi Josiah,
 The solution is to put the table inside a parent container and then use css to control and format table!
For example if you have a table with many columns it will overflow horizontally!

Look at the below example

<style>
.container{
 max-width: 90%;
 overflow-x:scroll;
</style>

<div class="container">
<$macrocall $name=table-fd filter="[tag[sample]]" tblClass="w-100 thead-dark" fields="tbl-expand title caption url email fa fb fc tags modified modifier" sortOp="nsort" tblCaption="""''<<tc src:"Table 1. Dynamic table example" color:orange>>''"""/>
</div>

I am sure Alan have better solution as he is very well at css styling!

--Mohammad

Mohammad

unread,
Dec 6, 2019, 10:22:00 AM12/6/19
to TiddlyWiki
Yep, this is an issue as HC Haase reported.
I have addresses this by using


<$tiddler tiddler=...



I will push a new update within nest 15 minutes

--Mohammad

Mohammad

unread,
Dec 6, 2019, 1:46:48 PM12/6/19
to TiddlyWiki
Hi HC Haase,
 I pushed a new update fixed two level nested transclusion.

Please have a look at

Best regards
Mohammad

TonyM

unread,
Dec 6, 2019, 10:07:45 PM12/6/19
to TiddlyWiki
On table overflow,

There are a number of methods to cause table overflow to turn into sliders so you can scroll left right and updown. I think given tiddlywikis zoom features, closable sidebar, full screen mode and "fluid story, fixed side bar" the tiddler is a reasonable constraint. The Muuri plugin supports opening wikis across multiple screens as well. Open in new windows also allows a dedicated window that can go full screen.

So if the maximum size of a table were always constrained to the containing tiddler and provided scrollable overflow and users made aware of these other mechanisms it would I believe be sufficient.

Regards
Tony

On Thursday, December 5, 2019 at 6:34:07 AM UTC+11, Mohammad wrote:

HC Haase

unread,
Dec 9, 2019, 1:52:15 AM12/9/19
to tiddl...@googlegroups.com
Thank you Mohammad.

here is a text editor snippet for a your dynamic table. it could be useful to include it in the plugin IMO.
$__tags_TextEditor_Snippet_dynamicTable.json

Mohammad

unread,
Dec 9, 2019, 2:17:52 AM12/9/19
to TiddlyWiki
Many thanks for snippet! I will include them!
Cheers
Mohammad

Mohammad

unread,
Dec 9, 2019, 2:23:16 AM12/9/19
to TiddlyWiki
Note a small issue in your snippet

<<table-fd filter:"[tag[x]!prefix[$]]" fields:"tbl-expand fields to show goes here tags " sortOp:"sort" tblClass:"table-hover-cyan " tblCaption:"'' <$count filter='[tag[x]!prefix[$]]'/>  tagged [[x]].''">>

Two square brackets in filter!



On Monday, December 9, 2019 at 10:22:15 AM UTC+3:30, HC Haase wrote:

HC Haase

unread,
Dec 9, 2019, 2:27:17 AM12/9/19
to TiddlyWiki
ah.. thanks.. however, for some reason, it works without OR there must be a space between the two closing brackets, like ] ]. ]] gives an error.
Reply all
Reply to author
Forward
0 new messages