- Brought back Xd-{before,after}-ms and tested it
- Move it to its own ns in graph-parser
- Updated nbb-logseq in deps/
- Made db-utils alias consistent
- Organized resolve-input
* test: sorting for mixed type block properties
* test: edited integer sorting test
Wanted to ensure it included a case where the sorting would
behave different if the numbers were coerced to strings.
In that case, "77" would precede "8" whereas for integer sorting
we want "8" to precede "77".
Renamed `:rating` to `:integer` to reflect this new scenario.
* test: new decimal number test
* test: query table sort semver-style string block properties
* test: query table sort positive and negative integers
* fix: replace separate sort strategies with natural sorting strategy
* fix: comparing only numbers in query table sort
* test: consolidate query table sort integer tests
* format: removed line breaks and consolidated small comparison lines to pass large-vars lint
* Tweaks to PR
- use reader literal for js
- Bring back readability to test, each case should have whitespace
between it. Split up deftest at a natural spot as deftest exceeds
reasonable size of a large var
Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
- Handles inside and outside logseq editing
- Removed temporary catch's that are no longer needed since invalid global
config is not allowed
- Add validation for a couple more documented config options
Also:
- Move test to a more appropriate ns - model-test isn't for testing
higher level parse file behavior
- Delete model fns that are no longer used
- Fix tests which had incorrect target-page-content and were no longer
testing retractAttribute
- Add options to cli ns for related nbb reuse
- Light cleanup of block deletion
* fix(pdf): WIP potential memory leaks
* enhance(pdf): sync page number in highlights metafile
* enhance(pdf): support preview highlight area image in a lightbox
* fix: clojurescript unit tests
* fix(pdf): page number overflow when more digits
Commit fixes a bug where block references (i.e. `:block/refs`
association in the db) are lost when the page containing the referenced
block is re-loaded due to an update of its underlying file.
Description of Bug:
The bug occurs because when a file is re-loaded to the DB from disk, all existing blocks
belonging to the file are deleted via `retractEntity`, and then blocks
from the parsed file are added. If the file had only had small changes,
the new block set will be very similar to the previous one, although
with different db/ids.
However, while new blocks with "id:: " properties will assume the UUID value
of the previous version of the block, any references to that block via
UUID will *not* be restored in the DB; they are deleted with the
retractEntity command. This results in an inconsistent DB state, where references that should
exist do not.
Description of Fix:
The 'delete-blocks-fn' passed to the graph_parser has been modified as
such:
- It now accepts a list of block uuids to *retain*; graph parser will
pass the blocks parsed from the new file content.
- For any blocks which match a UUID in the retain list, instead of
deleting via retractEntity, the individual attributes are deleted via
retractAttribute (the `retract-attributes` from schema.cljs is used
for this purpose).