diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid index 57aee6673..ccc085e05 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid @@ -1,26 +1,15 @@ created: 20200131142401129 -modified: 20211113230406823 +modified: 20240602154417754 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 1 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler /> -\end - -This example will create "New Tiddler", "New Tiddler 1", " New Tiddler 2" and so on - -``` -\define testCreate() -<$action-createtiddler /> -\end +<$testcase> +<$data title=Description text="Default widget with no attributes"/> +<$data title=Narrative text='The button in this example uses the $action-createtiddler widget to create "New Tiddler", "New Tiddler 1", " New Tiddler 2" and so on'/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler /> <$button actions=<> > Create Tiddler - -``` - -<$button actions=<> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler - - Clicking this button, will also open the Right sidebar: Recent tab +"""/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid index 336972a16..a9d204e75 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid @@ -1,28 +1,20 @@ created: 20200131144828713 -modified: 20211113011036840 +modified: 20240602160133371 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 2 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/> -\end +<$testcase> +<$data title=Description text="Transcluded base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the base title defined in [[$:/language/DefaultNewTiddlerTitle]]. -This example will use the base title defined in [[$:/language/DefaultNewTiddlerTitle]]. - -It will overwrite the tiddler, if the button is clicked several times. - -``` -\define testCreate() +It will overwrite the tiddler if the button is clicked several times."""/> +<$data $tiddler="$:/language/DefaultNewTiddlerTitle"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle={{$:/language/DefaultNewTiddlerTitle}} $overwrite="yes"/> \end <$button actions=<> > Create Tiddler - -``` - -<$button actions=<> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler - - Clicking this button, will also open the Right sidebar: Recent tab +"""/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid index 2e137e330..a981bfe92 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid @@ -1,28 +1,21 @@ created: 20200131145355658 -modified: 20211113011111052 +modified: 20240602155233116 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 3 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/> -\end +<$testcase> +<$data title=Description text="Template and custom base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the basetitle attribute and template: [[ActionCreateTiddlerWidget Template]]. -This example will uses a base-title and a template: [[ActionCreateTiddlerWidget Template]] - -It will create: "base", "base 1", "base 2" and so on - -``` -\define testCreate() +Clicking the button will create: "base", "base 1", "base 2" and so on +"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"/> \end <$button actions=<> > Create Tiddler - -``` - -<$button actions=<> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler - - Clicking this button will also open the Right sidebar: Recent tab +"""/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid index 1335893e5..b633f4359 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid @@ -1,28 +1,21 @@ created: 20200131150229551 -modified: 20211113011129601 +modified: 20240602154933113 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 4 type: text/vnd.tiddlywiki -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" /> -\end - -This example uses a base-title "base" and a template: [[ActionCreateTiddlerWidget Template]]. +<$testcase> +<$data title=Description text="Template with override fields and custom base title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the basetitle attribute and template: [[ActionCreateTiddlerWidget Template]]. There will be new fields "aa" and "bb" which are added to the new tiddlers. - -``` -\define testCreate() +"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template" aa="new field aa" bb="new field bb" /> \end <$button actions=<> > Create Tiddler - -``` - -<$button actions=<> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler - - Clicking this button will also open the Right sidebar: Recent tab +"""/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid index 03f719b8b..d0346d781 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 5.tid @@ -1,32 +1,20 @@ created: 20200131144828713 -modified: 20230111220933412 +modified: 20240602155008453 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example 5 type: text/vnd.tiddlywiki -\define testCreate() +<$testcase> +<$data title=Description text="Child action widget uses the created tiddler title"/> +<$data title=Narrative text="""The $action-createtiddler widget in this example uses the <<.var createTiddler-title>> variable to navigate to the created tiddler"""/> +<$data $tiddler="ActionCreateTiddlerWidget Template"/> +<$data title=Output text="""\procedure testCreate() <$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"> - <$action-sendmessage $message="tm-edit-tiddler" $param=<>/> - -\end - -This example will use the base title defined in [[ActionCreateTiddlerWidget Template]]. - -It will create: "base", "base 1", "base 2" and so on, and navigate to this tiddler in draft mode. - -``` -\define testCreate() -<$action-createtiddler $basetitle="base" $template="ActionCreateTiddlerWidget Template"> - <$action-sendmessage $message="tm-edit-tiddler" $param=<>/> + <$action-navigate $to=<>/> \end <$button actions=<> > Create Tiddler - -``` - -<$button actions=<> > -<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" text="$:/core/ui/SideBar/Recent"/> -Create Tiddler - - Clicking this button, will also open the Right sidebar: Recent tab +"""/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid index 632b71686..85cb8ade8 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget.tid @@ -1,6 +1,6 @@ caption: action-createtiddler created: 20161020152745942 -modified: 20230115084716196 +modified: 20240602153213986 tags: Widgets ActionWidgets title: ActionCreateTiddlerWidget type: text/vnd.tiddlywiki @@ -37,37 +37,6 @@ The ''action-createtiddler'' widget is invisible. ! Examples -<<< -<$macrocall $name='wikitext-example-without-html' src={{ActionCreateTiddlerWidget Example}}/> -<<< - ---- - -<<< -<$transclude tiddler="ActionCreateTiddlerWidget Example 1" mode=block/> -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 2}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 3}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 4}} -<<< - ---- - -<<< -{{ActionCreateTiddlerWidget Example 5}} -<<< - +<$list filter="[prefix[ActionCreateTiddlerWidget Example]]"> +<$transclude/> + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid index 2a431ead9..728ed4576 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid @@ -1,14 +1,24 @@ created: 20161020153426686 -modified: 20211113011019510 +modified: 20240602160452171 tags: ActionCreateTiddlerWidget title: ActionCreateTiddlerWidget Example type: text/vnd.tiddlywiki +<$testcase> +<$data title=Description text="Create a new page control button"/> +<$data title=Narrative text="""Use the $action-createtiddler widget to create and open a new, non-functional page control button tiddler"""/> +<$data title=Output text="""\procedure testCreate() +<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}> + <$action-navigate $to=<>/> + +\end + +{{$:/core/ui/SideBarSegments/page-controls}} + Caption for new button: <$edit-text tiddler="$:/state/new-button-caption" tag="input" default=""/> -<$button> -<$action-createtiddler $basetitle="Homemade Button" tags="$:/tags/PageControls" text={{$:/state/new-button-caption}}> -<$action-navigate $to=<>/> - -Create a new non-functional page control button and open the tiddler - \ No newline at end of file +<$button actions=<> > +Create Tiddler +"""/> +<$data title="$:/state/new-button-caption" text="button text "/> + \ No newline at end of file