mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-02 16:56:56 +00:00
Fix issue with tabs macro introduced by fix for #2628
I’m fixing this now to show how the tabs macro can be changed to accommodate the change, but we may yet decide to reverse out the change in order to maintain backwards compatibility. One problem with changes like this is that there’s no easy way to find out where it impacts the core UI. The tabs macro is now fixed, but perhaps there’s more obscure things that are still broken in the core. If we do opt to reverse the change to preserve backwards compatibility, we could add a way to explicitly trigger the new behaviour. For example, a new attribute `updateState=“yes”`. Yet another alternative is to make completely new alternative to the list widget with revised semantics, that authors can opt-in to. For example `<$loop>`. (There was another issue we discussed a year or two ago about adding support for an index variable which may be a candidate for fixing at the same time).
This commit is contained in:
parent
664225f6fd
commit
56640b90bb
@ -3,8 +3,9 @@ tags: $:/tags/Macro
|
||||
|
||||
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
|
||||
<div class="tc-tab-set $class$">
|
||||
<$set name="state" value=<<qualify "$state$">>>
|
||||
<div class="tc-tab-buttons $class$">
|
||||
<$list filter="$tabsList$" variable="currentTab"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$list filter="$tabsList$" variable="currentTab"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<state>> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$tiddler tiddler=<<save-currentTiddler>>>
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude tiddler=<<currentTab>> field="caption">
|
||||
@ -16,7 +17,7 @@ tags: $:/tags/Macro
|
||||
<div class="tc-tab-content $class$">
|
||||
<$list filter="$tabsList$" variable="currentTab">
|
||||
|
||||
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
||||
<$reveal type="match" state=<<state>> text=<<currentTab>> default="$default$">
|
||||
|
||||
<$transclude tiddler="$template$" mode="block">
|
||||
|
||||
@ -28,5 +29,6 @@ tags: $:/tags/Macro
|
||||
|
||||
</$list>
|
||||
</div>
|
||||
</$set>
|
||||
</div>
|
||||
\end
|
||||
|
Loading…
x
Reference in New Issue
Block a user