diff --git a/core/ui/TestCases/DefaultTemplate.tid b/core/ui/TestCases/DefaultTemplate.tid index 04623cbc6..d5919938d 100644 --- a/core/ui/TestCases/DefaultTemplate.tid +++ b/core/ui/TestCases/DefaultTemplate.tid @@ -3,6 +3,7 @@ code-body: yes \whitespace trim \procedure linkcatcherActions() +<$action-log/> <%if [has[title]] %> <$qualify title=<> name="qualifiedState"> <$action-setfield $tiddler=<> text=<>/> @@ -10,83 +11,85 @@ code-body: yes <%endif%> \end +<$navigator story={{{ [] }}} history={{{ [] }}}> <$let state={{{ [] }}} > -
-
-

- <$genesis $type={{{ [!match[]then[$link]else[span]] }}} to=<>> - <%if [!match[]] %> - !match[fail]then[tc-test-case-result-icon-pass]] [match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}> - <%if [!match[fail]] %> - {{$:/core/images/done-button}} - <%else%> - {{$:/core/images/close-button}} - <%endif%> - + <$linkcatcher actions=<>> +
+
+

+ <$genesis $type={{{ [!match[]then[$link]else[span]] }}} to=<>> + <%if [!match[]] %> + !match[fail]then[tc-test-case-result-icon-pass]] [match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}> + <%if [!match[fail]] %> + {{$:/core/images/done-button}} + <%else%> + {{$:/core/images/close-button}} + <%endif%> + + <%endif%> + <$view tiddler="Description" mode="inline"/> + + + <$button popup=`$(state)$-more` + tooltip={{$:/language/Buttons/More/Hint}} + aria-label={{$:/language/Buttons/More/Caption}} + class="tc-btn-invisible" + selectedClass="tc-selected" + > + {{$:/core/images/down-arrow}} + + <$let + tv-config-toolbar-icons="yes" + tv-config-toolbar-text="yes" + tv-config-toolbar-class="tc-btn-invisible" + > + <$reveal state=`$(state)$-more` type="popup" position="belowleft" animate="yes"> +
+ <$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]" + variable="listItem" + > + <$transclude $tiddler=<> $mode="inline"/> + +
+ + +
+

+
+ <%if [[Narrative]is[tiddler]] %> +
+ <$transclude $tiddler="Narrative" $mode="block"/> +
+ <%endif%> + <%if [match[fail]] %> +
+
+ TEST FAILED +
+
+ <$diff-text source=<> dest=<>/> +
+
+ <%endif%> +
+
+ <$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix] -[prefix[$:/HistoryList/]] -[prefix[$:/StoryList/]] -Description -Narrative -Output Output +[putfirst[]] -[has[plugin-type]]" state=<> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/> +
+
+
+
+ <%if [!match[]else[wikitext]match[plaintext]] %> +
<$view tiddler="Output" format="plainwikified" mode="block"/>
+ <%else%> + <$tiddler tiddler="Output"> + <$transclude $tiddler="Output" $mode="block"/> + <%endif%> - <$view tiddler="Description" mode="inline"/> - - - <$button popup=`$(state)$-more` - tooltip={{$:/language/Buttons/More/Hint}} - aria-label={{$:/language/Buttons/More/Caption}} - class="tc-btn-invisible" - selectedClass="tc-selected" - > - {{$:/core/images/down-arrow}} - - <$let - tv-config-toolbar-icons="yes" - tv-config-toolbar-text="yes" - tv-config-toolbar-class="tc-btn-invisible" - > - <$reveal state=`$(state)$-more` type="popup" position="belowleft" animate="yes"> -
- <$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]" - variable="listItem" - > - <$transclude $tiddler=<> $mode="inline"/> - -
- - -
-

-
- <%if [[Narrative]is[tiddler]] %> -
- <$transclude $tiddler="Narrative" $mode="block"/> -
- <%endif%> - <%if [match[fail]] %> -
-
- TEST FAILED -
-
- <$diff-text source=<> dest=<>/>
- <%endif%> -
-
- <$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix] -Description -Narrative -Output Output +[putfirst[]] -[has[plugin-type]]" state=<> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/> -
-
-
-
- <%if [!match[]else[wikitext]match[plaintext]] %> -
<$view tiddler="Output" format="plainwikified" mode="block"/>
- <%else%> - <$linkcatcher actions=<>> - <$tiddler tiddler="Output"> - <$transclude $tiddler="Output" $mode="block"/> - - - <%endif%> -
-
+ + \ No newline at end of file diff --git a/core/ui/TestCases/DefaultTemplateSourceTabs.tid b/core/ui/TestCases/DefaultTemplateSourceTabs.tid index 862a7f57a..5316bd0ef 100644 --- a/core/ui/TestCases/DefaultTemplateSourceTabs.tid +++ b/core/ui/TestCases/DefaultTemplateSourceTabs.tid @@ -1,6 +1,19 @@ title: $:/core/ui/testcases/DefaultTemplate/SourceTabs \whitespace trim + +\procedure saveActions() +<$action-log/> +<$action-sendmessage $message="tm-save-tiddler" $param=<> /> +<$action-navigate $to=<<navTitle>> $scroll="no"/> +\end + +\procedure saveButton(title, navTitle) +<$button class="tc-btn-invisible tc-test-case-save-button tc-small-gap-left" actions=<<saveActions>> > +{{$:/core/images/done-button}} +</$button> +\end + \procedure body() <$list filter="[<currentTab>fields[]] -text +[limit[1]]" variable="ignore"> <table class="tc-field-table"> @@ -11,7 +24,12 @@ title: $:/core/ui/testcases/DefaultTemplate/SourceTabs <$text text=<<fieldName>>/> </td> <td> - <$view tiddler=<<currentTab>> field=<<fieldName>>/> + <%if [<fieldName>match[draft.title]] :filter[<currentTab>has[draft.of]] %> + <$edit class="tc-edit-texteditor tc-max-width-80" tiddler=<<currentTab>> field=<<fieldName>>/> + <$macrocall $name="saveButton" navTitle={{{ [<currentTab>get[draft.title]] }}} title=<<currentTab>>/> + <%else%> + <$view tiddler=<<currentTab>> field=<<fieldName>>/> + <%endif%> </td> </tr> </$list> diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index b926aad77..a808f57d0 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -54,6 +54,8 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc <$action-sendmessage $message="tm-new-tiddler" $name=<<field>> $value={{{[<currentTiddler>format:titlelist[]]}}}/> {{$:/core/images/new-here-button}} <% endif %> + <!-- Allows the toc macros to navigate in test-case tiddlers --> + <$action-navigate $to={{{ [<tv-history-list>get[current-tiddler]] }}}/> </$button> \end _newChild <% if [<tv-toc-show-new-child>match[yes]] %> diff --git a/editions/tw5.com/tiddlers/Examples_TOC_SimpleToc_parentField.tid b/editions/tw5.com/tiddlers/Examples_TOC_SimpleToc_parentField.tid index 5f4d60138..17dfeb56d 100644 --- a/editions/tw5.com/tiddlers/Examples_TOC_SimpleToc_parentField.tid +++ b/editions/tw5.com/tiddlers/Examples_TOC_SimpleToc_parentField.tid @@ -1,6 +1,6 @@ created: 20240730081443212 description: Simple TOC - parentField parameter -modified: 20240730090835300 +modified: 20240730115536164 tags: $:/tags/wiki-test-spec title: Examples/TOC/SimpleToc/parentField type: text/vnd.tiddlywiki-multiple @@ -44,7 +44,7 @@ title: Output This variable set to yes allows you to show a New-Child button. This button will create a "real" tiddler, which will _not_ be listed here --> -\define tv-toc-show-new-child() no +\define tv-toc-show-new-child() yes <div class="tc-table-of-contents"> <<toc tag:"root" parentField:"parent">>