Skip to content

Commit 70161e4

Browse files
committed
Ensure notes open on add action
1 parent a876193 commit 70161e4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
caption: Supp Notes Content
22
created: 20251107151758434
3-
modified: 20251117043731647
3+
modified: 20251117175059373
44
tags: $:/tags/SupplementaryInfo
55
title: $:/supp-info/notes/content
66
type: application/json

tiddlers/$__supp-info_notes_styles_main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
svg {width: 1.5em; height: 1em; vertical-align: middle;}
2222
}
2323
textarea {width: 100%;}
24-
div.note {flex: 1 0 auto;}
24+
div.note {flex: 1 0 auto; min-height: 2em;}
2525
}
2626
.note {border: 1px solid #ccc; padding: .25em .5em; margin-top: .5em; &>:first-child {margin-top: 0;}}
2727
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
caption: Supp Notes Stylesheet
22
created: 20251115161726500
3-
modified: 20251117041637033
3+
modified: 20251117172354033
44
tags: $:/tags/Stylesheet
55
title: $:/supp-info/notes/styles/main
66
type: text/css

tiddlers/$__supp-info_notes_view-template.tid

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
caption: Supp Notes Template
22
created: 20251107152410791
3-
modified: 20251117044242134
3+
modified: 20251117194827143
44
query: [prefix[$:/supp-info]]
55
tags: $:/tags/ViewTemplate
66
title: $:/supp-info/notes/view-template
77
type: text/vnd.tiddlywiki
88

99
\procedure add-note()
10-
<$let count={{{ [{$:/supp-info/notes/content}jsonindexes<currentTiddler>last[]add[1]] }}}>
10+
<$let count={{{ [{$:/supp-info/notes/content}jsonindexes<currentTiddler>last[]add[1]] }}} css-index={{{ [<count>add[1]] }}}>
1111
<$action-setfield
1212
$tiddler="$:/supp-info/notes/content"
1313
$value={{{ [{$:/supp-info/notes/content}jsonset<currentTiddler>,<count>,[Dummy text]format:json[2]] }}}
1414
/>
1515
<$action-setfield $tiddler=`$:/temp/supp-info/notes/$(currentTiddler)$` $field="state" $value="show" />
16-
<$action-setfield $tiddler=`$:/temp/supp-info/notes/$(currentTiddler)$/$(index)$` $field="mode" $value="edit" />
16+
<$action-setfield $tiddler=`$:/temp/supp-info/notes/$(currentTiddler)$/$(count)$` $field="mode" $value="edit" />
17+
<!-- todo: find out why this doesn't work -->
18+
<$action-sendmessage $message="tm-focus-selector" $param=`div[data-tiddler-title="$(currentTiddler)$"] div.note-row:nth-child($(css-index)$) textarea` />
1719
</$let>
1820
\end add-note
1921

0 commit comments

Comments
 (0)