Commit Graph

258 Commits

Author SHA1 Message Date
Gabriel Horner
5b4cb0d213 chore: add test for block refs
Part of LOG-3092
2024-07-08 16:05:30 -04:00
Gabriel Horner
13048a901c chore: add more property tests for db import
Part of LOG-3092
2024-07-08 15:59:33 -04:00
Gabriel Horner
057d6b459f fix: :url property values with macros
Macros in :url are useful for having urls with a common hostname that
can be configured once. Without this fix, docs graph is invalid
2024-07-08 13:34:28 -04:00
Gabriel Horner
47cbe96126 chore: reduce logging verbosity of parser tests 2024-07-08 12:15:07 -04:00
Gabriel Horner
3d732cb018 fix: new class should always set :block/type to "class"
New change with :block/type "page" was causing :tag-classes option to
fail. Part of LOG-3176
2024-07-08 11:46:27 -04:00
Gabriel Horner
f7b753758c fix: tests with outdated :block/type assertions
also fix lint
2024-07-08 09:51:29 -04:00
Gabriel Horner
564effbe07 fix: db import of property pages with new properties
Part of LOG-3176
2024-07-06 21:42:31 -04:00
Gabriel Horner
8008ae4a76 fix: db import of tagged pages and blocks
using :property-classes option. Part of LOG-3176
2024-07-06 17:13:44 -04:00
Gabriel Horner
b870d71ea2 chore: configure and test importing favorites
Also test :hidden config with existing page count assertion and new ignored page
2024-07-06 12:15:52 -04:00
Tienson Qin
31305e1904 Merge branch 'feat/db' into feat/tables 2024-07-04 14:48:55 +08:00
Gabriel Horner
e268f2a719 chore: add test for db import of icon
part of LOG-3092
2024-07-03 17:08:02 -04:00
Gabriel Horner
96b6763d22 fix: db import of pre-block children
Caused by :block/name no longer being unique. Also created helper
for common lookup of page-names-to-uuids. Part of LOG-3176
2024-07-03 16:37:33 -04:00
Gabriel Horner
4fb25ff269 fix: incorrect properties warning for empty pages in db import
Also remove unused macros and tweaked test assertions from last import
commit
2024-07-03 12:48:10 -04:00
Gabriel Horner
766add9f0c fix: pages with tags import as classes with
:tag-classes option. Part of LOG-3176
2024-07-03 10:01:05 -04:00
Gabriel Horner
f0ecf03c4a fix: db import of tagged page with pageTags
Part of LOG-3176
2024-07-02 16:50:00 -04:00
Gabriel Horner
cc4d4588e3 fix: db import of tagged blocks
Test this and and :tag-classes option. Part of LOG-3176
2024-07-02 15:59:04 -04:00
Gabriel Horner
1ede4721b7 fix: db import of query properties
Part of LOG-3176
2024-07-02 13:32:48 -04:00
Gabriel Horner
b754234ac3 chore: add import test for deprecated properties
Also improved test readability. Part of LOG-3092
2024-07-02 09:59:59 -04:00
Gabriel Horner
7d1f18a6c6 fix: db import of priority and status
Part of LOG-3176. Also fix incorrect test assertion for deadline test
2024-07-02 09:32:44 -04:00
Gabriel Horner
98122fb3c8 fix: db import of deadline and scheduled
Part of LOG-3176
2024-07-02 20:17:02 +08:00
Gabriel Horner
178ccab99b chore: add test for importing block/refs
Also removes precarious and outdated property update in refs. Part of
LOG-3092
2024-07-02 20:17:02 +08:00
Gabriel Horner
8929d12736 fix: converting existing page into a property page
part of LOG-3176
2024-07-02 20:17:02 +08:00
Gabriel Horner
d4f691f54c fix: db import of page properties
For new and existing pages. Part of LOG-3176
2024-07-02 20:17:02 +08:00
Gabriel Horner
3de05eb97a fix: db import of basic block properties
Some FIXMEs will be fixed soon. Part of LOG-3176
2024-07-02 20:17:02 +08:00
Gabriel Horner
2e823a5555 fix: cleanup inconsistent and incorrect import error handling
Some notified errors didn't include error object. Import cli didn't fail
on failure and stack was reversed. Error notifications sometimes
included full error which makes errors unreadable in CLI and possibly
confusing for users. Also fixed missing classpath. Part of
LOG-3176
2024-07-02 20:17:02 +08:00
Gabriel Horner
0c1cdbdd67 fix: add import test for asset
part of LOG-3092
2024-07-02 20:17:02 +08:00
Gabriel Horner
3622a83024 fix: db import of deadline and scheduled
Part of LOG-3176
2024-07-01 17:45:20 -04:00
Gabriel Horner
e80f16731a chore: add test for importing block/refs
Also removes precarious and outdated property update in refs. Part of
LOG-3092
2024-07-01 16:05:52 -04:00
Gabriel Horner
52ffb9a04f fix: converting existing page into a property page
part of LOG-3176
2024-07-01 15:23:25 -04:00
Gabriel Horner
71b1586df6 fix: db import of page properties
For new and existing pages. Part of LOG-3176
2024-07-01 12:35:07 -04:00
Gabriel Horner
bd5f43d233 fix: db import of basic block properties
Some FIXMEs will be fixed soon. Part of LOG-3176
2024-06-28 17:56:27 -04:00
Gabriel Horner
9ee09372aa fix: cleanup inconsistent and incorrect import error handling
Some notified errors didn't include error object. Import cli didn't fail
on failure and stack was reversed. Error notifications sometimes
included full error which makes errors unreadable in CLI and possibly
confusing for users. Also fixed missing classpath. Part of
LOG-3176
2024-06-28 11:16:22 -04:00
Gabriel Horner
92134dec71 fix: add import test for asset
part of LOG-3092
2024-06-28 09:14:43 -04: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
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
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
Gabriel Horner
602b236a4c fix: graph-parser lint 2024-05-02 10:23:20 -04: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
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
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
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
9df8918f94 Remove more :block/name lookup ref usage 2024-04-04 15:57:48 +08:00
Gabriel Horner
f728b7b9f6 fix: multiple bugs with built-in pages, fixes LOG-3046
- file graph wasn't creating built in pages
- 3 places where db graphs were incorrectly using file graph built in
  page names
- file graphs creating default pages with incorrect format
2024-03-29 16:21:19 -04:00
Gabriel Horner
bf56cd3252 chore: move legacy fns to legacy ns
title property is for file graphs and should be kept with its ns
to avoid confusion
2024-01-31 11:11:14 -05:00
Gabriel Horner
951e7cc841 fix: ns-docstring and large-var deps lints
Also fixed db-and-file-graphs-separate lint and moved gp-property tests
that should be moved since their source code has moved from frontend
to gp-property
2024-01-12 17:03:09 -05:00
Gabriel Horner
cdddce0120 fix deps db test and most lints
Also deleted duplicated gp-util.{page-ref,block-ref} files that were moved to common
and moved a related test to common dep
2024-01-11 14:35:04 -05:00