Commit Graph

506 Commits

Author SHA1 Message Date
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
Tienson Qin
6df866a2d1 fix: handle more whiteboard properties 2024-04-08 22:56:14 +08:00
Tienson Qin
2940e86d74 fix: save whiteboard 2024-04-08 22:54:56 +08:00
charlie
618f3bd107 Merge branch 'master' into feat/db 2024-04-08 19:00:51 +08:00
Tienson Qin
cd38e0b9f9 fix: calculate :block/path-refs when adding new graph or re-index 2024-04-08 17:24:51 +08:00
Tienson Qin
210be5aaca fix: creating redundant pages when editing a block 2024-04-08 01:25:48 +08:00
Tienson Qin
a324d845b2 fix: don't parse refs from quoted string 2024-04-07 21:35:14 +08:00
Tienson Qin
b5f0f58efc fix: missing refs for property text values when creating a page 2024-04-07 21:35:14 +08:00