From 3a7778fe9d1a0d4ac5cf3f618edf1eaf5a7085ee Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 15 Feb 2024 22:08:02 +0100 Subject: [PATCH 01/77] vanilla/base - add 4 text-input flexbox utility classes --- themes/tiddlywiki/vanilla/base.tid | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 1ca85c6a7..45aff5971 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -372,6 +372,24 @@ Table utility classes padding: 3px; } +/* Labeled text input, where input is max width */ +.tc-labeled-input-wrapper { + display: flex; + padding: 6px 0; +} + +.tc-align-right { + text-align: right; +} + +.tc-fixed-label { + flex: auto; +} + +.tc-fluid-input { + flex: 20; +} + /* CSV parser plugin */ From d5e3c2c26c3bea4bf696d6338c7691db91605b26 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 15 Feb 2024 22:08:39 +0100 Subject: [PATCH 02/77] WIP dumpvariables - add new filtered version. var names need improvement --- core/wiki/macros/dumpvariables.tid | 118 +++++++++++++++++++++++++++-- 1 file changed, 111 insertions(+), 7 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 0ab9e2001..72bca855a 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -1,14 +1,118 @@ title: $:/core/macros/dumpvariables tags: $:/tags/Macro -\define dumpvariables() \whitespace trim + +\procedure dumpvariables() \end + + +\procedure toggleState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +\end + +\procedure toggleInfoState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[] }}} /> +\end + +\procedure clearStatesButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $filter="[prefix] [prefix[$:/temp]]"/> + {{$:/core/images/fold-all-button}} + +\end + +\procedure clearSearchButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + +\procedure expandAllStatesButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$list filter="[variables[]] +[search::some]" variable="varname"> + <$action-setfield $tiddler=<> text="yes"/> + + {{$:/core/images/unfold-all-button}} + +\end + +\procedure info() + +
+ <$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] + :filter[!prefix[$:/temp]] + :filter[!prefix[$:/state]] + -[[$:/config/OriginalTiddlerPaths]] + :filter[!type[application/javascript]] + -[[$:/core]] + :filter[!plugin-type[plugin]]" + > + <$link class="tc-small-gap-left"/>
+ +
+\end + + + + +\procedure filtered-dumpvariables(subfilter) +\procedure search() :/temp/search/dump +\procedure sub-search() :/temp/search/sub-dump +\procedure state() :/state/search/var/ + +\function getSearchText() [get[text]] + +\function getSubSearch() [] [] [] +[join[/]] +\function getSubSearchText() [get[text]] + +\function getVarState() [addsuffix] [] +[join[]] +\function getToggleInfoState() [addsuffix] + +<$text text="Filtered Variable Dump -- "/><> + +<$edit-text tiddler=<> tag=input/> <> <> <> + +<$list filter="[variables[]] +[search::some]" variable="varname"> +
+ <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> + <% if [get[text]match[yes]] %> + {{$:/core/images/down-arrow}} + <% else %> + {{$:/core/images/right-arrow}} + <% endif %> + <$text text=<>/> + <$text text={{{ [getvariable[]length[]] "Chars" +[join[ ]] }}}/> + + + <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap-left" disabledX={{{[is[blank]then[yes]else[no]] }}}> + <% if [get[text]match[yes]] %> + {{$:/core/images/down-arrow}} + <% else %> + {{$:/core/images/right-arrow}} + <% endif %> + + <% if [get[text]match[yes]] %> +
+ Search text, tags: + <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> +
+ <> + <% endif %> + <$codeblock code={{{ [getvariable[]] }}}/> + <% endif %> +
+ +
+\end From 409345b1262e6f10648d54bdf5df5830b6fc4216 Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 16 Feb 2024 16:20:48 +0100 Subject: [PATCH 03/77] WIP improve dumpvariables macro, add search-variables macro --- core/wiki/macros/dumpvariables.tid | 49 ++++++++++--------- .../$__core_ui_AdvancedSearch_Variables.tid | 8 +++ .../tiddlers/macros/DumpVariablesMacro.tid | 9 ++-- .../macros/examples/dumpvariables.tid | 18 ++++--- .../tiddlers/test-search-variables.tid | 7 +++ 5 files changed, 59 insertions(+), 32 deletions(-) create mode 100644 editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid create mode 100644 editions/tw5.com/tiddlers/test-search-variables.tid diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 72bca855a..5db23a919 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -3,9 +3,10 @@ tags: $:/tags/Macro \whitespace trim -\procedure dumpvariables() + +\procedure dumpvariables(subfilter:"[variables[]]")
    - <$list filter="[variables[]]" variable="varname"> + <$list filter="[variables[]] :and[subfilter]" variable="varname">
  • <$text text=<>/>:
    <$codeblock code={{{ [getvariable[]] }}}/> @@ -14,38 +15,45 @@ tags: $:/tags/Macro
\end + +\procedure search-variables(subfilter:"[]") + +\procedure search() $:/temp/search/dump +\procedure sub-search() $:/temp/search/sub-dump +\procedure state() $:/state/search/var/ \procedure toggleState() <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> -\end +\end toggleState \procedure toggleInfoState() <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> <$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[] }}} /> -\end +\end toggleInfoState \procedure clearStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-deletetiddler $filter="[prefix] [prefix[$:/temp]]"/> {{$:/core/images/fold-all-button}} -\end +\end clearStatesButton \procedure clearSearchButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} -\end +\end clearSearchButton \procedure expandAllStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$list filter="[variables[]] +[search::some]" variable="varname"> + <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> + <$list filter="[variables[]] +[search::some] :filter[subfilter]" variable="varname"> <$action-setfield $tiddler=<> text="yes"/> {{$:/core/images/unfold-all-button}} -\end +\end expandAllStatesButton \procedure info() @@ -61,15 +69,8 @@ tags: $:/tags/Macro <$link class="tc-small-gap-left"/>
-\end +\end info - - - -\procedure filtered-dumpvariables(subfilter) -\procedure search() :/temp/search/dump -\procedure sub-search() :/temp/search/sub-dump -\procedure state() :/state/search/var/ \function getSearchText() [get[text]] @@ -79,12 +80,16 @@ tags: $:/tags/Macro \function getVarState() [addsuffix] [] +[join[]] \function getToggleInfoState() [addsuffix] -<$text text="Filtered Variable Dump -- "/><> +<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%><><%endif%> +<$edit-text tiddler=<> tag=input/> <> +<% if [get[text]match[yes]] %> + <> +<% else %> + <> +<% endif %> -<$edit-text tiddler=<> tag=input/> <> <> <> - -<$list filter="[variables[]] +[search::some]" variable="varname"> -
+<$list filter="[variables[]] +[search::some] :filter[subfilter]" variable="varname"> +
<$button actions=<> class="tc-small-gap-left tc-btn-invisible"> <% if [get[text]match[yes]] %> {{$:/core/images/down-arrow}} @@ -92,7 +97,7 @@ tags: $:/tags/Macro {{$:/core/images/right-arrow}} <% endif %> <$text text=<>/> - <$text text={{{ [getvariable[]length[]] "Chars" +[join[ ]] }}}/> + <$text text={{{ "#" [getvariable[]length[]] +[join[ ]] }}}/> <% if [get[text]match[yes]] %> diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid new file mode 100644 index 000000000..31956e4f8 --- /dev/null +++ b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid @@ -0,0 +1,8 @@ +caption: Variables +created: 20240215233810357 +modified: 20240216005108246 +tags: $:/tags/AdvancedSearch +title: $:/core/ui/AdvancedSearch/Variables +type: text/vnd.tiddlywiki + +<> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid b/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid index 563efffda..2a985827e 100644 --- a/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid +++ b/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid @@ -1,9 +1,9 @@ +caption: dumpvariables created: 20140908104107181 -modified: 20150221151454000 +modified: 20240216150310916 tags: Macros [[Core Macros]] title: dumpvariables Macro type: text/vnd.tiddlywiki -caption: dumpvariables The <<.def dumpvariables>> [[macro|Macros]] returns a table showing the values of all [[variables|Variables]] and [[macros|Macros]] that exist at that position in the [[widget tree|Widgets]]. @@ -13,6 +13,7 @@ Placeholders are replaced with values in the normal way, but using the default v !! Parameters -(none) +; subfilter +: This parameter limits the number of variables that are listed -<<.macro-examples "dumpvariables">> +!!! <<.macro-examples "dumpvariables">> diff --git a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid index 2412368c2..e1338b223 100644 --- a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid +++ b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid @@ -1,14 +1,20 @@ created: 20150221151358000 -modified: 20150221151415000 +modified: 20240216150546249 tags: [[dumpvariables Macro]] [[Macro Examples]] title: dumpvariables Macro (Examples) type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" -eg="""<$set name="EXAMPLE" value="123.$(EXAMPLE2)$.789"> -<$set name="EXAMPLE2" value="456"> +eg="""<$let EXAMPLE="123" > +<> +"""/> + +<$macrocall $name=".example" n="2" +eg="""<>"""/> + +The following list will be very long. It shows all variables known within this tiddler. Using the macro in a different context. Eg: the sidebar, variables will have different values. + +<$macrocall $name=".example" n="3" +eg="""<>"""/> -<> - -"""/> diff --git a/editions/tw5.com/tiddlers/test-search-variables.tid b/editions/tw5.com/tiddlers/test-search-variables.tid new file mode 100644 index 000000000..f3747e6a9 --- /dev/null +++ b/editions/tw5.com/tiddlers/test-search-variables.tid @@ -0,0 +1,7 @@ +created: 20240216004004135 +modified: 20240216010811339 +tags: +title: test-search-variables +type: text/vnd.tiddlywiki + +<> \ No newline at end of file From 0b69e88b2940e5e76ecb54b80442ebfea781182a Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 16 Feb 2024 21:36:15 +0100 Subject: [PATCH 04/77] search-variables -- fix filter using subfiter parameter --- core/wiki/macros/dumpvariables.tid | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 5db23a919..a4a73a3e3 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -16,7 +16,7 @@ tags: $:/tags/Macro \end -\procedure search-variables(subfilter:"[]") +\procedure search-variables(subfilter:"[variables[]]") \procedure search() $:/temp/search/dump \procedure sub-search() $:/temp/search/sub-dump @@ -56,7 +56,6 @@ tags: $:/tags/Macro \end expandAllStatesButton \procedure info() -
<$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] :filter[!prefix[$:/temp]] @@ -71,7 +70,6 @@ tags: $:/tags/Macro
\end info - \function getSearchText() [get[text]] \function getSubSearch() [] [] [] +[join[/]] @@ -80,7 +78,7 @@ tags: $:/tags/Macro \function getVarState() [addsuffix] [] +[join[]] \function getToggleInfoState() [addsuffix] -<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%><><%endif%> +<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%><><%endif%> <$edit-text tiddler=<> tag=input/> <> <% if [get[text]match[yes]] %> <> @@ -88,7 +86,8 @@ tags: $:/tags/Macro <> <% endif %> -<$list filter="[variables[]] +[search::some] :filter[subfilter]" variable="varname"> + +<$list filter="[variables[]] +[search::some] :and[subfilter]" variable="varname">
<$button actions=<> class="tc-small-gap-left tc-btn-invisible"> <% if [get[text]match[yes]] %> From 357e6f5ef3c439b81c3168f1a76ae26fd9723287 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 21 Feb 2024 17:39:00 +0100 Subject: [PATCH 05/77] WIP dumpvariables, search-variables seem to work now using the format-operator --- core/modules/filters/format/variable.js | 33 ++++++++++ core/modules/filters/getvariable.js | 10 +++- core/modules/filters/variables.js | 45 +++++++++++++- core/modules/utils/utils.js | 60 +++++++++++++++++++ core/modules/widgets/widget.js | 2 + core/wiki/macros/dumpvariables.tid | 50 +++++++++++----- editions/tw5.com/tiddlers/VariableFormat.tid | 20 +++++++ .../tiddlers/filters/examples/variables.tid | 8 ++- editions/tw5.com/tiddlers/filters/format.tid | 3 +- .../tw5.com/tiddlers/filters/getvariable.tid | 22 +++++-- .../tw5.com/tiddlers/filters/variables.tid | 37 +++++++++--- .../tiddlers/macros/DumpVariablesMacro.tid | 13 +++- .../macros/examples/dumpvariables.tid | 11 +++- 13 files changed, 272 insertions(+), 42 deletions(-) create mode 100644 core/modules/filters/format/variable.js create mode 100644 editions/tw5.com/tiddlers/VariableFormat.tid diff --git a/core/modules/filters/format/variable.js b/core/modules/filters/format/variable.js new file mode 100644 index 000000000..ab23154a0 --- /dev/null +++ b/core/modules/filters/format/variable.js @@ -0,0 +1,33 @@ +/*\ +title: $:/core/modules/filters/format/variable.js +type: application/javascript +module-type: formatfilteroperator +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.variable = function(source,operand,options) { + var results = [], + widget = options.widget, + variable, + varInfo, + variableTemplate = (operand.length >=6 && operand) ? operand : "$type$ $name$($params$) $firstLine$"; + + source(function(tiddler,title) { + varInfo = widget.getVariableInfo(title, {}); + varInfo.name = title; + if(title && title.length) { + variable = $tw.utils.formatVariableString(variableTemplate, varInfo); + results.push(variable); + } + }); + return results; +}; + +})(); diff --git a/core/modules/filters/getvariable.js b/core/modules/filters/getvariable.js index 43451abed..eb576f28d 100644 --- a/core/modules/filters/getvariable.js +++ b/core/modules/filters/getvariable.js @@ -1,3 +1,5 @@ +const { widget } = require("../widgets/widget"); + /*\ title: $:/core/modules/filters/getvariable.js type: application/javascript @@ -16,9 +18,13 @@ Filter operator for replacing input values by the value of the variable with the Export our filter function */ exports.getvariable = function(source,operator,options) { - var results = []; + var results = [], + operand = operator.operand, + widget = options.widget; source(function(tiddler,title) { - results.push(options.widget.getVariable(title) || ""); + var variable = widget.getVariableInfo(title, {}), + text = (operand === "value") ? variable.srcVariable.value : variable.text; + results.push(text || ""); }); return results; }; diff --git a/core/modules/filters/variables.js b/core/modules/filters/variables.js index c92b780d2..dfed2234c 100644 --- a/core/modules/filters/variables.js +++ b/core/modules/filters/variables.js @@ -16,17 +16,56 @@ Filter operator for returning the names of the active variables Export our filter function */ exports.variables = function(source,operator,options) { + var operands = []; + $tw.utils.each(operator.operands,function(operand,index){ + operands.push({ + name: (index + 1).toString(), + value: operand + }); + }); var names = [], - widget = options.widget; + sort, + widget = options.widget, + included = (operands[0].value) ? operands[0].value : "var fn proc macro widget"; + + // variableTemplate = (operands.length > 1 && operands[1]) ? operands[1].value : "$type$ $name$($params$) $firstLine$"; + + switch(operator.suffix) { + case "raw": + sort = false; + break; + case "sort": // the fallthrough is intentional. "sort" is default + default: + sort = true; + break; + } while(widget && !widget.hasOwnProperty("variables")) { widget = widget.parentWidget; } if(widget && widget.variables) { for(var variable in widget.variables) { - names.push(variable); + var varInfo = widget.getVariableInfo(variable, {}); + + // varInfo.name = variable; + // variable = $tw.utils.formatVariableString(variableTemplate, varInfo); + + if ( ((included.indexOf("fn") !== -1) && varInfo.srcVariable.isFunctionDefinition ) || + ((included.indexOf("proc") !== -1) && varInfo.srcVariable.isProcedureDefinition ) || + ((included.indexOf("macro") !== -1) && varInfo.srcVariable.isMacroDefinition ) || + ((included.indexOf("widget") !== -1) && varInfo.srcVariable.isWidgetDefinition ) ) + { + names.push(variable); + } else if ((included.indexOf("var") !== -1) && !varInfo.srcVariable.isFunctionDefinition && !varInfo.srcVariable.isProcedureDefinition && !varInfo.srcVariable.isMacroDefinition && !varInfo.srcVariable.isWidgetDefinition ) + { + names.push(variable); + } } } - return names.sort(); + if (sort) { + return names.sort(); + } else { + return names; + } }; })(); diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 9fffb1714..b4bd7cf98 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -309,6 +309,66 @@ exports.slowInSlowOut = function(t) { return (1 - ((Math.cos(t * Math.PI) + 1) / 2)); }; +exports.formatVariableString = function(template,options) { + var name = options.name || "", + params = options.params || "", + firstLine = "", + os = options.srcVariable, + type = (os.isFunctionDefinition) ? "\\\\function" : (os.isMacroDefinition) ? "\\\\define" : + (os.isProcedureDefinition) ? "\\\\procedure" : (os.isWidgetDefinition) ? "\\\\widget" : "", + varType = (os.isFunctionDefinition) ? "fn" : (os.isMacroDefinition) ? "macro" : + (os.isProcedureDefinition) ? "proc" : (os.isWidgetDefinition) ? "widget" : "var"; + var result = "", + t = (!os.isFunctionDefinition && !os.isMacroDefinition && !os.isProcedureDefinition && !os.isWidgetDefinition) ? "$name$" : template, + matches = [ + [/^\$type\$/i, function() { + return (type) ? type : ""; + }], + [/^\$name\$/i, function() { + return name; + }], + [/^\$params\$/i, function() { + var elements = [], + paramString = ""; + if (params && params[0] && params[0].name) { + $tw.utils.each(params, function(p) { + elements.push(p.name + ((p.default) ? ':"' + p.default + '"' : "")); + }); + paramString = elements.join(", "); + } + // return (type) ? "(" + paramString + ")" : ""; + return (type) ? paramString : ""; + }], + [/^\$firstLine\$/i, function() { + var lines = os.value.split("\n"), + suffix = (lines.length > 1) ? "..." : ""; + return (os.isFunctionDefinition) ? lines[0].replace("\\", "\\\\") + suffix: ""; + }], + [/^\$varType\$/i, function() { + return varType; + }] + ]; + while(t.length){ + var matchString = ""; + $tw.utils.each(matches, function(m) { + var match = m[0].exec(t); + if(match) { + matchString = m[1].call(null,match); + t = t.substr(match[0].length); + return false; + } + }); + if(matchString) { + result += matchString; + } else { + result += t.charAt(0); + t = t.substr(1); + } + } + result = result.replace(/\\(.)/g,"$1"); + return result.trim(); +}; + exports.formatTitleString = function(template,options) { var base = options.base || "", separator = options.separator || "", diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index ea300ca0e..0ed115a5a 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -166,6 +166,8 @@ Widget.prototype.getVariableInfo = function(name,options) { }); resultList = this.wiki.filterTiddlers(value,this.makeFakeWidgetWithVariables(variables),options.source); value = resultList[0] || ""; + } else { + params = variable.params; } return { text: value, diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index a4a73a3e3..1b7ee7c41 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -1,22 +1,31 @@ title: $:/core/macros/dumpvariables -tags: $:/tags/Macro +tags: $:/tags/Global \whitespace trim +\procedure _initRawFilter() [variables:raw] +\procedure _initFilter() [variables] + +\function _f.filterString() [match[raw]then<_initRawFilter>else<_initFilter>] +\function _f.varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] +\function _f.formattedVar() [format:variable<_f.varFormat>] + -\procedure dumpvariables(subfilter:"[variables[]]") +\procedure dumpvariables(type sort:"sort" subfilter:"[[]]" format)
    - <$list filter="[variables[]] :and[subfilter]" variable="varname"> +
  • <>
  • + <$list filter="[subfilter<_f.filterString>] +[filter]" variable="varname">
  • - <$text text=<>/>:
    + <$text text=<<_f.formattedVar>>/>
    + <% if [<_f.formattedVar>prefix[\function]] %> + <$codeblock code={{{ [getvariable[value]] }}}/> + <% endif %> <$codeblock code={{{ [getvariable[]] }}}/>
\end - -\procedure search-variables(subfilter:"[variables[]]") \procedure search() $:/temp/search/dump \procedure sub-search() $:/temp/search/sub-dump @@ -28,7 +37,7 @@ tags: $:/tags/Macro \procedure toggleInfoState() <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> -<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[] }}} /> +<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$$params$]] }}} /> \end toggleInfoState \procedure clearStatesButton() @@ -48,7 +57,7 @@ tags: $:/tags/Macro \procedure expandAllStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> - <$list filter="[variables[]] +[search::some] :filter[subfilter]" variable="varname"> + <$list filter="[subfilter<_f.filterString>] +[search::some] +[filter]" variable="varname"> <$action-setfield $tiddler=<> text="yes"/> {{$:/core/images/unfold-all-button}} @@ -58,11 +67,13 @@ tags: $:/tags/Macro \procedure info()
<$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] + -[[$:/config/OriginalTiddlerPaths]] + -[[$:/HistoryList]] + -[[$:/StoryList]] + -[[$:/core]] + :filter[!type[application/javascript]] :filter[!prefix[$:/temp]] :filter[!prefix[$:/state]] - -[[$:/config/OriginalTiddlerPaths]] - :filter[!type[application/javascript]] - -[[$:/core]] :filter[!plugin-type[plugin]]" > <$link class="tc-small-gap-left"/>
@@ -78,7 +89,11 @@ tags: $:/tags/Macro \function getVarState() [addsuffix] [] +[join[]] \function getToggleInfoState() [addsuffix] -<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%><><%endif%> + +\procedure search-variables(type sort:"sort" subfilter:"[[]]" format) +\function _f.varFormat() [!is[blank]thenelse[$type$ $name$($params$) $firstLine$]] + +<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%>sort: <>, type:<><%endif%> <$edit-text tiddler=<> tag=input/> <> <% if [get[text]match[yes]] %> <> @@ -86,8 +101,8 @@ tags: $:/tags/Macro <> <% endif %> - -<$list filter="[variables[]] +[search::some] :and[subfilter]" variable="varname"> + +<$list filter="[subfilter<_f.filterString>] +[search::some] +[filter]" variable="varname">
<$button actions=<> class="tc-small-gap-left tc-btn-invisible"> <% if [get[text]match[yes]] %> @@ -95,8 +110,8 @@ tags: $:/tags/Macro <% else %> {{$:/core/images/right-arrow}} <% endif %> - <$text text=<>/> - <$text text={{{ "#" [getvariable[]length[]] +[join[ ]] }}}/> + <$text text=<<_f.formattedVar>>/> + <% if [get[text]match[yes]] %> @@ -114,6 +129,9 @@ tags: $:/tags/Macro
<> <% endif %> + <% if [prefix[\function]] %> + <$codeblock code={{{ [getvariable[value]] }}}/> + <% endif %> <$codeblock code={{{ [getvariable[]] }}}/> <% endif %>
diff --git a/editions/tw5.com/tiddlers/VariableFormat.tid b/editions/tw5.com/tiddlers/VariableFormat.tid new file mode 100644 index 000000000..691e3c04b --- /dev/null +++ b/editions/tw5.com/tiddlers/VariableFormat.tid @@ -0,0 +1,20 @@ +created: 20240219185725834 +modified: 20240221012350449 +tags: Features +title: VariableFormat +type: text/vnd.tiddlywiki + +<<.from-version "5.3.4">> + +Finding "self explaining" variable names for functions, procedures, widgets and macros is difficult. So if variables are listed with <<.mlink dumpvariables>>, <<.mlink search-variables>> or from the "Variables" tab in the $:/AdvancedSearch, it's not obvious ''how'' they work and how they are defined. + +The <<.olink variables>> operator returns all "visible" variables from the current context, depending on where the filter run is executed. The <<.olink getvariable>> allows us to return the "text" or the "value" of variables. But this information is not enough to get a good understanding of existing variables. + +So using <<.olink getvariables>> operator in combination with the <<.olink format>> operator we are able to improve information in variable listings. + +|Token |Substituted Value |h +|`$type$` |variabe type eg: `\function`, `\procedure` and so on | +|`$name$` |returns the name of the variable | +|`$params$` |returns a list of parameters, which are defined with functions, procedures ... | +|`$firstLine$` |returns the first line of the variable content-type as used by <<.olink getvariables>> | +|`$varType$` |returns `var`, `fn`, ` proc`, ` macro` or ` widget` which can be used with the <<.olink variables>> operator | diff --git a/editions/tw5.com/tiddlers/filters/examples/variables.tid b/editions/tw5.com/tiddlers/filters/examples/variables.tid index f4db9207f..ffcbcd7c7 100644 --- a/editions/tw5.com/tiddlers/filters/examples/variables.tid +++ b/editions/tw5.com/tiddlers/filters/examples/variables.tid @@ -1,7 +1,13 @@ created: 20190330100101453 -modified: 20190330100101453 +modified: 20240219184535837 tags: [[variables Operator]] [[Operator Examples]] title: variables Operator (Examples) type: text/vnd.tiddlywiki <<.operator-example 1 "[variables[]prefix[colour]]" "returns the names of any variables whose names start with ''colour''">> + +<<.operator-example 2 "[variables[fn]]" "returns the names of any variables which are defined as `\function`s">> + +<<.operator-example 3 "[variables[proc]]" "returns the names of any variables which are defined as `\procedure`s">> + +<<.tip """Also see the filter operator <<.olink format>> to find out about variable "title" formatting""">> diff --git a/editions/tw5.com/tiddlers/filters/format.tid b/editions/tw5.com/tiddlers/filters/format.tid index d62a82169..03a586327 100644 --- a/editions/tw5.com/tiddlers/filters/format.tid +++ b/editions/tw5.com/tiddlers/filters/format.tid @@ -1,6 +1,6 @@ caption: format created: 20201020100834443 -modified: 20220611104737314 +modified: 20240219201201466 op-input: a [[selection of titles|Title Selection]] op-output: input strings formatted according to the specified suffix <<.place B>> op-parameter: optional format string for the formats @@ -22,6 +22,7 @@ The suffix <<.place B>> is one of the following supported string formats: |^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored | |^`timestamp` |<<.from-version "5.3.0">> The input string is interpreted as number of milliseconds since the [[ECMAScript epoch|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps]], 1 January 1970, and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "[UTC]YYYY0MM0DD0hh0mm0ss0XXX") | |^`titlelist` |<<.from-version "5.2.0">> The input string wrapped in double square brackets if it contains a space. Appropriate for use in a [[title list|Title List]]. | +|^`variable` |<<.from-version "5.3.4">> The input string is interpreted as a variable name, which can be formatted using the VariableFormat. Defaults to `$type$ $name$($params$) $firstLine$`| Invalid input strings are dropped by the <<.op format>> operator. diff --git a/editions/tw5.com/tiddlers/filters/getvariable.tid b/editions/tw5.com/tiddlers/filters/getvariable.tid index 13421988b..76f5af6b9 100644 --- a/editions/tw5.com/tiddlers/filters/getvariable.tid +++ b/editions/tw5.com/tiddlers/filters/getvariable.tid @@ -1,12 +1,13 @@ +caption: getvariable created: 20190330100101453 -modified: 20190330100101453 +modified: 20240219183835439 +op-input: a selection of variable names +op-output: the values of each of the variables named in the input titles (or blank if the variable is not defined) +op-parameter: <<.from-version "5.3.4">> defaults to: "text". optional: "value". Content type <<.param T>> of the varible content that should be returned +op-purpose: select all values of variables named in the input titles tags: [[Filter Operators]] [[Special Operators]] title: getvariable Operator -caption: getvariable -op-purpose: select all values of variables named in the input titles -op-input: a selection of variable names -op-parameter: ignored -op-output: the values of each of the variables named in the input titles (or blank if the variable is not defined) +type: text/vnd.tiddlywiki <<.from-version "5.1.20">> The usual way to retrieve a variable value within a filter is with the angle brackets notation. For example, `[]` will retrieve the value of the variable called `currentTiddler`. @@ -14,4 +15,13 @@ The `getvariable` filter operator provides an alternative way to retrieve a vari The advantage of `getvariable` is that it makes it possible to work with variables whose name is computed, and not known in advance. For example, `[getvariable[]]` gets the value of the variable whose name is given in the variable `myvariable`. +''Content Type:'' <<.from-version "5.3.4">> + +The Prameter <<.param T>> by default is "text". Variables, that are defined as eg: `\function`s have two useful content types: + +* ''text'' ... contains the wikified text of the filter expression +* ''value'' ... contains the definition string + +For any other variable type "text" and "value" are the same thing. + <<.operator-examples "getvariable">> diff --git a/editions/tw5.com/tiddlers/filters/variables.tid b/editions/tw5.com/tiddlers/filters/variables.tid index d1c6b08a8..f123520a7 100644 --- a/editions/tw5.com/tiddlers/filters/variables.tid +++ b/editions/tw5.com/tiddlers/filters/variables.tid @@ -1,16 +1,37 @@ +caption: variables created: 20190330100101453 -modified: 20190330100101453 +modified: 20240219185349859 +op-input: ignored +op-output: the names of all the actively defined variables +op-parameter: <<.from-version "5.3.4">> whitespace separated list of variable-types +op-parameter-name: T +op-purpose: select the names of all the actively defined variables +op-suffix: <<.from-version "5.3.4">> deafults to: "sort", optional: "raw", see more details below +op-suffix-name: S tags: [[Filter Operators]] [[Special Operators]] [[Selection Constructors]] title: variables Operator type: text/vnd.tiddlywiki -caption: variables -op-purpose: select the names of all the actively defined variables -op-input: ignored -op-parameter: none -op-output: the names of all the actively defined variables -<<.from-version "5.1.20">> The primary purpose of the `variables` operator is to implement the [[dumpvariables Macro]]: +<<.from-version "5.1.20">> The primary purpose of the `variables` operator is to implement the <<.mlink dumpvariables>> or the <<.mlink serach-variables>> macros. + +`[variables:[]]` + +''Possible Suffixes: <<.place S>>:'' <<.from-version "5.3.4">> + +* ''sort'' (default): By default the returned list is alphabetically sorted +* ''raw'': The variable list will be returned as created. The variables "near" the filter run will show up first. So if variables are defined in the tiddler, where the <<.mlink dumpvariables>> or <<.mlink search-variables>> macros are executed, they will be listed first. + +''Parameters <<.place T>>:'' <<.from-version "5.3.4">> + +The parameters <<.place T>> allow a "whitespace separated" list of variable codes that should be listed + +* Default is all: `fn, var, proc, macro, widget` + +* ''fn'' ... will only show variables defined as functions eg: `\function test-01()` +* ''var'' ... will only show standard variables defined with eg: `<$let test="test">...` +* ''proc'' ... will only show variables defined as procedures eg: `\procedure test-02()` +* ''macro'' ... will only show variables defined as macros eg: `\define test-macro()` +* ''widgets'' ... will only show variables defined as widgets eg: `\widget my-widget()` -<$codeblock code={{$:/core/macros/dumpvariables}}/> <<.operator-examples "variables">> diff --git a/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid b/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid index 2a985827e..66d8e53ae 100644 --- a/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid +++ b/editions/tw5.com/tiddlers/macros/DumpVariablesMacro.tid @@ -1,6 +1,6 @@ caption: dumpvariables created: 20140908104107181 -modified: 20240216150310916 +modified: 20240221005326328 tags: Macros [[Core Macros]] title: dumpvariables Macro type: text/vnd.tiddlywiki @@ -13,7 +13,16 @@ Placeholders are replaced with values in the normal way, but using the default v !! Parameters +; type +: If type is empty all variable types are shown: `fn, var, proc, macro, widget`. Using the type parameter will reduce the list. + +; raw +: Is used to allow the <<.olink variables>> to return a raw list. By default the list is alphabetically sorted. + ; subfilter -: This parameter limits the number of variables that are listed +: This parameter limits the number of variables that are listed eg: `subfilter:"[search::some[sort .attr]]" ` + +; format +: Format the output string using the VariableFormat. Defaults to `$type$ $name$($params$) $firstLine$`. !!! <<.macro-examples "dumpvariables">> diff --git a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid index e1338b223..e9728cb2d 100644 --- a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid +++ b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid @@ -1,20 +1,25 @@ created: 20150221151358000 -modified: 20240216150546249 +modified: 20240220015920165 tags: [[dumpvariables Macro]] [[Macro Examples]] title: dumpvariables Macro (Examples) type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" eg="""<$let EXAMPLE="123" > -<> +<> """/> <$macrocall $name=".example" n="2" eg="""<>"""/> -The following list will be very long. It shows all variables known within this tiddler. Using the macro in a different context. Eg: the sidebar, variables will have different values. +Listing only specific varibles can be achieved using the <<.olink search>> operator as a subfilter <$macrocall $name=".example" n="3" +eg="""<>"""/> + +The following list will be very long. It shows all variables known within this tiddler. Using the macro in a different context. Eg: the sidebar, variables will have different values. + +<$macrocall $name=".example" n="4" eg="""<>"""/> From 51f6e02ab0f40c4f5dae3c7fac47161f99be6735 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 22 Feb 2024 14:51:58 +0100 Subject: [PATCH 06/77] docs: explain how to search for specific variables --- .../tiddlers/macros/examples/dumpvariables.tid | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid index e9728cb2d..35e96b576 100644 --- a/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid +++ b/editions/tw5.com/tiddlers/macros/examples/dumpvariables.tid @@ -1,21 +1,25 @@ created: 20150221151358000 -modified: 20240220015920165 +modified: 20240221165833692 tags: [[dumpvariables Macro]] [[Macro Examples]] title: dumpvariables Macro (Examples) type: text/vnd.tiddlywiki +The following example will list all variables that contain the word "example" in uppercase ''and'' also lowercase, due to the default setting of the <<.olink search>> operator. + <$macrocall $name=".example" n="1" eg="""<$let EXAMPLE="123" > <> """/> -<$macrocall $name=".example" n="2" -eg="""<>"""/> - Listing only specific varibles can be achieved using the <<.olink search>> operator as a subfilter +<$macrocall $name=".example" n="2" +eg="""<$let EXAMPLE="123" > +<> +"""/> + <$macrocall $name=".example" n="3" -eg="""<>"""/> +eg="""<>"""/> The following list will be very long. It shows all variables known within this tiddler. Using the macro in a different context. Eg: the sidebar, variables will have different values. From c072d41eb8b2704436ed04cd36f039791a856f35 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 22 Feb 2024 19:40:38 +0100 Subject: [PATCH 07/77] variables.js -- set default sort name to "alphabetical" --- core/modules/filters/variables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/variables.js b/core/modules/filters/variables.js index dfed2234c..723f10347 100644 --- a/core/modules/filters/variables.js +++ b/core/modules/filters/variables.js @@ -34,7 +34,7 @@ exports.variables = function(source,operator,options) { case "raw": sort = false; break; - case "sort": // the fallthrough is intentional. "sort" is default + case "alphabetical": // the fallthrough is intentional. "alphabetical" is default default: sort = true; break; From beec9cb8e950d1bfd7747b3b2ab4a3a74d5f7f52 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 22 Feb 2024 19:41:21 +0100 Subject: [PATCH 08/77] dumpvariables, search-variable -- UI is feature complete now - styling needs improvement --- core/wiki/macros/dumpvariables.tid | 189 +++++++++++++++++++---------- 1 file changed, 123 insertions(+), 66 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 1b7ee7c41..33e5afe16 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -3,21 +3,32 @@ tags: $:/tags/Global \whitespace trim -\procedure _initRawFilter() [variables:raw] -\procedure _initFilter() [variables] + +\define DV-VAR-FILTER-OPTIONS() fn var proc macro widget +\define DV-TMP-FILTER-OPTIONS() $:/temp/varSearch/options +\define DV-TMP-SORT-OPTIONS() $:/temp/varSearch/sort -\function _f.filterString() [match[raw]then<_initRawFilter>else<_initFilter>] -\function _f.varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] -\function _f.formattedVar() [format:variable<_f.varFormat>] +\define DV-RAW-FILTER-STR() [variables:raw<_tf.dv-type>] +\define DV-FILTER-STR() [variables<_tf.dv-type>] + +\define DV-TMP-SEARCH() $:/temp/varSearch +\define DV-TMP-SEARCH-DETAILS() $:/temp/varSearch/details +\define DV-SEARCH-STATE() $:/state/varSearch + +\function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] +\function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] + + \procedure dumpvariables(type sort:"sort" subfilter:"[[]]" format) + +\function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]]
    -
  • <>
  • - <$list filter="[subfilter<_f.filterString>] +[filter]" variable="varname"> + <$list filter="[subfilter] +[filter]" variable="varname">
  • - <$text text=<<_f.formattedVar>>/>
    - <% if [<_f.formattedVar>prefix[\function]] %> + <$text text=<>/>
    + <% if [prefix[\function]] %> <$codeblock code={{{ [getvariable[value]] }}}/> <% endif %> <$codeblock code={{{ [getvariable[]] }}}/> @@ -26,108 +37,155 @@ tags: $:/tags/Global
\end + +\procedure dv-toggleState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +\end -\procedure search() $:/temp/search/dump -\procedure sub-search() $:/temp/search/sub-dump -\procedure state() $:/state/search/var/ +\procedure dv-toggleInfoState() +<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> + +<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} /> +\end -\procedure toggleState() -<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> -\end toggleState - -\procedure toggleInfoState() -<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> -<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$$params$]] }}} /> -\end toggleInfoState - -\procedure clearStatesButton() +\procedure dv-clearStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-deletetiddler $filter="[prefix] [prefix[$:/temp]]"/> + + <$action-deletetiddler $filter="[prefix] []"/> {{$:/core/images/fold-all-button}} -\end clearStatesButton +\end -\procedure clearSearchButton() +\procedure dv-clearSearchButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-deletetiddler $tiddler=<>/> + <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} -\end clearSearchButton +\end -\procedure expandAllStatesButton() +\procedure dv-expandAllStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> - <$list filter="[subfilter<_f.filterString>] +[search::some] +[filter]" variable="varname"> - <$action-setfield $tiddler=<> text="yes"/> + <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> + + <$list filter="[subfilter] +[search::some] +[filter]" variable="varname"> + <$action-setfield $tiddler=<> text="yes"/> {{$:/core/images/unfold-all-button}} -\end expandAllStatesButton +\end -\procedure info() +\procedure dv-info()
- <$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] + <$list filter="[all[tiddlers+shadows]] :filter[search:text,tags:words] -[[$:/config/OriginalTiddlerPaths]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/core]] :filter[!type[application/javascript]] - :filter[!prefix[$:/temp]] - :filter[!prefix[$:/state]] + :filter[!prefix[$:/temp/]] + :filter[!prefix[$:/state/]] :filter[!plugin-type[plugin]]" > <$link class="tc-small-gap-left"/>
-\end info +\end -\function getSearchText() [get[text]] +\procedure dv-filterOptions() + + +<$list filter="[enlist]" variable="option"> + <$checkbox tiddler=<> listField="text" checked=< +\end -\function getSubSearch() [] [] [] +[join[/]] -\function getSubSearchText() [get[text]] +\procedure dv-sortOptions() + + <$select tiddler=<> default="alphabetical"> + + + + +\end -\function getVarState() [addsuffix] [] +[join[]] -\function getToggleInfoState() [addsuffix] +\function tf.dv-tmpFilterOptions() [] [] +[join[/]] +\function tf.dv-tmpSortOptions() [] [] +[join[/]] - -\procedure search-variables(type sort:"sort" subfilter:"[[]]" format) -\function _f.varFormat() [!is[blank]thenelse[$type$ $name$($params$) $firstLine$]] +\function tf.dv-searchText() [] [] +[join[/]] +\function tf.dv-getSearchText() [get[text]] -<$text text="Search Variables - "/><%if [!match[$:/AdvancedSearch]]%>sort: <>, type:<><%endif%> -<$edit-text tiddler=<> tag=input/> <> -<% if [get[text]match[yes]] %> - <> -<% else %> - <> +\function tf.dv-detailsSearch() [] [] [] +[join[/]] +\function tf.dv-getDetailsSearchText() [get[text]] + +\function tf.dv-varState() [] [] [] +[join[/]] +\function tf.dv-toggleInfoState() [] [] +[join[/]] + + + + +\procedure search-variables(type sort subfilter:"[[]]" format) + +\function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] +\function _tf.dv-type() [!is[blank]then] :else[get[text]] +\function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] + +<% if [is[blank]] %> + <> <% endif %> - - -<$list filter="[subfilter<_f.filterString>] +[search::some] +[filter]" variable="varname"> +<% if [is[blank]] %> + <> +<% endif %> +
+ <% if [!match[$:/AdvancedSearch]] %> + <$text text={{$:/language/Search/Variables/Search}}/> + <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> + <%if [!is[blank]] %>type:<<_tf.dv-sort>><%endif%> + <% endif %> + <$edit-text tiddler=<> tag=input/> <> + <% if [get[text]match[yes]] %> + <> + <% else %> + <> + <% endif %> +
+<$list filter="[subfilter] +[search::some] +[filter]" variable="varname">
- <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> - <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> + <% if [get[text]match[yes]] %> {{$:/core/images/down-arrow}} <% else %> {{$:/core/images/right-arrow}} <% endif %> - <$text text=<<_f.formattedVar>>/> - + <$text text=<>/> + <% if [prefix[\function]] %> + <$text text={{{ [format:variable[$firstLine$]] }}}/> + <% endif %> - <% if [get[text]match[yes]] %> - <$button actions=<> class="tc-btn-invisible tc-small-gap-left" disabledX={{{[is[blank]then[yes]else[no]] }}}> - <% if [get[text]match[yes]] %> + <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap-left"> + <% if [get[text]match[yes]] %> {{$:/core/images/down-arrow}} <% else %> {{$:/core/images/right-arrow}} <% endif %> - <% if [get[text]match[yes]] %> + <% if [get[text]match[yes]] %>
- Search text, tags: - <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> + {{$:/language/Search/Variables/Search/Details}} + <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/>
- <> + <> <% endif %> <% if [prefix[\function]] %> <$codeblock code={{{ [getvariable[value]] }}}/> @@ -136,5 +194,4 @@ tags: $:/tags/Global <% endif %>
-
\end From 942c037c58506a1e8ff98aae3187619ac461fca3 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 22 Feb 2024 19:42:39 +0100 Subject: [PATCH 09/77] Search.multids -- add new core language text for AdvancedSearch Variables tab --- core/language/en-GB/Search.multids | 5 +++++ .../tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 2a57a6416..fbcf74720 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -18,3 +18,8 @@ Standard/Matches: //<> matches// System/Caption: System System/Hint: Search for system tiddlers System/Matches: //<> matches// +Variables/Caption: Variables +Variables/Hint: Filter global variables +Variables/Matches: //<> matches// +Variables/Search: Search Variables - +Variables/Search/Details: Search tiddler text, tags: \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid index 31956e4f8..e8c672940 100644 --- a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid +++ b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid @@ -1,8 +1,11 @@ -caption: Variables +caption: {{$:/language/Search/Variables/Caption}} created: 20240215233810357 modified: 20240216005108246 tags: $:/tags/AdvancedSearch +list-before: $:/core/ui/AdvancedSearch/Filter title: $:/core/ui/AdvancedSearch/Variables type: text/vnd.tiddlywiki +{{$:/language/Search/Variables/Hint}} + <> \ No newline at end of file From ac9b6b498c23a32a6446cd140019aeebba861472 Mon Sep 17 00:00:00 2001 From: pmario Date: Thu, 22 Feb 2024 19:54:04 +0100 Subject: [PATCH 10/77] dumpvariables - fix clear temp tiddler button --- core/wiki/macros/dumpvariables.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 33e5afe16..24ff7173a 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -51,14 +51,14 @@ tags: $:/tags/Global \procedure dv-clearStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-deletetiddler $filter="[prefix] []"/> + <$action-deletetiddler $filter="[prefix]"/> {{$:/core/images/fold-all-button}} \end \procedure dv-clearSearchButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-deletetiddler $tiddler=<>/> + <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end From fab815e12883f8e277bd0c0e7a359d4c578b8022 Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 23 Feb 2024 01:18:21 +0100 Subject: [PATCH 11/77] Search.multids -- add Type and Sort Option labels --- core/language/en-GB/Search.multids | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index fbcf74720..24e29f67c 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -22,4 +22,6 @@ Variables/Caption: Variables Variables/Hint: Filter global variables Variables/Matches: //<> matches// Variables/Search: Search Variables - -Variables/Search/Details: Search tiddler text, tags: \ No newline at end of file +Variables/Search/Details: Search tiddler text, tags: +Variables/Option/Type: Type: +Variables/Option/Sort: Sort: From 143315ed361f49828179feedfff6cfbc51788af0 Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 23 Feb 2024 01:19:15 +0100 Subject: [PATCH 12/77] dumpvariables, search-variables -- add Type, Sort labels, fix layout spacing --- core/wiki/macros/dumpvariables.tid | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 24ff7173a..9bbfc10e6 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -21,9 +21,11 @@ tags: $:/tags/Global -\procedure dumpvariables(type sort:"sort" subfilter:"[[]]" format) - +\procedure dumpvariables(type sort subfilter:"[[]]" format) + \function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] +\function _tf.dv-type() [] +\function _tf.dv-sort() []
    <$list filter="[subfilter] +[filter]" variable="varname">
  • @@ -98,27 +100,29 @@ tags: $:/tags/Global margin-right: .25em; } - + +{{$:/language/Search/Variables/Option/Type}} <$list filter="[enlist]" variable="option"> - <$checkbox tiddler=<> listField="text" checked=< \end \procedure dv-sortOptions() - - <$select tiddler=<> default="alphabetical"> + + {{$:/language/Search/Variables/Option/Sort}} + <$select tiddler=<> default="alphabetical" class="tc-tiny-gap-left"> \end -\function tf.dv-tmpFilterOptions() [] [] +[join[/]] +\function tf.dv-tmpTypeOptions() [] [] +[join[/]] \function tf.dv-tmpSortOptions() [] [] +[join[/]] \function tf.dv-searchText() [] [] +[join[/]] @@ -134,10 +138,10 @@ tags: $:/tags/Global \procedure search-variables(type sort subfilter:"[[]]" format) - + \function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] -\function _tf.dv-type() [!is[blank]then] :else[get[text]] -\function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] +\function _tf.dv-type() [!is[blank]then] :else[get[text]] +\function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] <% if [is[blank]] %> <> @@ -149,7 +153,7 @@ tags: $:/tags/Global <% if [!match[$:/AdvancedSearch]] %> <$text text={{$:/language/Search/Variables/Search}}/> <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> - <%if [!is[blank]] %>type:<<_tf.dv-sort>><%endif%> + <%if [!is[blank]] %>type:<<_tf.dv-type>><%endif%> <% endif %> <$edit-text tiddler=<> tag=input/> <> <% if [get[text]match[yes]] %> @@ -168,7 +172,7 @@ tags: $:/tags/Global <% endif %> <$text text=<>/> <% if [prefix[\function]] %> - <$text text={{{ [format:variable[$firstLine$]] }}}/> + <$text text={{{ [format:variable[$firstLine$]] }}}/> <% endif %> From 28237b3b4a00cbe73aa9a940c874c7751796f316 Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 23 Feb 2024 21:12:07 +0100 Subject: [PATCH 13/77] add test tiddlers --- .../tw5.com/tiddlers/dump-with-subfilter.tid | 13 ++++++++++++ .../search-variable-parameter-test.tid | 13 ++++++++++++ .../tw5.com/tiddlers/test-dumpvariables.tid | 9 ++++++++ .../tiddlers/test-search-variables.tid | 5 +++-- editions/tw5.com/tiddlers/test-widget.tid | 21 +++++++++++++++++++ 5 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 editions/tw5.com/tiddlers/dump-with-subfilter.tid create mode 100644 editions/tw5.com/tiddlers/search-variable-parameter-test.tid create mode 100644 editions/tw5.com/tiddlers/test-dumpvariables.tid create mode 100644 editions/tw5.com/tiddlers/test-widget.tid diff --git a/editions/tw5.com/tiddlers/dump-with-subfilter.tid b/editions/tw5.com/tiddlers/dump-with-subfilter.tid new file mode 100644 index 000000000..a449ddcf5 --- /dev/null +++ b/editions/tw5.com/tiddlers/dump-with-subfilter.tid @@ -0,0 +1,13 @@ +created: 20240218195424844 +modified: 20240223001316626 +tags: +title: dump-with-subfilter +type: text/vnd.tiddlywiki + +<> + +--- + +<> + + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/search-variable-parameter-test.tid b/editions/tw5.com/tiddlers/search-variable-parameter-test.tid new file mode 100644 index 000000000..35c80861b --- /dev/null +++ b/editions/tw5.com/tiddlers/search-variable-parameter-test.tid @@ -0,0 +1,13 @@ +created: 20240218173858951 +modified: 20240223200921450 +tags: +title: search-variable-parameter-test +type: text/vnd.tiddlywiki + +\procedure asdf() +<$let EXAMPLE="123" > +<> + +\end + +<> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/test-dumpvariables.tid b/editions/tw5.com/tiddlers/test-dumpvariables.tid new file mode 100644 index 000000000..aa5e321ba --- /dev/null +++ b/editions/tw5.com/tiddlers/test-dumpvariables.tid @@ -0,0 +1,9 @@ +created: 20240218202032583 +modified: 20240219180731963 +tags: +title: test-dumpvariables +type: text/vnd.tiddlywiki + +\procedure asdf(test:"hallo", x ) <> + +<> diff --git a/editions/tw5.com/tiddlers/test-search-variables.tid b/editions/tw5.com/tiddlers/test-search-variables.tid index f3747e6a9..c26365fc7 100644 --- a/editions/tw5.com/tiddlers/test-search-variables.tid +++ b/editions/tw5.com/tiddlers/test-search-variables.tid @@ -1,7 +1,8 @@ created: 20240216004004135 -modified: 20240216010811339 +modified: 20240223200900425 tags: title: test-search-variables type: text/vnd.tiddlywiki -<> \ No newline at end of file + +<> diff --git a/editions/tw5.com/tiddlers/test-widget.tid b/editions/tw5.com/tiddlers/test-widget.tid new file mode 100644 index 000000000..30f97c95d --- /dev/null +++ b/editions/tw5.com/tiddlers/test-widget.tid @@ -0,0 +1,21 @@ +created: 20240222140353499 +modified: 20240222142402534 +tags: +title: test-widget +type: text/vnd.tiddlywiki + +\widget $my.widget(one:'Jaguar') +<$text text=<>/> +<$slot $name="ts-raw"> + Whale + +\end + +<$my.widget one="Dingo"> + Crocodile + + +<$my.widget/> + +<> + From 12e22190f357b9e5de8228d2fc98e32e832c4325 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 22 Apr 2024 16:58:47 +0200 Subject: [PATCH 14/77] search-variables - add edit-text hints to language multids --- core/language/en-GB/Search.multids | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 24e29f67c..5a3835560 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -19,9 +19,16 @@ System/Caption: System System/Hint: Search for system tiddlers System/Matches: //<> matches// Variables/Caption: Variables +Variables/Clear: Clear +Variables/Exclude: Exclude: +Variables/Exclude/Hint: Filter +Variables/Exclude/Show: Show exclude input +Variables/Exclude/Hide: Hide exclude input +Variables/Filter: Filter: +Variables/Filter/Hint: Text Variables/Hint: Filter global variables Variables/Matches: //<> matches// -Variables/Search: Search Variables - +Variables/Search: Search Variables Variables/Search/Details: Search tiddler text, tags: Variables/Option/Type: Type: Variables/Option/Sort: Sort: From 7959ff46eb3ba6ed55db3ded9718e803551376f9 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 22 Apr 2024 17:01:18 +0200 Subject: [PATCH 15/77] add exclude text-input - works --- core/wiki/macros/dumpvariables.tid | 81 ++++++++++++++++++------------ 1 file changed, 50 insertions(+), 31 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 9bbfc10e6..3e2acbf85 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -12,9 +12,12 @@ tags: $:/tags/Global \define DV-FILTER-STR() [variables<_tf.dv-type>] \define DV-TMP-SEARCH() $:/temp/varSearch +\define DV-TMP-EXCLUDE() $:/temp/varExclude \define DV-TMP-SEARCH-DETAILS() $:/temp/varSearch/details \define DV-SEARCH-STATE() $:/state/varSearch +\define DV-TMP-EXCLUDE-SUBFILTER() [[]] + \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] \function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] @@ -65,6 +68,13 @@ tags: $:/tags/Global \end +\procedure dv-clearExcludeButton() +<$button class="tc-btn-invisible tc-tiny-gap-left"> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + \procedure dv-expandAllStatesButton() <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> @@ -128,6 +138,10 @@ tags: $:/tags/Global \function tf.dv-searchText() [] [] +[join[/]] \function tf.dv-getSearchText() [get[text]] +\function tf.dv-excludeText() [] [] +[join[/]] +\function tf.dv-getExcludeText() [get[text]else] +\function tf.dv-getExcludeText() [get[text]] + \function tf.dv-detailsSearch() [] [] [] +[join[/]] \function tf.dv-getDetailsSearchText() [get[text]] @@ -151,51 +165,56 @@ tags: $:/tags/Global <% endif %>
    <% if [!match[$:/AdvancedSearch]] %> - <$text text={{$:/language/Search/Variables/Search}}/> <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> <%if [!is[blank]] %>type:<<_tf.dv-type>><%endif%> <% endif %> - <$edit-text tiddler=<> tag=input/> <> + <$text text={{$:/language/Search/Variables/Filter}}/> + <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Filter/Hint}}/> <> <% if [get[text]match[yes]] %> <> <% else %> <> <% endif %> +
    + <$text text={{$:/language/Search/Variables/Exclude}}/> + <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Exclude/Hint}}/> <>
    -<$list filter="[subfilter] +[search::some] +[filter]" variable="varname"> -
    - <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> - <% if [get[text]match[yes]] %> - {{$:/core/images/down-arrow}} - <% else %> - {{$:/core/images/right-arrow}} - <% endif %> - <$text text=<>/> - <% if [prefix[\function]] %> - <$text text={{{ [format:variable[$firstLine$]] }}}/> - <% endif %> - - - <% if [get[text]match[yes]] %> - <$button actions=<> class="tc-btn-invisible tc-small-gap-left"> - <% if [get[text]match[yes]] %> +<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" variable="varname"> +
    + <$button actions=<> class="tc-small-gap-left tc-btn-invisible"> + <% if [get[text]match[yes]] %> {{$:/core/images/down-arrow}} <% else %> {{$:/core/images/right-arrow}} <% endif %> + <$text text=<>/> + <% if [prefix[\function]] %> + <$text text={{{ [format:variable[$firstLine$]] }}}/> + <% endif %> - <% if [get[text]match[yes]] %> -
    - {{$:/language/Search/Variables/Search/Details}} - <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> -
    - <> + + <% if [get[text]match[yes]] %> + <$button actions=<> class="tc-btn-invisible tc-small-gap-left"> + <% if [get[text]match[yes]] %> + {{$:/core/images/up-arrow}} + <% else %> + {{$:/core/images/advanced-search-button}} + <% endif %> + +
    + <% if [get[text]match[yes]] %> +
    + {{$:/language/Search/Variables/Search/Details}} + <$edit-text tiddler=<> tag=input class="tc-fluid-input tc-small-gap-left"/> +
    + <> + <% endif %> + <% if [prefix[\function]] %> + <$codeblock code={{{ [getvariable[value]] }}}/> + <% endif %> + <$codeblock code={{{ [getvariable[]] }}}/> +
    <% endif %> - <% if [prefix[\function]] %> - <$codeblock code={{{ [getvariable[value]] }}}/> - <% endif %> - <$codeblock code={{{ [getvariable[]] }}}/> - <% endif %> -
    +
    \end From 6c075832e32f4c338769281cfffb83dd9d7bcae4 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 22 Apr 2024 17:02:34 +0200 Subject: [PATCH 16/77] flexible-form template initial commit --- editions/tw5.com/tiddlers/flexible-form.tid | 209 ++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 editions/tw5.com/tiddlers/flexible-form.tid diff --git a/editions/tw5.com/tiddlers/flexible-form.tid b/editions/tw5.com/tiddlers/flexible-form.tid new file mode 100644 index 000000000..d7d317001 --- /dev/null +++ b/editions/tw5.com/tiddlers/flexible-form.tid @@ -0,0 +1,209 @@ +modified: 20240312123643000 +title: /core/template/flexible-form + +\parameters (sort, type) + +\whitespace trim + +\define FI-VAR-FILTER-OPTIONS() fn var proc macro widget + +\define FI-FOLDED() $:/temp/varFolded +\define FI-SEARCH() $:/temp/varSearch +\define FI-EXCLUDE() $:/temp/varExclude + +\function tf.fi-tmpTypeOptions() [] [] +[join[/]] +\function tf.fi-tmpSortOptions() [] [] +[join[/]] + +\function tf.fi-foldedState() [] [] +[join[/]] + +\function tf.fi-searchText() [] [] +[join[/]] +\function tf.fi-getSearchText() [get[text]] + +\function tf.fi-excludeText() [] [] +[join[/]] +\function tf.fi-getExcludeText() [get[text]] + +\procedure fi-clearSearchButton() +<$button class="tc-btn-invisible btn-x" tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Filter}] +[join[ ]] }$`> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + +\procedure fi-clearExcludeButton() +<$button class="tc-btn-invisible btn-y" tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Exclude}] +[join[ ]] }$`> + <$action-deletetiddler $tiddler=<>/> + {{$:/core/images/close-button}} + +\end + +\procedure fi-search-input-box() +<%if [!is[blank]] %> + sort:<<_tf.fi-sort>> +<%endif%> +<%if [!is[blank]] %> + type:<<_tf.fi-type>> +<%endif%> +<$text text={{$:/language/Search/Variables/Filter}}/> +<$edit-text tiddler=<> tag=input class="x-inp" placeholder="filter variables by name"/> <> +<% if [get[text]match[yes]] %> + <> +<% else %> + <> +<% endif %> +\end + +\procedure fi-exclude-input-box() +<$text text={{$:/language/Search/Variables/Exclude}}/> +<$edit-text tiddler=<> tag=input class="y-inp"/> <> +\end + +\function tf.fi-opt-class() "c" [
<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" variable="varname">
@@ -218,3 +219,67 @@ tags: $:/tags/Global
\end + + + + +\procedure lc-actionsXX() +<$action-setfield $tiddler="$:/temp/advancedsearch" text=<>/> +<$action-setfield $tiddler="$:/temp/advancedsearch/input" text=<>/> +<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/> +<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/> +\end + +\procedure lc-actions() +<$action-setfield $tiddler=<> text=<>/> +\end + +\procedure addVariableFilter() +<$action-sendmessage + $message="tm-new-tiddler" + tags="$:/tags/Variables/Exclude/Snippet" + description={{$:/language/Search/Variables/Exclude/Description}} + text=<> +/> + +<$action-deletetiddler + $tiddler=<> +/> +\end + +\procedure addNewVariableFilter() +
+<$button tag="a" actions=<> class="tc-tiddlylink"> + + <$text text={{$:/language/Search/Variables/Exclude/Save}}/> + + +\end + +\procedure variablesMorePopup() + +<$button popup=<> class="tc-btn-invisible"> +{{$:/core/images/down-arrow}} + + + +<$reveal state=<> type="popup" position="belowleft"> + <$let name="tv-show-missing-links" value="yes"> + <$linkcatcher actions=<> > +
+
+ <$macrocall $name="list-tagged-draggable" + tag="$:/tags/Variables/Exclude/Snippet" + subFilter="!is[draft]" + itemTemplate="$:/core/ui/AdvancedSearch/Variables/ItemTemplate" + /> + + + + <> +
+
+ + + +\end \ No newline at end of file From e976e90324dfb612058c3e966f8cafbf200b9b5e Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 24 Apr 2024 11:20:30 +0200 Subject: [PATCH 18/77] Wrap search-variables macro into DIV to set classes --- .../tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid index e8c672940..50f1de7e2 100644 --- a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid +++ b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid @@ -8,4 +8,6 @@ type: text/vnd.tiddlywiki {{$:/language/Search/Variables/Hint}} -<> \ No newline at end of file + \ No newline at end of file From 62fd440fed58b4901c81ceac393fb26e801a6394 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 24 Apr 2024 12:21:20 +0200 Subject: [PATCH 19/77] add edit-button to variables exclude filter dropdown + styles --- core/wiki/macros/dumpvariables.tid | 13 +++++-------- ..._ui_AdvancedSearch_Variables_ItemTemplate.tid | 16 ++++++++++++++++ themes/tiddlywiki/vanilla/base.tid | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 04e51eebf..29b4a0633 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -258,24 +258,21 @@ tags: $:/tags/Global \procedure variablesMorePopup() -<$button popup=<> class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} - + <$button popup=<> class="tc-btn-invisible"> + {{$:/core/images/down-arrow}} + -<$reveal state=<> type="popup" position="belowleft"> +<$reveal state=<> type="popup" position="below"> <$let name="tv-show-missing-links" value="yes"> <$linkcatcher actions=<> >
-
+
<$macrocall $name="list-tagged-draggable" tag="$:/tags/Variables/Exclude/Snippet" subFilter="!is[draft]" itemTemplate="$:/core/ui/AdvancedSearch/Variables/ItemTemplate" /> - - - <>
diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid new file mode 100644 index 000000000..e1febd401 --- /dev/null +++ b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid @@ -0,0 +1,16 @@ +title: $:/core/ui/AdvancedSearch/Variables/ItemTemplate + +\whitespace trim + +\procedure editSnippet() +<$action-sendmessage $message="tm-edit-tiddler" title=<> /> +\end + +<$link to={{!!text}} > + <$let tv-wikilinks="no"> + <$transclude field="description"/> + + +<$button actions=<> class="tc-btn-invisible tc-small-gap-left"> + {{$:/core/images/edit-button}} + diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 45aff5971..45f4ffde1 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1954,6 +1954,22 @@ html body.tc-body.tc-single-tiddler-window { text-decoration: none; } +.tc-block-dropdown-wrapper .tc-variables-dropdown { + position: relative; +} + +.tc-block-dropdown-wrapper .tc-variables-dropdown a { + display: inline-block; + width: 90%; +} + +.tc-block-dropdown-wrapper .tc-variables-dropdown svg { + height: .9rem; + width: .9rem; +} + + + .tc-search-results { padding: 0 7px 0 7px; } From 88f4794a612e48d0929be3462db99344a489b245 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 24 Apr 2024 12:42:59 +0200 Subject: [PATCH 20/77] move expand / fold all button into seearch header, add texts --- core/language/en-GB/Search.multids | 2 ++ core/wiki/macros/dumpvariables.tid | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 78a253820..01a3fcaa2 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -26,6 +26,8 @@ Variables/Exclude/Hint: Filter eg: [prefix[.]] Variables/Exclude/Save: Create / Save Exclude Filter Variables/Exclude/Show: Show exclude input Variables/Exclude/Description: EDIT ME - Description is shown in the dropdown +Variables/ExpandAll: Expand All: +Variables/FoldAll: Fold All: Variables/Filter: Filter: Variables/Filter/Hint: Text eg: .attr Variables/Hint: Filter global variables diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 29b4a0633..d3184a427 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -52,6 +52,8 @@ tags: $:/tags/Global \end \procedure dv-clearStatesButton() +| +{{$:/language/Search/Variables/FoldAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-deletetiddler $filter="[prefix]"/> @@ -67,13 +69,15 @@ tags: $:/tags/Global \end \procedure dv-clearExcludeButton() -<$button class="tc-btn-invisible tc-tiny-gap-left"> +<$button class="tc-btn-invisible"> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end \procedure dv-expandAllStatesButton() +| +{{$:/language/Search/Variables/ExpandAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> @@ -160,6 +164,13 @@ tags: $:/tags/Global <% if [is[blank]] %> <> <% endif %> + +<% if [get[text]match[yes]] %> + <> +<% else %> + <> +<% endif %> +
<% if [!match[$:/AdvancedSearch]] %> <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> @@ -167,11 +178,6 @@ tags: $:/tags/Global <% endif %> <$text text={{$:/language/Search/Variables/Filter}}/> <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Filter/Hint}}/> <> - <% if [get[text]match[yes]] %> - <> - <% else %> - <> - <% endif %>
<$text text={{$:/language/Search/Variables/Exclude}}/> <$edit-text tiddler=<> tag=input class="tc-tiny-gap" placeholder={{$:/language/Search/Variables/Exclude/Hint}}/> From c1aea6525201aa498057f81297d37c727c41e7b8 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 24 Apr 2024 17:11:47 +0200 Subject: [PATCH 21/77] search-variables works -- dumpvariables uses outdated text-substitution --- core/language/en-GB/Search.multids | 2 +- core/wiki/macros/dumpvariables.tid | 236 +++++++++++++----- .../tw5.com/tiddlers/flexible-form-backup.tid | 112 +++++++++ .../tw5.com/tiddlers/flexible-form-styles.tid | 103 ++++++++ themes/tiddlywiki/vanilla/base.tid | 11 +- 5 files changed, 401 insertions(+), 63 deletions(-) create mode 100644 editions/tw5.com/tiddlers/flexible-form-backup.tid create mode 100644 editions/tw5.com/tiddlers/flexible-form-styles.tid diff --git a/core/language/en-GB/Search.multids b/core/language/en-GB/Search.multids index 01a3fcaa2..899057847 100644 --- a/core/language/en-GB/Search.multids +++ b/core/language/en-GB/Search.multids @@ -28,7 +28,7 @@ Variables/Exclude/Show: Show exclude input Variables/Exclude/Description: EDIT ME - Description is shown in the dropdown Variables/ExpandAll: Expand All: Variables/FoldAll: Fold All: -Variables/Filter: Filter: +Variables/Filter: Search: Variables/Filter/Hint: Text eg: .attr Variables/Hint: Filter global variables Variables/Matches: //<> matches// diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index d3184a427..4b6348c32 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -4,25 +4,32 @@ tags: $:/tags/Global \whitespace trim -\define DV-VAR-FILTER-OPTIONS() fn var proc macro widget -\define DV-TMP-FILTER-OPTIONS() $:/temp/varSearch/options -\define DV-TMP-SORT-OPTIONS() $:/temp/varSearch/sort +\procedure DV-VAR-FILTER-OPTIONS() fn var proc macro widget +\procedure DV-FILTER-OPTIONS() $:/temp/varSearch/options +\procedure DV-SORT-OPTIONS() $:/temp/varSearch/sort -\define DV-RAW-FILTER-STR() [variables:raw<_tf.dv-type>] -\define DV-FILTER-STR() [variables<_tf.dv-type>] + +\procedure DV-RAW-FILTER-STR() [variables:raw<_tf.dv-type>] +\procedure DV-FILTER-STR() [variables<_tf.dv-type>] -\define DV-TMP-SEARCH() $:/temp/varSearch -\define DV-TMP-SEARCH-DETAILS() $:/temp/varSearch/details -\define DV-SEARCH-STATE() $:/state/varSearch -\define DV-TMP-EXCLUDE() $:/state/varExclude + +\procedure DV-FOLDED() $:/temp/varFolded +\procedure DV-SEARCH() $:/temp/varSearch +\procedure DV-SEARCH-DETAILS() $:/temp/varSearch/details +\procedure DV-SEARCH-STATE() $:/state/varSearch +\procedure DV-EXCLUDE() $:/state/varExclude + \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] \function tf.dv-formattedVar() [format:variable<_tf.dv-varFormat>] +\function tf.dv-foldedState() [] [] +[join[/]] + \procedure dumpvariables(type sort subfilter:"[[]]" format) + \function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [] @@ -46,13 +53,16 @@ tags: $:/tags/Global \end \procedure dv-toggleInfoState() -<$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> +<$action-setfield $tiddler=<> + text={{{ [get[text]] +[toggle[yes],[no]] }}} +/> -<$action-setfield $tiddler=<> text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} /> +<$action-setfield $tiddler=<> + text={{{ [!is[blank]then] :else[format:variable[$type$ $name$($params$)]] }}} +/> \end \procedure dv-clearStatesButton() -| {{$:/language/Search/Variables/FoldAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> @@ -62,26 +72,33 @@ tags: $:/tags/Global \end \procedure dv-clearSearchButton() -<$button class="tc-btn-invisible tc-tiny-gap-left"> +<$button class="tc-btn-invisible btn-x" + tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Filter}] +[join[ ]] }$` +> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end \procedure dv-clearExcludeButton() -<$button class="tc-btn-invisible"> +<$button class="tc-btn-invisible btn-yy" + tooltip=`${ [{$:/language/Search/Variables/Clear}] [{$:/language/Search/Variables/Exclude}] +[join[ ]] }$` +> <$action-deletetiddler $tiddler=<>/> {{$:/core/images/close-button}} \end \procedure dv-expandAllStatesButton() -| {{$:/language/Search/Variables/ExpandAll}} <$button class="tc-btn-invisible tc-tiny-gap-left"> - <$action-setfield $tiddler=<> text={{{ [get[text]] +[toggle[yes],[no]] }}}/> + <$action-setfield $tiddler=<> + text={{{ [get[text]] +[toggle[yes],[no]] }}} + /> - <$list filter="[subfilter] +[search::some] +[filter]" variable="varname"> + <$list filter="[subfilter] +[search::some] +[filter]" + variable="varname" + > <$action-setfield $tiddler=<> text="yes"/> {{$:/core/images/unfold-all-button}} @@ -134,16 +151,16 @@ tags: $:/tags/Global \end -\function tf.dv-tmpTypeOptions() [] [] +[join[/]] -\function tf.dv-tmpSortOptions() [] [] +[join[/]] +\function tf.dv-tmpTypeOptions() [] [] +[join[/]] +\function tf.dv-tmpSortOptions() [] [] +[join[/]] -\function tf.dv-searchText() [] [] +[join[/]] +\function tf.dv-searchText() [] [] +[join[/]] \function tf.dv-getSearchText() [get[text]] -\function tf.dv-excludeText() [] [] +[join[/]] +\function tf.dv-excludeText() [] [] +[join[/]] \function tf.dv-getExcludeText() [get[text]] -\function tf.dv-detailsSearch() [] [] [] +[join[/]] +\function tf.dv-detailsSearch() [] [] [] +[join[/]] \function tf.dv-getDetailsSearchText() [get[text]] \function tf.dv-varState() [] [] [] +[join[/]] @@ -153,40 +170,20 @@ tags: $:/tags/Global \procedure search-variables(type sort subfilter:"[[]]" format) + \function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [!is[blank]then] :else[get[text]] \function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] -<% if [is[blank]] %> - <> -<% endif %> -<% if [is[blank]] %> - <> -<% endif %> +<> -<% if [get[text]match[yes]] %> - <> -<% else %> - <> -<% endif %> - -
- <% if [!match[$:/AdvancedSearch]] %> - <%if [!is[blank]] %>sort:<<_tf.dv-sort>><%endif%> - <%if [!is[blank]] %>type:<<_tf.dv-type>><%endif%> - <% endif %> - <$text text={{$:/language/Search/Variables/Filter}}/> - <$edit-text tiddler=<> tag=input class="tc-tiny-gap-left" placeholder={{$:/language/Search/Variables/Filter/Hint}}/> <> -
- <$text text={{$:/language/Search/Variables/Exclude}}/> - <$edit-text tiddler=<> tag=input class="tc-tiny-gap" placeholder={{$:/language/Search/Variables/Exclude/Hint}}/> - <> - <% if [!is[blank]] %> - <> - <% endif %> -
-<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" variable="varname"> +<$list filter="[subfilter] + +[search::some] + +[filter] + +[!filter]" + variable="varname" +>
<$button actions=<> class="tc-small-gap-left tc-btn-invisible"> <% if [get[text]match[yes]] %> @@ -226,17 +223,131 @@ tags: $:/tags/Global \end - + + + + +\procedure dv-search-input-box() +<%if [!is[blank]] %> + sort:<<_tf.dv-sort>> +<%endif%> +<%if [!is[blank]] %> + type:<<_tf.dv-type>> +<%endif%> +<$text text={{$:/language/Search/Variables/Filter}}/> +<$edit-text tiddler=<> + tag=input + class="txt-input x-inp" + placeholder="filter variables by name" +/> +<> +\end + +\procedure dv-exclude-input-box() +<$text text={{$:/language/Search/Variables/Exclude}}/> +<$edit-text tiddler=<> + tag=input + class="txt-input y-inp" +/> +<> +<% if [!is[blank]] %> + <> +<% endif %> +\end + +\function tf.dv-opt-class() "c" [
\end -\procedure dv-filterOptions() + \function tf.dv-tmpTypeOptions() [] [] +[join[/]] \function tf.dv-tmpSortOptions() [] [] +[join[/]] @@ -166,13 +171,14 @@ tags: $:/tags/Global \function tf.dv-varState() [] [] [] +[join[/]] \function tf.dv-toggleInfoState() [] [] +[join[/]] - - - + + + \procedure search-variables(type sort subfilter:"[[]]" format) -\function _tf.dv-varFormat() [!is[blank]thenelse[$type$ $name$($params$)]] + +\function _tf.dv-varFormatStr() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [!is[blank]then] :else[get[text]] \function _tf.dv-sort() [!is[blank]then] :else[get[text]] :else[[alphabetical]] @@ -193,6 +199,7 @@ tags: $:/tags/Global <% endif %> <$text text=<>/> <% if [prefix[\function]] %> + <$text text={{{ [format:variable[$firstLine$]] }}}/> <% endif %> @@ -226,6 +233,7 @@ tags: $:/tags/Global + \procedure dv-search-input-box() <%if [!is[blank]] %> @@ -238,7 +246,7 @@ tags: $:/tags/Global <$edit-text tiddler=<> tag=input class="txt-input x-inp" - placeholder="filter variables by name" + placeholder={{$:/language/Search/Variables/Filter/Hint}} /> <> \end @@ -248,6 +256,7 @@ tags: $:/tags/Global <$edit-text tiddler=<> tag=input class="txt-input y-inp" + placeholder={{$:/language/Search/Variables/Exclude/Hint}} /> <> <% if [!is[blank]] %> @@ -266,11 +275,26 @@ tags: $:/tags/Global {{$:/language/Search/Variables/Option/Type}} <$list filter="[enlist]" variable="option"> - <$checkbox tiddler=<> listField="text" checked=<
\end - - \function tf.dv-tmpTypeOptions() [] [] +[join[/]] \function tf.dv-tmpSortOptions() [] [] +[join[/]] From bfb9e642f8f66fa2485f9da910bf4700f6db429a Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 29 Apr 2024 15:07:12 +0200 Subject: [PATCH 29/77] change icon if variables are exlcuded from search --- core/wiki/macros/dumpvariables.tid | 12 ++++++++++-- themes/tiddlywiki/vanilla/flexible-form-styles.tid | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index bde0d1547..2f433017a 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -310,7 +310,11 @@ tags: $:/tags/Global > <$button tooltip={{$:/language/Search/Variables/Exclude/Show}} class="tc-dv-btn tc-btn-invisible"> <$action-setfield $tiddler=<> $field=text $value="show"/> - {{$:/core/images/right-arrow}} + <% if [!is[blank]]%> + {{$:/core/images/star-filled}} + <% else %> + {{$:/core/images/right-arrow}} + <% endif %> <$reveal stateTitle=<> @@ -323,7 +327,11 @@ tags: $:/tags/Global > <$button tooltip={{$:/language/Search/Variables/Exclude/Hide}} class="tc-dv-btn tc-btn-invisible"> <$action-setfield $tiddler=<> $field=text $value="hide"/> - {{$:/core/images/up-arrow}} + <% if [!is[blank]]%> + {{$:/core/images/star-filled}} + <% else %> + {{$:/core/images/up-arrow}} + <% endif %> <> diff --git a/themes/tiddlywiki/vanilla/flexible-form-styles.tid b/themes/tiddlywiki/vanilla/flexible-form-styles.tid index 309fac4e5..ce52af59d 100644 --- a/themes/tiddlywiki/vanilla/flexible-form-styles.tid +++ b/themes/tiddlywiki/vanilla/flexible-form-styles.tid @@ -45,7 +45,7 @@ tags: $:/tags/Stylesheet .btn-fld-has-exluded button:hover svg, .btn-fld-has-exluded button svg { - fill: <>; + } .btn-fld { From d09ebe56683f87611cd80897ae45a8e32eda0d1c Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 29 Apr 2024 15:34:45 +0200 Subject: [PATCH 30/77] dumpvariables change readio / checkbox config tiddler title --- core/wiki/macros/dumpvariables.tid | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 2f433017a..a0d3578ea 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -18,7 +18,8 @@ tags: $:/tags/Global \procedure DV-SEARCH-DETAILS() $:/temp/varSearch/details \procedure DV-SEARCH-STATE() $:/state/varSearch/name \procedure DV-EXCLUDE() $:/state/varExclude -\procedure DV-TYPE-STATE() $:/state/typeState + +\procedure DV-TYPE-CONFIG() $:/config/DumpVariables/type-selector \function tf.dv-filterString() [<_tf.dv-sort>match[raw]thenelse] @@ -36,6 +37,7 @@ tags: $:/tags/Global \function _tf.dv-varFormatStr() [!is[blank]thenelse[$type$ $name$($params$)]] \function _tf.dv-type() [] \function _tf.dv-sort() [] +
    <$list filter="[subfilter] +[filter]" variable="varname">
  • @@ -246,7 +248,7 @@ tags: $:/tags/Global {{$:/language/Search/Variables/Option/Type}} <$list filter="[enlist]" variable="option"> - <%if [get[text]match[checkbox]] %> + <%if [get[text]match[checkbox]] %> <$checkbox tiddler=<> listField="text" checked=<
\end - - -\procedure dv-lc-actionsXX() -<$action-setfield $tiddler="$:/temp/advancedsearch" text=<>/> -<$action-setfield $tiddler="$:/temp/advancedsearch/input" text=<>/> -<$action-setfield $tiddler="$:/temp/advancedsearch/refresh" text="yes"/> -<$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input"/> -\end - \procedure dv-lc-actions() <$action-setfield $tiddler=<> text=<>/> + \end \procedure dv-addNewVariableFilter-actions() @@ -380,7 +374,7 @@ tags: $:/tags/Global \procedure dv-addNewVariableFilter() <$button tag="a" actions=<> class="tc-tiddlylink"> - <$text text=<>/> + <$text text={{$:/language/Search/Variables/Exclude/Save}}/> \end From d1439c977b14084c718856678ef24128f7e63dd3 Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 29 Apr 2024 19:19:03 +0200 Subject: [PATCH 34/77] add some test tiddlers --- editions/tw5.com/tiddlers/dump-type-fn-raw.tid | 7 +++++++ editions/tw5.com/tiddlers/dump-with-subfilter.tid | 8 ++------ .../tw5.com/tiddlers/test-dumpvariables-sort-raw.tid | 10 ++++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 editions/tw5.com/tiddlers/dump-type-fn-raw.tid create mode 100644 editions/tw5.com/tiddlers/test-dumpvariables-sort-raw.tid diff --git a/editions/tw5.com/tiddlers/dump-type-fn-raw.tid b/editions/tw5.com/tiddlers/dump-type-fn-raw.tid new file mode 100644 index 000000000..24215a85d --- /dev/null +++ b/editions/tw5.com/tiddlers/dump-type-fn-raw.tid @@ -0,0 +1,7 @@ +created: 20240427113318944 +modified: 20240427113819817 +tags: +title: dump-type-fn-raw +type: text/vnd.tiddlywiki + +<<.example 1 """<>""">> diff --git a/editions/tw5.com/tiddlers/dump-with-subfilter.tid b/editions/tw5.com/tiddlers/dump-with-subfilter.tid index a449ddcf5..67145bdc3 100644 --- a/editions/tw5.com/tiddlers/dump-with-subfilter.tid +++ b/editions/tw5.com/tiddlers/dump-with-subfilter.tid @@ -1,13 +1,9 @@ created: 20240218195424844 -modified: 20240223001316626 +modified: 20240427113751174 tags: title: dump-with-subfilter type: text/vnd.tiddlywiki -<> - ---- - -<> +<<.example 1 """<>""">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/test-dumpvariables-sort-raw.tid b/editions/tw5.com/tiddlers/test-dumpvariables-sort-raw.tid new file mode 100644 index 000000000..4099459d0 --- /dev/null +++ b/editions/tw5.com/tiddlers/test-dumpvariables-sort-raw.tid @@ -0,0 +1,10 @@ +created: 20240218202032583 +modified: 20240427114143241 +tags: +title: test-dumpvariables-sort-raw +type: text/vnd.tiddlywiki + +<<.example 1 """\procedure asdf(test:"hallo", x ) <> + +<> """>> + From 7ac47b646b0999e511a40552710aa99e3a9a305e Mon Sep 17 00:00:00 2001 From: pmario Date: Mon, 29 Apr 2024 19:50:32 +0200 Subject: [PATCH 35/77] add keyboard handling to AdvancedSearch Variables tab --- core/ui/AdvancedSearch/Variables.tid | 27 +++++++++++++++++++ .../AdvancedSearch/Variables_ItemTemplate.tid | 0 core/wiki/macros/dumpvariables.tid | 2 +- .../$__core_ui_AdvancedSearch_Variables.tid | 13 --------- 4 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 core/ui/AdvancedSearch/Variables.tid rename editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid => core/ui/AdvancedSearch/Variables_ItemTemplate.tid (100%) delete mode 100644 editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid diff --git a/core/ui/AdvancedSearch/Variables.tid b/core/ui/AdvancedSearch/Variables.tid new file mode 100644 index 000000000..55053c886 --- /dev/null +++ b/core/ui/AdvancedSearch/Variables.tid @@ -0,0 +1,27 @@ +caption: {{$:/language/Search/Variables/Caption}} +created: 20240215233810357 +list-before: $:/core/ui/AdvancedSearch/Filter +modified: 20240429173634149 +tags: $:/tags/AdvancedSearch +title: $:/core/ui/AdvancedSearch/Variables +type: text/vnd.tiddlywiki + +\define set-next-input-tab(beforeafter:"after") + +<$macrocall $name="change-input-tab" + stateTitle="$:/state/tab--1498284803" + tag="$:/tags/AdvancedSearch" + beforeafter="$beforeafter$" + defaultState="$:/core/ui/AdvancedSearch/System" + actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<>/>"/> +\end + +{{$:/language/Search/Variables/Hint}} + + \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid b/core/ui/AdvancedSearch/Variables_ItemTemplate.tid similarity index 100% rename from editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables_ItemTemplate.tid rename to core/ui/AdvancedSearch/Variables_ItemTemplate.tid diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 7f13f0323..0ffdfea31 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -162,7 +162,7 @@ tags: $:/tags/Global +[count[]] }$` /> <>

-<$list filter="[subfilter] +<$list filter="[subfilter] +[search::some] +[filter] +[!filter]" diff --git a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid b/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid deleted file mode 100644 index 50f1de7e2..000000000 --- a/editions/tw5.com/tiddlers/$__core_ui_AdvancedSearch_Variables.tid +++ /dev/null @@ -1,13 +0,0 @@ -caption: {{$:/language/Search/Variables/Caption}} -created: 20240215233810357 -modified: 20240216005108246 -tags: $:/tags/AdvancedSearch -list-before: $:/core/ui/AdvancedSearch/Filter -title: $:/core/ui/AdvancedSearch/Variables -type: text/vnd.tiddlywiki - -{{$:/language/Search/Variables/Hint}} - - \ No newline at end of file From c3d0d2432b8c500ced4388db5cfb06622ac0892a Mon Sep 17 00:00:00 2001 From: pmario Date: Tue, 30 Apr 2024 11:15:01 +0200 Subject: [PATCH 36/77] add some temporary test tiddlers and plugins --- core/wiki/macros/dumpvariables.tid | 6 ++-- ...Visibility_$__core_ui_Buttons_fold-bar.tid | 6 ++++ .../$__plugins_wikilabs_link-to-tabs.json | 1 + ...$__plugins_wikilabs_link-to-tabs.json.meta | 11 +++++++ editions/tw5.com/tiddlers/$__tab.json | 32 +++++++++++++++++++ editions/tw5.com/tiddlers/$__tab.json.meta | 7 ++++ ...wiki_vanilla_settings_editorfontfamily.tid | 6 ++++ .../search-variables Macro (Examples).tid | 14 ++++---- 8 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 editions/tw5.com/tiddlers/$__config_ViewToolbarButtons_Visibility_$__core_ui_Buttons_fold-bar.tid create mode 100644 editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json create mode 100644 editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json.meta create mode 100644 editions/tw5.com/tiddlers/$__tab.json create mode 100644 editions/tw5.com/tiddlers/$__tab.json.meta create mode 100644 editions/tw5.com/tiddlers/$__themes_tiddlywiki_vanilla_settings_editorfontfamily.tid diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 0ffdfea31..986ef1e23 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -81,7 +81,7 @@ tags: $:/tags/Global \procedure dv-clearSearchButton() <$button class="tc-btn-invisible btn-x" tooltip={{$:/language/Search/Variables/Clear/Search}}> <$action-deletetiddler $tiddler=<>/> - <$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input.x-inp"/> + <$action-sendmessage $message="tm-focus-selector" $param="input.x-inp"/> {{$:/core/images/close-button}} \end @@ -89,7 +89,7 @@ tags: $:/tags/Global \procedure dv-clearExcludeButton() <$button class="tc-btn-invisible btn-yy" tooltip={{$:/language/Search/Variables/Clear/Exclude}}> <$action-deletetiddler $tiddler=<>/> - <$action-sendmessage $message="tm-focus-selector" $param=".tc-advanced-search input.y-inp"/> + <$action-sendmessage $message="tm-focus-selector" $param="input.y-inp"/> {{$:/core/images/close-button}} \end @@ -355,7 +355,7 @@ tags: $:/tags/Global \procedure dv-lc-actions() <$action-setfield $tiddler=<> text=<>/> - + \end \procedure dv-addNewVariableFilter-actions() diff --git a/editions/tw5.com/tiddlers/$__config_ViewToolbarButtons_Visibility_$__core_ui_Buttons_fold-bar.tid b/editions/tw5.com/tiddlers/$__config_ViewToolbarButtons_Visibility_$__core_ui_Buttons_fold-bar.tid new file mode 100644 index 000000000..39627cc2e --- /dev/null +++ b/editions/tw5.com/tiddlers/$__config_ViewToolbarButtons_Visibility_$__core_ui_Buttons_fold-bar.tid @@ -0,0 +1,6 @@ +created: 20240311170828385 +modified: 20240311170828385 +title: $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar +type: text/vnd.tiddlywiki + +show \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json b/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json new file mode 100644 index 000000000..bf9d676a6 --- /dev/null +++ b/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json @@ -0,0 +1 @@ +{"tiddlers":{"$:/plugins/wikilabs/link-to-tabs/config":{"title":"$:/plugins/wikilabs/link-to-tabs/config","created":"20190712133008077","initial-opacity":"0.7","modified":"20190714104541701","show-all-links":"none","show-single-link":"inline-block","transition":"0.3","type":"text/vnd.tiddlywiki","text":"This tiddler is used to configure the \"Link-to-tabs\" plugin behaviour. \n\nThere are 4 fields, which are used by [[$:/plugins/wikilabs/link-to-tabs/styles]] enable and disable the internal links. \n\n* show-all-links: {{!!show-all-links}}\n* show-single-link: {{!!show-single-link}}\n* initial-opacity: {{!!initial-opacity}}\n* transition time in seconds: {{!!transition}}\n"},"$:/core/macros/tabs":{"title":"$:/core/macros/tabs","tags":"$:/tags/Macro","text":"\\define tabs-button()\n\\whitespace trim\n<$button\n\tset=<>\n\tsetTo=<>\n\tdefault=<<__default__>>\n\tselectedClass=\"tc-tab-selected\"\n\ttooltip={{!!tooltip}}\n\trole=\"switch\"\n\tdata-tab-title=<>\n>\n\t<$tiddler tiddler=<>>\n\t\t<$set name=\"tv-wikilinks\" value=\"no\">\n\t\t\t<$transclude tiddler=<<__buttonTemplate__>> mode=\"inline\">\n\t\t\t\t<$transclude tiddler=<> field=\"caption\">\n\t\t\t\t\t<$macrocall $name=\"currentTab\" $type=\"text/plain\" $output=\"text/plain\"/>\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\t<<__actions__>>\n\n\\end\n\n\\define link-action(message:\"tm-navigate\" icon:\"$:/core/images/link\")\n\\whitespace trim\n<$linkcatcher message=<<__message__>> >\n\t<$link overrideClass=\"\" to=<> >\n\t\t<$transclude $tiddler=<<__icon__>>/>\n\t\n\n\\end\n\n\\define tabs-tab-indicator()\n\\whitespace trim\n<$let pluginTab=`$(save-currentTiddler)$/$(currentTiddler)$`\n\tcurrentTiddler=`${[!is[blank]thenelse]}$`\n>\n\t\n\t\t<% if [all[current]!is[shadow]] :filter[[$:/plugins/wikilabs/link-to-tabs/config]get[link-action]match[tm-edit-tiddler]] %>\n\t\t\t<>\n\t\t<% elseif [all[current]is[tiddler]] :filter[[$:/plugins/wikilabs/link-to-tabs/config]get[shadow-action]match[tm-edit-tiddler]] %>\n\t\t\t<>\n\t\t<% else %>\n\t\t\t<>\n\t\t<% endif %>\n\t\n\n\\end\n\n\\define tabs-tab()\n\\whitespace trim\n<$set name=\"save-currentTiddler\" value=<>>\n\t<$tiddler tiddler=<>>\n\t\t<>\n\t\t<>\n\t\n\n\\end\n\n\\define tabs-tab-list()\n\\whitespace trim\n<$list filter=<<__tabsList__>> variable=\"currentTab\" storyview=\"pop\">\n\t<$set name=getCondition filter=\"[get[condition]]\">\n\t\t<$list\n\t\t\tfilter=\"[has[condition]subfilterlimit[1]] ~[!has[condition]then[true]]\"\n\t\t\tvariable=\"ignore\"\n\t\t>\n\t\t\t<>\n\t\t\n\t\n\n\\end\n\n\\define tabs-tab-body()\n\\whitespace trim\n<$list filter=<<__tabsList__>> variable=\"currentTab\">\n\t<$set name=getCondition filter=\"[get[condition]]\">\n\t\t<$list\n\t\t\tfilter=\"[has[condition]subfilterlimit[1]] ~[!has[condition]then[true]]\"\n\t\t\tvariable=\"ignore\"\n\t\t>\n\t\t\t<$reveal type=\"match\" state=<> text=<> default=<<__default__>> retain=<<__retain__>> tag=\"div\">\n\t\t\t\t<$transclude tiddler=<<__template__>> mode=\"block\">\n\t\t\t\t\t<$transclude tiddler=<> mode=\"block\"/>\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\n\\end\n\n\\define tabs(tabsList,default,state:\"$:/state/tab\",class,template,buttonTemplate,retain,actions,explicitState)\n\\whitespace trim\n<$qualify title=<<__state__>> name=\"qualifiedState\">\n\t<$let tabsState={{{ [<__explicitState__>minlength[1]] ~[] }}}>\n\t\t
] }}}>\n\t\t\t
] }}}>\n\t\t\t\t<>\n\t\t\t
\n\t\t
] }}}/>\n\t\t\t
] }}}>\n\t\t\t\t<>\n\t\t\t
\n\t\t
\n\t\n\n\\end"},"$:/plugins/wikilabs/link-to-tabs/history":{"title":"$:/plugins/wikilabs/link-to-tabs/history","text":"\nV 3.0.0 - 2023-12-28\n\n* The ''edit-tabs'' plugin will be ''deprecated'' and be replaced by link-to-tabs\n* There are 2 new settings now\n** Clicking a tab-link opens ''non-system'' tiddlers in edit mode\n** Clicking a tab-link opens ''every existing'' tiddler in edit mode\n\n* New \"settings\" tab in the plugin\n* New \"settings\" tab in the ''$:/ControlPanel -> Settings -> WikiLabs'' tab\n\nV 2.4.0 - 2023-12-28\n\n* Update tabs-macro to TW v5.3.3\n\nV 2.3.0 - 2023-07-17\n\n* Updateto TW v5.3.0\n* Tabs in ControlPanel -> Plugins -> Plugin Info area work now.\n** Except the \"contents\" tab, since it's a \"virtual\" one.\n\nV 2.2.0 - 2022-03-27\n\n* update to TW v5.2.2\n* ''Important'': Changed license to Attribution-NonCommercial-ShareAlike -- [[CC-BY-NC-SA|$:/plugins/wikilabs/link-to-tabs/license]]\n\nV 2.1.0 - 2022-02-17\n\n* New $:/core/macros/tabs\n* much more hackable and added dynamic tabs\n** tabs can have a `condition` field now.\n\nV 2.0.1 - 2020-12-25\n\n* update license\n\nV 2.0.0 - 2020.12.05\n\n* Update $:/core/macros/tabs to V5.1.23\n\nV 1.1.1 - 2020.01.19\n\n* Update license link/text\n\nV 1.1.0 - 2019.07.14\n\n* Add new option: Initially hide link\n** Transition time from hidden to visible is adjustable\n* Added: \"Reset to Default\" button\n\nV 1.0.1 - 2019.02.18\n\n* link-to-tabs works in drop-down elements now.\n\nV 1.0.0 - 2019.02.14\n\n* Use core tabs-macro from TW 5.1.19\n\nV <1.0.0\n\n* Use core tabs-macro from TW 5.1.15\n"},"$:/plugins/wikilabs/link-to-tabs/icon":{"title":"$:/plugins/wikilabs/link-to-tabs/icon","text":"\n\n\n"},"$:/plugins/wikilabs/link-to-tabs/license":{"title":"$:/plugins/wikilabs/link-to-tabs/license","license-text":"https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode","text":"[[Link-to-Tabs-Macro|https://wikilabs.github.io/#link-to-tabs]] (c) Mario Pietsch - 2016-2024\n\n[[Creative Commons Attribution-NonCommercial-ShareAlike|https://creativecommons.org/licenses/by-nc-sa/4.0/]]\n"},"$:/plugins/wikilabs/link-to-tabs/readme":{"title":"$:/plugins/wikilabs/link-to-tabs/readme","text":"This plugin adds a little link icon to every tab.\n\n!! Settings\n\n* Have a closer look at the \"settings-tab\" here or\n* Open the ''$:/ControlPanel -> Settings -> WikiLabs'' tab\n\n''Important:'' This plugin modifies a core module and templates\n\n
    <$list filter=\"[[$:/plugins/wikilabs/link-to-tabs]plugintiddlers[]prefix[$:/core/]] \">
  • <$link to=<>><>
"},"$:/plugins/wikilabs/link-to-tabs/settings":{"title":"$:/plugins/wikilabs/link-to-tabs/settings","caption":"Link-to-Tabs","created":"20190712133607244","modified":"20190714104631250","tags":"$:/tags/ControlPanel/WikiLabs","type":"text/vnd.tiddlywiki","text":"The full documentation can be found at [[links-to-tabs plugin|https://wikilabs.github.io/editions/link-to-tabs/]] main page.\n\n<$checkbox tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"show-all-links\" checked=\"inline-block\" unchecked=\"none\" default=\"none\"> Show internal tab link for ''all tabs''\n\n<$checkbox tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"show-single-link\" checked=\"inline-block\" unchecked=\"none\" default=\"inline-block\"> Show internal tab link for ''selected tabs''\n\n<$checkbox tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"initial-opacity\" checked=\"0\" unchecked=\"0.7\" default=\"0.7\"> Tab links are initially hidden and need mouse hover to become visible.
The transition time in seconds is: <$edit-text tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"transition\" default=\"0.3\"/>\n\n<$checkbox tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"link-action\" checked=\"tm-edit-tiddler\" unchecked=\"tm-navigate\" default=\"tm-navigate\"> Clicking a tab-link opens ''non-shadow'' tiddlers in ''edit mode''\n\n<$checkbox tiddler=\"$:/plugins/wikilabs/link-to-tabs/config\" field=\"shadow-action\" checked=\"tm-edit-tiddler\" unchecked=\"tm-navigate\" default=\"tm-navigate\"> Clicking a tab-link opens ''every existing'' tiddler in ''edit mode''\n\n<$button message=\"tm-delete-tiddler\" param=\"$:/plugins/wikilabs/link-to-tabs/config\">\nReset to Default!\n"},"$:/ControlPanel/Settings/WikiLabs":{"title":"$:/ControlPanel/Settings/WikiLabs","caption":"WikiLabs","tags":"$:/tags/ControlPanel/SettingsTab","text":"Get an overview about all [[WikiLab Pugins|https://wikilabs.github.io]] \n\n
\n<$macrocall $name=\"tabs\" \n tabsList=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/WikiLabs]!has[draft.of]]\"\n default=\"$:/plugins/wikilabs/link-to-tabs/settings\"\n explicitState=\"$:/state/tab/settings/wikilabs\"\n/>\n
"},"$:/plugins/wikilabs/link-to-tabs/styles":{"title":"$:/plugins/wikilabs/link-to-tabs/styles","created":"20190712133348541","modified":"20190714104306483","tags":"$:/tags/Stylesheet","type":"text/vnd.tiddlywiki","text":"
\n\n.wltc-link-to-tab {\n  display: {{$:/plugins/wikilabs/link-to-tabs/config!!show-all-links}};\n  position: relative;\n  top: -1em;\n  left: -1.3em;\n  font-size: 0.7em;\n  opacity: {{$:/plugins/wikilabs/link-to-tabs/config!!initial-opacity}};\n  margin-right: -1em;\n}\n\n.wltc-link-to-tab svg{\n  width: 1.4em;\n  height: 1.4em;\n}\n\n.wltc-link-to-tab:hover {\n  opacity: 1;\n  transition:opacity {{$:/plugins/wikilabs/link-to-tabs/config!!transition}}s;\n  transition-timing-function: cubic-bezier(1,-0.06,.39,.89);\n}\n\n.tc-tab-selected + .wltc-link-to-tab {\n  display: {{$:/plugins/wikilabs/link-to-tabs/config!!show-single-link}};\n}\n\n.tc-vertical > .wltc-link-to-tab {\n  top: -1.9em;\n  left: 0;\n  height: 0;\n  float: right;\n}\n\n.tc-search-results .wltc-link-to-tab a {\n  display: contents;\n  padding: 0;\n}\n\n
"}}} \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json.meta b/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json.meta new file mode 100644 index 000000000..de078b3c3 --- /dev/null +++ b/editions/tw5.com/tiddlers/$__plugins_wikilabs_link-to-tabs.json.meta @@ -0,0 +1,11 @@ +author: Mario Pietsch +core-version: >=5.3.3 +dependents: +description: Internal links are added to tabs if selected +icon: $:/plugins/wikilabs/link-to-tabs/icon +list: readme settings license history +name: Link to Tabs +plugin-type: plugin +title: $:/plugins/wikilabs/link-to-tabs +type: application/json +version: 3.0.0 \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__tab.json b/editions/tw5.com/tiddlers/$__tab.json new file mode 100644 index 000000000..66d6ae4b2 --- /dev/null +++ b/editions/tw5.com/tiddlers/$__tab.json @@ -0,0 +1,32 @@ +{ + "tiddlers": { + "$:/config/ShortcutInfo/tab": { + "text": "Insert Tab", + "title": "$:/config/ShortcutInfo/tab" + }, + "$:/config/shortcuts-mac/tab": { + "text": "tab", + "title": "$:/config/shortcuts-mac/tab" + }, + "$:/config/shortcuts-not-mac/tab": { + "text": "tab", + "title": "$:/config/shortcuts-not-mac/tab" + }, + "$:/tab/icon": { + "text": "", + "tags": "$:/tags/Image", + "title": "$:/tab/icon" + }, + "$:/insert/tab": { + "text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"insert-text\"\n\ttext={{{ [charcode[9]] }}}\n/>", + "title": "$:/insert/tab", + "tags": "$:/tags/EditorToolbar", + "icon": "$:/tab/icon", + "caption": "Tab", + "description": "Insert Tab", + "condition": "[!has[type]] [type[text/vnd.tiddlywiki]]", + "shortcuts": "((tab))", + "condition-disabled": "[[$:/temp/bold/disabled]get[state-disabled]else[no]]" + } + } +} \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__tab.json.meta b/editions/tw5.com/tiddlers/$__tab.json.meta new file mode 100644 index 000000000..31166c4fd --- /dev/null +++ b/editions/tw5.com/tiddlers/$__tab.json.meta @@ -0,0 +1,7 @@ +description: Toolbar button to get a tab space character +modified: 20230806185015211 +name: Tab character +plugin-type: plugin +title: $:/tab +type: application/json +version: 0.0.2 \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__themes_tiddlywiki_vanilla_settings_editorfontfamily.tid b/editions/tw5.com/tiddlers/$__themes_tiddlywiki_vanilla_settings_editorfontfamily.tid new file mode 100644 index 000000000..5ec820b7f --- /dev/null +++ b/editions/tw5.com/tiddlers/$__themes_tiddlywiki_vanilla_settings_editorfontfamily.tid @@ -0,0 +1,6 @@ +created: 20240312113200405 +modified: 20240312113200405 +title: $:/themes/tiddlywiki/vanilla/settings/editorfontfamily +type: text/vnd.tiddlywiki + +"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/macros/examples/search-variables Macro (Examples).tid b/editions/tw5.com/tiddlers/macros/examples/search-variables Macro (Examples).tid index 122153def..07b699a6f 100644 --- a/editions/tw5.com/tiddlers/macros/examples/search-variables Macro (Examples).tid +++ b/editions/tw5.com/tiddlers/macros/examples/search-variables Macro (Examples).tid @@ -1,5 +1,5 @@ created: 20240427121446051 -modified: 20240427122708648 +modified: 20240429205843171 title: search-variables Macro (Examples) type: text/vnd.tiddlywiki @@ -8,22 +8,22 @@ The following example will list all variables that contain the word "example" in While ''the following list will be long'' it should be easy to refine it. It shows all variables known within this tiddler. Using the procedure in a ''different context''. Eg: the sidebar, variables will show ''different values''. <$macrocall $name=".example" n="1" -eg="""<>"""/> +eg="""
<>
"""/> <$macrocall $name=".example" n="2" -eg="""<$let EXAMPLE="123" > +eg="""
<$let EXAMPLE="123" > <> -"""/> +
"""/> Listing only specific varibles can be achieved using the <<.olink search>> operator as a subfilter <$macrocall $name=".example" n="3" -eg="""<$let EXAMPLE="123" > +eg="""
<$let EXAMPLE="123" > <> -"""/> +
"""/> <$macrocall $name=".example" n="4" -eg="""<>"""/> +eg="""
<>
"""/> From 91672ab8c520d7012a4b4603cf4a989345f4063f Mon Sep 17 00:00:00 2001 From: pmario Date: Tue, 30 Apr 2024 12:03:37 +0200 Subject: [PATCH 37/77] first run: adjust layout if type and sort parameter are "hardcoded" --- core/wiki/macros/dumpvariables.tid | 74 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/core/wiki/macros/dumpvariables.tid b/core/wiki/macros/dumpvariables.tid index 986ef1e23..ac3d7a7ab 100644 --- a/core/wiki/macros/dumpvariables.tid +++ b/core/wiki/macros/dumpvariables.tid @@ -214,12 +214,6 @@ tags: $:/tags/Global \procedure dv-search-input-box() -<%if [!is[blank]] %> - sort:<<_tf.dv-sort>> -<%endif%> -<%if [!is[blank]] %> - type:<<_tf.dv-type>> -<%endif%> <$text text={{$:/language/Search/Variables/Filter}}/> <$edit-text tiddler=<> tag=input @@ -253,41 +247,51 @@ tags: $:/tags/Global } <> -<$list filter="[enlist]" variable="option"> - <%if [get[text]match[checkbox]] %> - <$checkbox tiddler=<> - listField="text" - checked=<