Commit Graph

513 Commits (ba9d8d7920bcfb6e02ec07ca4a50deca2df0bf5e)

Author SHA1 Message Date
Gabriel Horner ba9d8d7920 Bump nbb with latest datascript
Test fixes are reasonable as datascript catches more invalid uses of
query
2024-07-02 20:17:02 +08:00
Gabriel Horner d7adee57e8 fix: Insufficient bindings error after datascript upgrade
After upgrading our forked datascript from 1.5.3 to 1.7.1,
bindings in two of our rules behaved differently. The workaround
of adding an `and` where none was required before is sufficient.
Fixes LOG-3177
2024-07-02 20:17:02 +08:00
Tienson Qin ade53ebce1 fix: prefer passed page-uuid 2024-06-27 17:55:35 +08:00
Gabriel Horner b70ba087b3 fix: new graph-parser test passes with clj runner
part of LOG-3092
2024-06-26 16:14:50 -04:00
Gabriel Horner e619874dc4 enhance: add acceptance test for file to db graph import
Part of LOG-3092
2024-06-26 15:59:09 -04:00
Gabriel Horner 51a2c1425f fix: db import for very basic file
Basic file couldn't import because :block/name is no longer unique for
db graphs. Part of LOG-3176
2024-06-26 15:59:09 -04:00
Gabriel Horner 5520bc1d33 fix: import single file from CLI didn't print error
Also improved CLI error reporting so sci stack is readable and
not filled with stack fn docstrings
2024-06-26 15:59:09 -04:00
rcmerci dc785a92a7 refactor: make journal-day page's uuid like this
00000001-2024-0620-0000-000000000000
2024-06-20 17:01:58 +08:00
Tienson Qin 62a2564f4d fix: add missing file/created-at attribute for db graphs 2024-06-20 16:57:38 +08:00
Tienson Qin 626e0b67e8 fix: store latest file stat
Fixes LOG-3143
2024-06-20 09:22:35 +08:00
Tienson Qin b294896f8a fix: reuse page uuids when parsing files
This commit also removes `with-id?` because it's too confusing.

Fixes LOG-3143
2024-06-15 22:52:30 +08:00
Tienson Qin 4281274512 fix: graph parser tests 2024-06-15 21:08:25 +08:00
Gabriel Horner 9a8c91c0cc chore: mv logseq.db.sqlite.db into sqlite.cli
for more explicit name and purpose. Also updated outdated db readme
and removed unused fns in logseq.db.sqlite.db
2024-06-14 16:53:19 -04:00
Gabriel Horner 95db811f55 fix: frontend tests shouldn't depend on sqlite3
frontend.test.helper was accidentally coupled to sqlite3 via
logseq.outliner.db-pipeline. Split out sqlite3 dependent fns to
logseq.outliner.cli so it's clear this shouldn't be coupled to frontend
2024-06-14 14:41:24 -04:00
Tienson Qin d588df622e fix: :block/uuid not created for property value pages
Related to LOG-3124
2024-06-14 22:15:56 +08:00
Tienson Qin c7827ee268 fix: can't create alias property for file based graph 2024-06-14 21:00:32 +08:00
Tienson Qin 1858180476 fix: don't create bi-directional alias
related to LOG-3124
2024-06-14 20:00:37 +08:00
charlie 6c7c282a03 fix(pdf): insert keyword property value for the file based graphs 2024-06-13 17:25:05 +08:00
Tienson Qin 0ce2ee42db Revert "refactor: use files instead of sqlite for electron db storage"
This reverts commit c2c5ab80aa.
2024-06-13 13:04:00 +08:00
Tienson Qin 596089f161 Revert "fix: add missing fs-extra package"
This reverts commit 032cad0318.
2024-06-13 13:04:00 +08:00
Tienson Qin 1dc72d79f2 fix: separate page/create impl for db and file graphs
Also, move rtc page create impl to its own fn.
2024-06-12 06:39:06 +08:00
Gabriel Horner 0e1ada2ef6 enhance: bb task for creating graphs from EDN file
Converted inferred graph to an EDN file now that this task exists. Also
merge last of tasks.create-graph to relevant ns so that external users
can also create such tasks
2024-06-11 10:09:37 -04:00
Tienson Qin 032cad0318 fix: add missing fs-extra package 2024-06-11 20:00:32 +08:00
Tienson Qin c2c5ab80aa refactor: use files instead of sqlite for electron db storage 2024-06-11 08:30:49 +08:00
Gabriel Horner 62701e1b6e fix: tests with outdated datom counts
I think caused by recent macros parsing or whiteboard changes
2024-06-05 17:06:16 -04:00
Tienson Qin 7beebedbd2 fix: embed block macro is buggy
fixes LOG-3145
2024-06-05 14:27:13 +08:00
Tienson Qin da3929376a fix: don't extract macros from block content for db graphs 2024-05-30 21:32:45 +08:00
Tienson Qin 1cfc426486 enhance: properties ux
1. add icons to priorities
2. hide task properties so that blocks are not collapsable
3. block positions support end of block
2024-05-23 17:18:23 +08:00
Gabriel Horner 04e71a9a23 Bump datascript for nbb-logseq 2024-05-22 09:37:16 -04:00
Gabriel Horner 980c88b60d fix: remove table v2 properties
Finish removal started by 82a1a18762.
Still need names in exporter so they aren't incorrectly imported
into db graphs
2024-05-15 10:25:31 -04:00
Tienson Qin ce4cad2cc7
Refactor/move property handler to outliner dep (#11311)
The end goal is to get rid of `db/transact!` and send outliner ops to
the db worker.

Currently, some property ops are async, set-block-property! will also
need to be async because when setting a non-ref value (e.g. a number
str "2"), we need to query whether a block with the value exists, this
unfortunately, will be an async query, so we're risking turning more
functions to async in the future which makes it hard to reason about
the implementation.
2024-05-13 18:16:21 +08:00
Gabriel Horner 6a83812ae9 fix: typing TODO/DOING/etc shouldn't create marker pages for db graphs 2024-05-06 11:49:56 -04:00
Gabriel Horner 42e00f00d7 fix: typo and add more fix-mes left from :block/order change
/cc @tiensonqin and @RCmerci for tests to fix
2024-05-06 11:26:16 -04:00
Gabriel Horner 602b236a4c fix: graph-parser lint 2024-05-02 10:23:20 -04:00
Gabriel Horner 1dbdb16765 fix: whiteboard shapes being invalid 2024-05-02 10:01:08 -04:00
Tienson Qin 89edb3af9a fix: can't remove Many values 2024-05-02 18:03:17 +08:00
Tienson Qin 1ec4796eff refactor: replace :block/left with :block/order
Finally no need to worry about parent-left conflicts and broken chain.
With :block/order, we only need to re-compute new orders for siblings
with same order (it can happens if there're bugs in our code, or
updates from rtc), but it doesn't break UI.

Another huge potential benefit after discussing with Zhiyuan is:
Ee might be able to simplify both RTC and undo/redo, currently, we
need to handle each new op for both of them, with recently
refactorings like properties being db attributes, :block/order
is a string instead of a ref, we can handle most property value
conflicts using last-write-wins, and others (e.g. :block/parent,
property with :default type) specifically.

I haven't fixed the issues of using :block/left in RTC and undo/redo,
because we might change both soon.
2024-05-02 01:12:22 +08:00
Gabriel Horner a35bc9b0d6 Bump nbb-logseq version for datascript and ordered-map changes 2024-04-30 10:10:11 -04:00
Tienson Qin 5d4ae66d86 revert: remove :block/properties 2024-04-28 19:44:53 +08:00
Gabriel Horner 3681ac354b fix: move db-pipeline and datascript-report back to outliner dep
graph-parser is primarily a file graph dep that is maintained separately
from db graphs. We want to move as many namespaces out of it as
possible. Also moved differing count assertions to
their respective tests
2024-04-25 11:22:14 -04:00
Tienson Qin d82c7fa2f5 fix: tests 2024-04-25 17:33:37 +08:00
Tienson Qin b55c064305 fix: move :block/path-res calculation to dep graph-parser 2024-04-25 16:50:04 +08:00
Gabriel Horner 878d69f342 fix: graph parser tests
extract and dependent namespaces require a db now and :block/path-refs
is no longer being handled in this dep
2024-04-24 16:55:24 -04:00
Gabriel Horner c87c077d29 enhance: new classes can be case sensitive 2024-04-24 15:18:20 -04:00
Tienson Qin 8d9e6da41e refactor: use :block/type for journal pages instead of :block/journal?
breaking change:
removes :block/journal attribute
2024-04-24 20:12:15 +08:00
Tienson Qin fef4e896e1 fix: use existing property pair if exists 2024-04-24 19:13:48 +08:00
Tienson Qin 13edd74c2c fix: can't save whiteboard updates 2024-04-24 17:59:01 +08:00
Gabriel Horner 0aa4bda66c fix: inlined db-based-graph? calls in db-property
Addressed fixmes for db-based-graph fns that were inlined to prevent
circular dependencies b/n db-property and sqlite-util.  Moved multi
graph fns to db-property-util and existing db-property-util to
db-property-build to address this
2024-04-16 14:43:28 -04:00
Tienson Qin 81e5d5f68f fix: remove frontend.config usage from graph parser dep 2024-04-11 23:02:50 +08:00
Tienson Qin 9f9bfbc5e6 Merge branch 'feat/db' into refactor/db-remove-block-name-unique 2024-04-08 23:56:46 +08:00