Shiraz 3.0: Plan for the Next Major Release

I saw that, but it’s still not what I’m looking for :sweat_smile:

Everywhere in the templates, <<currentColumn>> is called, including in the default header template $:/plugins/kookma/shiraz/tables/templates/header/default:

<th>
<%if [<tempTableSort>getindex[sortIndex]match<currentColumn>] %><!--if table is sorted based on current column -->
	<%if [<tempTableSort>getindex[hasnegate]match[false]] %><!--set negate for sort-->
		<$button setTitle=<<tempTableSort>> setIndex="hasnegate" setTo="true" class="tbl-sort-svg tc-btn-invisible tc-tiddlylink" >
			<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value="reverse,caseinsensitive"/>
			<$text text=<<currentColumn>>/>&nbsp;{{$:/core/images/down-arrow}}
		</$button>
	<%elseif [<tempTableSort>getindex[hasnegate]match[true]] %><!--remove negate for sort-->
		<$button setTitle=<<tempTableSort>> setIndex="hasnegate" setTo="false" class="tbl-sort-svg tc-btn-invisible tc-tiddlylink" >
			<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value=""/>
			<$text text=<<currentColumn>>/>&nbsp;{{$:/core/images/up-arrow}}
		</$button>
	<%endif%><!-- end of nested if: set negate -->
<%else%><!--if table is not sorted based on current column -->
	<$button setTitle=<<tempTableSort>> setIndex="sortIndex" setTo=<<currentColumn>> class="tc-btn-invisible tc-tiddlylink" >
		<$action-setfield $tiddler=<<tempTableSort>> $index="hasnegate" $value="false"/>
		<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value=""/>
		<$text text=<<currentColumn>>/>
	</$button>
<%endif%>
</th>

Where is <<currentColumn>> defined?

It’s a <$list> widget variable in $:/plugins/kookma/shiraz/macros/dtables/table-dynamic:

...


<!-- create header -------------------->
<thead>
<<confirm-delete>>
<<check_tiddlers_type_for_table_from_indexes>>
<tr class="shiraz-dtable-header">
<$list filter=<<columnFilter>> variable=currentColumn>

...

Fred

2 Likes

Thanks! Now I know that I’ll need to operate around the currentColumn rather than in it :stuck_out_tongue_winking_eye:

There is no formatting here! Plain text is produced using <$text text=<<currentColumn>>/>.
CSS is responsible for formatting. The link to style tiddler is given above.

Hello again :slight_smile: I noticed that for dynamic tables, you reference an parameter called “filed” often in examples like in demo/dynamic-tables/searchable where you create a temp tiddler to store the contents of a search input:

<$edit-text tiddler="$:/temp/demo/dtable/search" filed=text tag=input default=""/>

I’ve used a lot of your dynamic tables in my TW, and they work perfectly, but I’m curious as to whether or not this is supposed to be “field” instead of “filed” since for the example above, the edit-text widget doesn’t have a filed parameter? I’m thinking that since “filed” is not a parameter of the widget, it’s simply ignored, and the widget defaults to using the text field of the state Tiddler, so it still works, but I’d love to make sure :slight_smile:

Ah, I remember serval other places @TW_Tones and @TiddlyTitch.
You are right, that is a misspelled word, I correct it!

1 Like

This will function as expected, despite the incorrect parameter. The reason is that if the field is not provided, the text field will be used as the default.

Yes that’s what I meant when I wrote

:slight_smile:

Just as I modified some of your DTables tiddlers, I thought I could put this here.

In $:/plugins/kookma/shiraz/tables/procs/dt-table-dynamic I changed the procedure definition to this :

\procedure table-dynamic(filter, fields:"", indexes:"", sortType:"string", caption:"", class:"",
                  footerRows:"0", stateTiddler:"", editButton:"yes", pagination:"no", emptyMessage:{{$:/plugins/kookma/shiraz/tables/lang/emptyMessage}})

Note the EmptyMessage parameter to be able to easily translate this message. This could be part of a config tiddler dedicated to dynamic tables…

My 2 cents…

2 Likes

Thank you, Thomas,
I will add this to next release.

I just realized that I’ve got a 3.0.x version of Shiraz installed on some wikis (and 3.0.14 is the only version that appears — albeit tagged “experimental” — in your plugin library), but when I went to check on a documentation detail, the only online documentation I can find is still for the 2.9.7 …

I am sure you are quite busy with many projects! Do you have a sense of progress on making Shiraz 3.x official?

If not fully official, might there be some one informal place where backward-compatibility issues are listed?

(The issue that I’ve stumbled across is that I was using class names such as sh-multicol in wikis developed under 2.x … and that class name has apparently been changed to shiraz-multicol, and it took some poking around to figure that out. You have mentioned that there would be changes in 3.0 that would make upgrading not seamless… No big deal, but having a place to confirm such details would be fantastic.)