Commit graph

16 commits

Author SHA1 Message Date
7e33103bc9
expand only one sibling at a time 2026-05-04 10:06:06 +03:00
c73cbe2f1a
hide node action buttons until title clicked 2026-05-04 09:45:36 +03:00
17ab181adb
guard text.js node fetch on non-ok response 2026-05-03 17:32:48 +03:00
b5040fff14
handle forbidden and not found errors on text page 2026-05-03 16:36:57 +03:00
a1bfe4f7c1
close other add forms when opening a new one
introduce closeAllAddForms which strips every add-child and
bulk-add input/button from the tree, and call it at the start of
toggleAddForm and toggleBulkAddForm (after the same-li toggle-off
short-circuit, so clicking the same trigger still closes its own
form). enforces a single open add form across the whole tree.
2026-05-01 11:58:12 +03:00
bd14bfd7a1
submit bulk add form on enter key
extract the save-bulk handler into a submit closure shared by the
save button click and a keydown listener on both the title and
count inputs. focus the title input as soon as the form opens.
2026-05-01 11:55:43 +03:00
3928fef213
submit add child form on enter key
extract the save-child handler into a submit closure shared by
the save button click and a keydown listener on the input. also
focus the input as soon as the form opens so the user can type
and hit enter without touching the mouse.
2026-05-01 11:53:54 +03:00
1342a67cf3
preserve expanded state across node re-render
introduce a module-level expandedNodeIds set that tracks which
nodes the user has manually expanded. renderTree consults the set
when deciding initial visibility (falling back to the depth-based
default for a fresh load), the toggle click handler keeps the set
in sync, and both add-child save handlers add the parent's id
before triggering the re-fetch. on a fresh load the set starts
empty so root-only-open behavior is unchanged and the existing
toggle tests keep passing.
2026-05-01 11:45:55 +03:00
c649dbbcc2
include credentials on fetch calls 2026-04-24 13:30:54 +03:00
12fd5a88b6
add toggle children button to nodes 2026-04-20 09:35:53 +03:00
9ed42654a3
add js for bulk creating nodes 2026-04-18 23:06:04 +03:00
3ce6a91e6e
add and save button functionality 2026-04-18 22:07:38 +03:00
f277ae7983
move fetch nodes by text id into its own function
re renders if theres a root list of nodes existing
2026-04-18 22:06:25 +03:00
f5a8b8447f
rename route for nodes and adjust calls to route 2026-04-18 21:01:02 +03:00
49140195f1
add parsing functions for nodes of text to create indented tree 2026-04-17 17:52:32 +03:00
68da48aedd
add view for single text 2026-04-17 09:23:38 +03:00