Commit Graph

105 Commits

Author SHA1 Message Date
Gabriel Horner
04e71a9a23 Bump datascript for nbb-logseq 2024-05-22 09:37:16 -04:00
Tienson Qin
b4bfd5cc9a chore: use clj-fractional-indexing 2024-05-22 15:21:35 +08:00
Tienson Qin
a5a7a781eb fix: keep the last repeated datom (different value) in batch tx 2024-05-15 07:54:31 +08: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
161c5c8565 Merge branch 'master' into feat/db 2024-05-09 08:41:40 -04:00
rcmerci
f69094713f enhance: move missionary-util to src/main/frontend/common/ 2024-05-08 21:56:52 +08:00
Andelf
da78593eb1 fix(sync): cannot delete some nested files
Close #11278
2024-05-08 16:42:41 +08:00
Gabriel Horner
489e7f3422 fix: :default-queries for db graphs
closes LOG-3042. Moved :default-queries to default-config as this allows
for any future fix to automatically update for a user. There's also a
breaking change with this config key from :block/journal? so moving this
to default-config makes the migration easier e.g. just tell users to
remove the config key
2024-05-07 18:03:50 -04:00
Tienson Qin
976e5c2f6b fix: generate n keys for fractional index 2024-05-08 00:37:17 +08:00
Gabriel Horner
719ba8cdbe Merge branch 'feat/db' into refactor/db-properties-schema 2024-05-06 08:38:32 -04:00
rcmerci
b0673fc850 refactor(rtc): remake async upload-graph 2024-05-05 18:20:00 +08:00
rcmerci
9bd1b41441 refactor(rtc): ws2 support s3-presign-url resp 2024-05-05 14:30:15 +08:00
rcmerci
64cd588c1a refactor(rtc): update debug ui with new-impl 2024-05-04 19:35:35 +08:00
Gabriel Horner
88e38b16f4 fix: more lints including removing dead code 2024-05-02 10:35:44 -04:00
Tienson Qin
89edb3af9a fix: can't remove Many values 2024-05-02 18:03:17 +08:00
Tienson Qin
d907eb7654 fix: wrong digs for fractional index 2024-05-02 14:34:38 +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
rcmerci
75f69ffb48 refactor(rtc): split core by adding ns remote, client, exception
and re-impl using missionary
2024-04-30 02:08:00 +08:00
Tienson Qin
95eb0e7f4a Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-29 15:55:23 +08:00
Tienson Qin
cdf546dce7 convert fractional-index js to cljs 2024-04-29 15:30:35 +08:00
rcmerci
39228f4409 feat(rtc): add timeout(10s) for creating ws-connection 2024-04-29 01:43:01 +08:00
rcmerci
e9f5137a86 refactor(rtc): add frontend.worker.rtc.ws2
- backoff reconnect websocket
- auto reconnect closed websocket when sending data
- support timeout when receiving data from websocket
- support cancel
2024-04-28 20:02:00 +08: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
44af2213ce Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-21 13:22:37 +08:00
rcmerci
ffb4bd5a8f chore: update comment 2024-04-17 17:36:00 +08:00
rcmerci
6bce34524a fix: check dep-cycle in sort-coll-by-dependency 2024-04-17 17:31:54 +08:00
Tienson Qin
356f45b8e5 Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-15 11:38:34 +08:00
rcmerci
836cedfd7f fix(undo): sort&merge undo-ops
because maybe some ops depend-on others, e.g. insert parent first then
its children.
2024-04-13 19:53:38 +08:00
Gabriel Horner
12c667fabb Update nbb-logseq to latest datascript 2024-04-02 09:36:28 -04:00
Gabriel Horner
96b35c0252 Update nbb-logseq to stub in cljs-bean.transit 2024-03-11 15:19:50 -04:00
Gabriel Horner
8d0b3c5058 Remove unused :preferred-workflow config for db graphs
part of LOG-3041. Also clean up related namespaces with docstrings
2024-03-07 11:39:51 -05:00
Gabriel Horner
c6e358c983 fix: outliner test failing b/c not nbb compatible
bumped to latest nbb-logseq which is
2024-03-06 11:06:18 -05:00
Gabriel Horner
1706a5c725 fix: hidden pages like favorites showing up in page property
dropdown. Dry up favorites page name scattered across namespaces.
Should be using vars + namespaces in common dep for commonly
referenced features
2024-03-05 10:27:42 -05:00
Tienson Qin
90576661f3 fix: hidden files show up in file graph
fixes LOG-3036
2024-03-01 16:29:03 +08:00
Gabriel Horner
8cc4a9a63c fix lint 2024-02-22 17:03:28 -05:00
Gabriel Horner
dad848fa73 enhance: improve property type detection
with macros. This improves :url property detection in docs
graph and other similar graphs. part of LOG-2985
2024-02-22 16:00:03 -05:00
Gabriel Horner
bfc5bf9ccc enhance: allow user macros for :url property values
and single line :default values
2024-02-22 14:49:03 -05:00
Tienson Qin
7e8ab72494 Merge branch 'feat/db' into perf/lazy-load-data 2024-02-07 04:07:40 +08:00
Gabriel Horner
6a73ffa5f7 fix: lints and a docstring 2024-02-05 17:03:44 -05:00
Gabriel Horner
81697573b8 Merge branch 'master' into feat/db 2024-02-05 13:49:37 -05:00
Tienson Qin
c1a15c0708 Merge branch 'feat/db' into perf/lazy-load-data 2024-02-01 03:58:04 +08:00
Gabriel Horner
a68c5eea52 fix: file/name-format is file graph only
Confirmed this with the last refactor. Also remove references to
setting that was removed in eb6e5942f8
2024-01-31 13:34:12 -05: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
f6e9e2630f fix: deprecate :favorites for db config
related to LOG-3031. Also comment all known
file graph only config keys
2024-01-30 15:26:19 -05:00
Tienson Qin
3addb5905b perf: load partial data when loading a graph
Instead of all the datoms
2024-01-29 13:17:37 +08:00
Gabriel Horner
24ea74e73a fix: upstream tests and lints failing again 2024-01-24 10:25:35 -05:00
Tienson Qin
a64f49dc6f Remove :block/marker and :block/priority from tx-data 2024-01-24 16:38:09 +08:00
Gabriel Horner
34222b3436 chore: bump nbb-logseq that points to upstream nbb 2024-01-15 18:07:49 -05:00
Gabriel Horner
2305d09cc8 chore: DRY up duplicated vars and needless/confusing aliases 2024-01-15 16:51:27 -05:00