From 1aca53f9cc48ab5962bbbc53e265e4eefdd11ddd Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2024 18:27:16 +0200 Subject: [PATCH 1/7] Update pop.js to use tv-inherit-storyview-scroll variable --- core/modules/storyviews/pop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/storyviews/pop.js b/core/modules/storyviews/pop.js index e2634e3d5b1..06d83365289 100644 --- a/core/modules/storyviews/pop.js +++ b/core/modules/storyviews/pop.js @@ -24,7 +24,7 @@ PopStoryView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { + if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { return; } // Scroll the node into view From ea49a1613f96a057334c1be987d34fe3ae46febb Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2024 18:29:10 +0200 Subject: [PATCH 2/7] Update classic.js to use tv-inherit-storyview-scroll variable --- core/modules/storyviews/classic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index a85e458c57a..302449d2b53 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -27,7 +27,7 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { + if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { return; } // Scroll the node into view From 9201a845f3fccee2428649ea9dedccbbe8a26961 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2024 18:30:41 +0200 Subject: [PATCH 3/7] Update zoomin.js to use tv-inherit-storyview-scroll variable --- core/modules/storyviews/zoomin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index d02f705e73e..2bfc9aed38c 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -52,7 +52,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement) { + if(!targetElement || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { return; } else if (targetElement.nodeType === Node.TEXT_NODE) { this.logTextNodeRoot(targetElement); From 8f30dee5133db871fde672a22fd2d017bf1b3346 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Sun, 20 Oct 2024 18:32:20 +0200 Subject: [PATCH 4/7] Update Open.tid to make use of the tv-inherit-storyview-scroll variable --- core/ui/SideBar/Open.tid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index d3e52814801..97bb21bdfd8 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -23,6 +23,7 @@ $button$ \end +<$set name="tv-inherit-storyview-scroll" value="yes">
<$list filter="[list]" history=<> storyview="pop">
@@ -35,3 +36,4 @@ $button$
+ From 547c9a2814c6e6282108bd8906b58562c8ab06c7 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 20 Oct 2024 18:41:23 +0200 Subject: [PATCH 5/7] correctly name variables --- core/modules/storyviews/classic.js | 2 +- core/modules/storyviews/pop.js | 2 +- core/modules/storyviews/zoomin.js | 2 +- core/ui/SideBar/Open.tid | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index 302449d2b53..1486f3b299e 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -27,7 +27,7 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { + if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-disable-storyview-scroll") === "yes") { return; } // Scroll the node into view diff --git a/core/modules/storyviews/pop.js b/core/modules/storyviews/pop.js index 06d83365289..0c6ce3cd42a 100644 --- a/core/modules/storyviews/pop.js +++ b/core/modules/storyviews/pop.js @@ -24,7 +24,7 @@ PopStoryView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { + if(!targetElement || targetElement.nodeType === Node.TEXT_NODE || listItemWidget.getVariable("tv-disable-storyview-scroll") === "yes") { return; } // Scroll the node into view diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index 2bfc9aed38c..b5d252f3f51 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -52,7 +52,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || listItemWidget.getVariable("tv-inherit-storyview-scroll") === "yes") { + if(!targetElement || listItemWidget.getVariable("tv-disable-storyview-scroll") === "yes") { return; } else if (targetElement.nodeType === Node.TEXT_NODE) { this.logTextNodeRoot(targetElement); diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index 97bb21bdfd8..29623e7e335 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -23,7 +23,7 @@ $button$ \end -<$set name="tv-inherit-storyview-scroll" value="yes"> +<$set name="tv-disable-storyview-scroll" value="yes">
<$list filter="[list]" history=<> storyview="pop">
From 8622d955f75980602ce28dff0fcd6c83f4ee3ab6 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 20 Oct 2024 19:01:28 +0200 Subject: [PATCH 6/7] in zoomin storyview probably not needed, so just add commented out --- core/modules/storyviews/zoomin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index b5d252f3f51..087dfb5bd4c 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -52,7 +52,7 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { var listItemWidget = this.listWidget.children[listElementIndex], targetElement = listItemWidget.findFirstDomNode(); // Abandon if the list entry isn't a DOM element (it might be a text node) - if(!targetElement || listItemWidget.getVariable("tv-disable-storyview-scroll") === "yes") { + if(!targetElement) { return; } else if (targetElement.nodeType === Node.TEXT_NODE) { this.logTextNodeRoot(targetElement); @@ -119,7 +119,9 @@ ZoominListView.prototype.navigateTo = function(historyInfo) { },duration); } // Scroll the target into view -// $tw.pageScroller.scrollIntoView(targetElement); + /* if(listItemWidget.getVariable("tv-disable-storyview-scroll") !== "yes") { + $tw.pageScroller.scrollIntoView(targetElement); + }*/ }; /* From 6f8be1f42cfdf5e3d948e7a0276ab0958bc3892f Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Mon, 21 Oct 2024 05:46:21 +0200 Subject: [PATCH 7/7] use tv-disable-storyview-scroll variable --- core/ui/EditTemplate/fields.tid | 2 ++ core/ui/EditTemplate/tags.tid | 18 ++++++++++-------- core/ui/Manager/ItemSidebarTags.tid | 2 ++ core/ui/PageControls.tid | 12 +++++++----- core/ui/PageTemplate/alerts.tid | 4 ++++ core/ui/PageTemplate/topleftbar.tid | 4 ++++ core/ui/PageTemplate/toprightbar.tid | 4 ++++ core/ui/SideBar/Open.tid | 4 ++-- core/ui/ViewTemplate/tags/default.tid | 14 ++++++++------ core/ui/ViewTemplate/title.tid | 18 ++++++++++-------- core/wiki/macros/tabs.tid | 8 +++++--- 11 files changed, 58 insertions(+), 32 deletions(-) diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index 0edc335054f..a0329aaf2af 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -77,6 +77,7 @@ $value={{{ [subfilterget[text]] }}}/>
+<$set name="tv-disable-storyview-scroll" value="yes"> <$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField" storyview="pop"> <$list filter=<> variable="temp"> @@ -96,6 +97,7 @@ $value={{{ [subfilterget[text]] }}}/> +
diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index c8d4131feb4..6997f8638a3 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -47,14 +47,16 @@ tags: $:/tags/EditTemplate \procedure edit-tags-template(tagField:"tags")
- <$list filter="[getenlist-input[]sort[title]]" storyview="pop"> - <$macrocall $name="tag-body" - colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} - palette={{$:/palette}} - icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} - tagField=<> - /> - + <$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[getenlist-input[]sort[title]]" storyview="pop"> + <$macrocall $name="tag-body" + colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} + palette={{$:/palette}} + icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} + tagField=<> + /> + + <$let tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes"> <$macrocall $name="tag-picker" tagField=<>/> diff --git a/core/ui/Manager/ItemSidebarTags.tid b/core/ui/Manager/ItemSidebarTags.tid index 1c2cbf85cf8..65c88681726 100644 --- a/core/ui/Manager/ItemSidebarTags.tid +++ b/core/ui/Manager/ItemSidebarTags.tid @@ -15,6 +15,7 @@ caption: {{$:/language/Manager/Item/Tags}} \end

+<$set name="tv-disable-storyview-scroll" value="yes"> <$list filter="[all[current]tags[]] [list[$:/config/Manager/RecentTags]] +[sort[title]] " variable="tag" storyview="pop">

<$checkbox tiddler=<> tag=<> actions=<>> @@ -22,6 +23,7 @@ caption: {{$:/language/Manager/Item/Tags}}
+

<$fieldmangler> diff --git a/core/ui/PageControls.tid b/core/ui/PageControls.tid index 833b4cbcb73..972ae88b8cd 100644 --- a/core/ui/PageControls.tid +++ b/core/ui/PageControls.tid @@ -5,10 +5,12 @@ title: $:/core/ui/PageTemplate/pagecontrols

<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> - <$list filter="[!text[hide]]" storyview="pop" variable="ignore"> - <$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}> - <$transclude $tiddler=<> $mode="inline"/> - - + <$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[!text[hide]]" storyview="pop" variable="ignore"> + <$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}> + <$transclude $tiddler=<> $mode="inline"/> + + +
\ No newline at end of file diff --git a/core/ui/PageTemplate/alerts.tid b/core/ui/PageTemplate/alerts.tid index ce1b93db9af..515c27397b0 100644 --- a/core/ui/PageTemplate/alerts.tid +++ b/core/ui/PageTemplate/alerts.tid @@ -3,6 +3,10 @@ tags: $:/tags/PageTemplate
+<$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]" template="$:/core/ui/AlertTemplate" storyview="pop"/> + +
diff --git a/core/ui/PageTemplate/topleftbar.tid b/core/ui/PageTemplate/topleftbar.tid index 2362db869a6..fe5902378ef 100644 --- a/core/ui/PageTemplate/topleftbar.tid +++ b/core/ui/PageTemplate/topleftbar.tid @@ -3,10 +3,14 @@ tags: $:/tags/PageTemplate +<$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]" variable="listItem" storyview="pop"> <$transclude tiddler=<> mode="inline"/> + + diff --git a/core/ui/PageTemplate/toprightbar.tid b/core/ui/PageTemplate/toprightbar.tid index 03629fff259..20251bfd473 100644 --- a/core/ui/PageTemplate/toprightbar.tid +++ b/core/ui/PageTemplate/toprightbar.tid @@ -3,10 +3,14 @@ tags: $:/tags/PageTemplate +<$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]" variable="listItem" storyview="pop"> <$transclude tiddler=<> mode="inline"/> + + diff --git a/core/ui/SideBar/Open.tid b/core/ui/SideBar/Open.tid index 29623e7e335..8ac0188ca99 100644 --- a/core/ui/SideBar/Open.tid +++ b/core/ui/SideBar/Open.tid @@ -23,17 +23,17 @@ $button$ \end -<$set name="tv-disable-storyview-scroll" value="yes">
+<$set name="tv-disable-storyview-scroll" value="yes"> <$list filter="[list]" history=<> storyview="pop">
<$macrocall $name="droppable-item" button="<$button message='tm-close-tiddler' tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class='tc-btn-invisible tc-btn-mini tc-small-gap-right'>{{$:/core/images/close-button}}<$link/>"/>
+ <$tiddler tiddler="">
<$macrocall $name="droppable-item" button="<$button message='tm-close-all-tiddlers' class='tc-btn-invisible tc-btn-mini'><>"/>
- diff --git a/core/ui/ViewTemplate/tags/default.tid b/core/ui/ViewTemplate/tags/default.tid index d524bfccdd4..2fabf6c94e7 100644 --- a/core/ui/ViewTemplate/tags/default.tid +++ b/core/ui/ViewTemplate/tags/default.tid @@ -2,10 +2,12 @@ title: $:/core/ui/ViewTemplate/tags/default \whitespace trim <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
- <$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/> - <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Tags]!has[draft.of]]"> - <$transclude mode="inline"/> - -
+
+ <$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/> + + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Tags]!has[draft.of]]"> + <$transclude mode="inline"/> + +
diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index b2cf1bd8e9c..eaca2f46135 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -7,14 +7,16 @@ tags: $:/tags/ViewTemplate
- <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" - storyview="pop" - variable="listItem" - > - <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> - <$transclude tiddler=<>/> - - + <$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" + storyview="pop" + variable="listItem" + > + <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> + <$transclude tiddler=<>/> + + + <$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> <$link> diff --git a/core/wiki/macros/tabs.tid b/core/wiki/macros/tabs.tid index 1805bc9bea2..8b1fd2e7a49 100644 --- a/core/wiki/macros/tabs.tid +++ b/core/wiki/macros/tabs.tid @@ -37,9 +37,11 @@ code-body: yes \define tabs-tab-list() \whitespace trim -<$list filter=<<__tabsList__>> variable="currentTab" storyview="pop"> - <> - +<$set name="tv-disable-storyview-scroll" value="yes"> + <$list filter=<<__tabsList__>> variable="currentTab" storyview="pop"> + <> + + \end \define tabs-tab-body()