Commit Graph

487 Commits

Author SHA1 Message Date
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
Tienson Qin
0b49d09fb1 fix: db schema validate 2024-04-07 17:26:58 +08:00
Tienson Qin
f52993ec6d fix: tests and lint warnings 2024-04-07 14:27:05 +08:00
Tienson Qin
6eb6e60b55 Bring back namespaces/page merge/nested pages 2024-04-07 13:48:55 +08:00
Tienson Qin
0bc8d1c3b1 Merge branch 'refactor/db-properties-schema' into refactor/db-remove-block-name-unique 2024-04-05 15:16:13 +08:00
Tienson Qin
ac31842cec Revert "Remove :block/macros"
This reverts commit 21d550de12.
2024-04-05 15:12:56 +08:00
Tienson Qin
ea98a1623e Merge branch 'refactor/db-properties-schema' into refactor/db-remove-block-name-unique 2024-04-05 09:56:39 +08:00
Gabriel Horner
7c1f52d2a4 chore: add format to build-new-page
every use of it was adding it manually
2024-04-04 09:25:20 -04:00
Tienson Qin
8054150eef fix: unit tests 2024-04-04 15:57:49 +08:00
Tienson Qin
6167abe160 fix: extract page from whiteboard edn 2024-04-04 15:57:49 +08:00
Tienson Qin
1f32893547 fix most issues on whiteboards 2024-04-04 15:57:48 +08:00
Tienson Qin
9df8918f94 Remove more :block/name lookup ref usage 2024-04-04 15:57:48 +08:00
Tienson Qin
60d4fca0ba wip: remove :block/name uniqueness for db based graphs
This PR also remove supports for:
1. merge pages when renaming a page to existing page
2. namespaces such as a/b/c
3. nested page such as [[a [[nested page]]]]

Pages merge might be added back depends on RTC, but it should be
decoupled from renaming, otherwise it's too complex.

Namespaces and nested pages have been contributed some critical bugs
that lead data-loss, they're so complex together with page alias,
it's just impossible to have a good test coverage and ensure the app
is stable, especially when page rename and RTC.
2024-04-04 15:57:48 +08:00
Tienson Qin
7084b53dad Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-03 20:29:11 +08:00
Gabriel Horner
12c667fabb Update nbb-logseq to latest datascript 2024-04-02 09:36:28 -04:00
Gabriel Horner
93846fe62f enhance: add import support for priority, scheduled and deadline
fixes LOG-3030
2024-04-01 12:31:39 -04:00
Gabriel Horner
745fcdb7a3 enhance: import tasks
Part of LOG-3030
2024-04-01 10:48:25 -04:00
Tienson Qin
1987c455e7 Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-01 15:47:43 +08:00
Tienson Qin
d48e45eaa7 enhance: property db ident doesn't allow # 2024-04-01 14:53:25 +08:00
Tienson Qin
02643a1561 fix: tests 2024-04-01 14:25:39 +08:00