novident_tree_view 1.1.0
novident_tree_view: ^1.1.0 copied to clipboard
A flexible internal Novident library for visualizing hierarchical structures with full control over nodes
1.1.0 #
- Feat(breaking changes):
NodeDraggableBuilderandNodeTargetBuilderreplaced by a singleNodeDragAndDropBuilderwidget. The unified widget removes a frame delay that existed betweenDraggableListenerupdates andDragTargetreactions when the two widgets were nested, eliminates duplicateNodeDragGesturesconstruction, and makes drag-start events immediately visible to theDragTargeton the same node. - Feat(breaking changes):
TreeConfigurationrenamedcomponents→builders,draggableConfigurations→dragConfig, andextraArgs→sharedData. Removed internal-use propertiesonHoverContainer,onHoverContainerExpansionDelay, andlistViewConfigurations(uselistViewinstead). Addedindentshorthand,topZoneHeight, andbottomZoneHeight. - Feat(breaking changes):
NodeConfiguration.onHoverrenamed toonHoverInkWell. - Feat(breaking changes):
DragHandlerPositionenum replaced byDropPosition(exported fromnovident_nodes). All APIs that referencedDragHandlerPosition(isDropPositionValid,exactPosition,mapDropPosition) now operate onDropPosition. - Feat(breaking changes):
DraggableConfigurations.allowAutoExpandOnHoverrenamed toexpandOnHover. Added factoryDraggableConfigurations.simple()for quick setups.childDragAnchorStrategychanged from Flutter'sDragAnchorStrategytoEffectiveDragAnchorStrategyfor correct cursor-relative feedback placement. - Feat(breaking changes):
NodeComponentBuilder.validate()now receivesint depthas a second parameter; builders must implementbool validate(Node node, int depth). - Feat(breaking changes):
IndentConfiguration.basic()constructor renamed parameters:indentPerLevel→indent,sizeOfLeadingremoved. AddeddirectoryLeading,addExtraPaddingFromLevel, andsystemFile()factory preset. - Feat(NIP-01):
NodeComponentBuildernow receivesComponentContextindispose,didUpdateWidget, anddidChangeDependencieslifecycle methods. - Feat:
isDraggingflag added toNodeComponentBuilderandComponentContext. Unlikecontext.details(which is only non-null while hovering over a drop target),isDraggingremainstruefor the entire drag lifecycle — enabling persistent visual feedback on the row being dragged. - Feat:
marksNeedBuildcallback added toComponentContextso builders can request a tree rebuild from inside gesture handlers. - Fix: tree state corruption after a sequence of mutations (insert, delete, move, reorder) no longer leaves stale node references that required a full restart to recover. The root cause was
NodeContainer.update()returning a cloned node whoseNodeDetailscompared equal to the original via==, causingdidUpdateWidgetguards to skip necessary rebuilds. The fix switches selection-change detection from value equality (==) toidentical()comparison on node details. - Fix:
DraggableListenercould benullduring early tree lifecycle stages (before the first layout pass). The listener is now lazily resolved and re-checked on each drag-start event. - Fix:
DragTargeton the node being dragged itself ("hover over self") now correctly receivesonWillAcceptWithDetailson the first frame after drag-start, eliminating a one-frame visual glitch where drag feedback was invisible until the pointer moved. - Fix:
NovDragAndDropDetailswere not being propagated toDragAndDropDetailsListeneron every drag-move event, causing the live error badge onNodeDragCardto miss updates during rapid pointer movement. - Fix:
standardDragAndDropfactory incorrectly accepted drops in the "above" zone whenisDropIntoAllowedreturnedfalseand in the "below" zone whenisDropPositionValidreturnedfalse. - Fix: hover-expansion timer leak —
_timerwas not cancelled on fast subsequent_onMovecalls, causing multiple pending timers to fire and expand a collapsed node repeatedly. - Fix:
LongPressDraggabledrag-completion lifecycle was not calling_onDragCompleted, leavingDragListenerstate (draggedNode,globalPosition) uncleaned after a successful drop. - Fix: folder icon logic corrected —
folder_openis now shown whenever a directory is expanded, regardless of whether it has children (previously only shown when expanded AND empty). - Fix(example):
NodeContainer.update()side-effect no longer mutates_lastNode.details.owner— details are cloned before the update. - Fix(example): child nodes can be re-inserted into their original parent again after being moved out.
- Chore: deprecated
onHoverContainerandonHoverContainerExpansionDelayinTreeConfiguration. Their behaviour is now handled byNodeComponentBuilder.onTryExpand()andonHoverCallDelay. - Chore: removed unused
wrapWithDragAndDropWidgetsutility anddefault_nodes_wrapper.dart. - Chore: removed
dart:iodependency andPlatform.isAndroid/Platform.isIOSchecks from library code (now handled byDraggableConfigurations.preferLongPressDraggableat configuration time). - Docs: complete rewrite of all files under
doc/andREADME.md— every class signature, parameter table, constructor, and code example now reflects the 1.1.0 API. - Example: redesigned the desktop workspace as a Scrivener-like binder + editor pane. Binder re‑styled with animated disclosure chevrons, child‑count badges, compact 28 px row height, and a warm
#F0EFEEsurface. Editor replaced the fragileStacklayout with a stableColumncontaining breadcrumb, single‑row format bar, and a sheet‑of‑paper metaphor (white page centered over#ECECECbackground with a two‑layer shadow). Drag‑over‑editor overlay shows a veil + accent‑bordered "Open<file>" card. Expanda example content from 3 placeholder documents to 6 narrative documents with varied Quill attribute usage (headers, bold, italic, blockquote, lists, links, code blocks). - Test: example smoke test replaced the broken template counter test with a real workspace boot test that verifies the binder, breadcrumb, README selection, and all root folders.
1.0.8 -> 1.0.9 #
- Chore: update dependencies.
1.0.7 #
- Fix: If we change something into the
validatemethod ofNodeComponentBuilderclass thecomponentBuildersare not reloaded. - Fix: Inconsistencies with
ListenableBuilderimplementation inContainerBuilderwidget. - Feat(breaking changes): added property
depthto validate method inNodeComponentBuilderclass. - Feat: added methods for state management like
didUpdateWidget,didChangeDependencies,initStateanddisposemethods forNodeComponentBuilderclass. - Chore: deprecated
onHoverContainerExpansionDelayandonHoverContainer, and them were replaced byonHoverCallDelayandonTryExpandinto theNodeComponentBuilderclass. - Chore: deprecated
onHovermethod in NodeConfiguration class and was replaced byonHoverInkWellthat makes more sense with its function. - Fix:
DraggableListeneris not being updated correctly in certain situations. - Fix: missing
NovDragAndDropDetailsupdates at some dragging events. - Chore(breaking changes): changed type
DragAnchorStrategytoEffectiveDragAnchorStrategy. - Chore(example): added trash icon for remove nodes manually dragging them over it.
1.0.6 #
- Fix: changelog typos.
1.0.5 #
- Feat: added
buildChildrenAsyncand related helper methods to create async rendering for Nodes (like github does). - Feat: added
indexproperty toComponentContext. - Fix(example): children can be re-inserted into its parent again.
1.0.2 #
- Fix: bad example code in
NodeDragGesturesclass. - Fix: outdated documentation.
- Fix: added
TreeViewbasic example in README. - Fix:
addRepaintBoundariesisn't doing anything.
1.0.1 #
- Fix: missed imports and constant for widgets constructors.
1.0.0 #
- First commit