-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tocs event handler for drag and drop Should also handle rename/remove/etc * Update vscode types to latest version * Always set dragging to undefined after a drop * Add orphans to tree view and try to fix coverage The orphans appear outside of all books, at the bottom of the tree view * Use contextValue to conditionally add buttons to tree items Might be better to use `capabilities`, an array of words like 'delete', 'rename', etc., to support conditions Example: we may not want to allow removing an orphaned subbook/page * Use capabilities instead of ToCNodeKind for tree condition * Use data transfer items instead of class field for dragged item * Update tests; add some polish * Find parent book recursively instead of iteratively Mostly to address a problem with the tsconfig file, but it's probably better this way anyway * Remove seemingly unnecessary istanbul ignores * When moving node to different book, update both collection files I was stuck on this for a bit. Initially I tried to write the srcBookToc immediately after removing the node on model-manager.ts:594. The tests kept failing because the page was being orphaned instead of appearing in the second book. I realized that the sideEffectFn was running which overwrote `this.bookTocs` with a new array. This meant that the splice (model-manager.ts:597) was modifying a different list of children because the reference returned by `lookupToken` was not the same as the one stored in `bookToc`. I moved my write operation to the end and added a warning. Hopefully the warning will save someone else from this confusion in the future. * Fix typo in comment * Add Ancillary functionality to TOC Tree * Fixed test cases * Added `book-tocs` snapshot to commit. * Code lint * Fixed the code coverage. * Fixed bug when the no node was selected * Move leaf nodes into Book and Subbook drop targets Before: Move leaf node above or below Book/Subbook drop target After: Insert leaf node at the top of the Book/Subbook child list (index 0) * Properly handle ouroboros case for subbooks * Added possibility to create nodes in selected books and subbooks * Updated the tests. --------- Co-authored-by: Tyler Nullmeier <tylerzeromaster@gmail.com>
- Loading branch information
1 parent
80b43d0
commit 30dcb65
Showing
20 changed files
with
989 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.