Commit Graph

696 Commits (19435347b9ff4f5301a07ae5c2363dd44711e7f1)

Author SHA1 Message Date
Gabriel Horner f573b8e821 fix: file graph import not persisting to disk 2024-01-17 12:57:16 -05:00
Gabriel Horner 0168ef0082 fix: 2 bugs with file import
These were silently failing and causing a number of pages to
not import
2024-01-16 17:01:23 -05:00
Gabriel Horner 095894b255 Revert most of "fix: new db graph couldn't be created"
Last commit removed built-in pages and was noticed on imports.
Previous bug of new db graphs leading to a blank screen no longer
occurred after I printed transact! transactions
2024-01-16 16:05:02 -05:00
Gabriel Horner d232a8e08c fix: new db graph couldn't be created
Caused by duplicate transacting of default-pages. Also
removed reference to deleted ns
2024-01-16 11:37:25 -05:00
Tienson Qin cea105cc34 fix: wrong ns import 2024-01-16 16:01:18 +08:00
Tienson Qin a619850998 Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-16 15:42:18 +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
Gabriel Horner ca020fcdb3 fix: loading all new deps namespaces in nbb
- bb test:load-all-namespaces-with-nbb now passes for all deps
- Updated nbb-logseq to support cljs.core/Atom
- Adjusted datascript.impl.entity with previous datascript.db require
  so that correct loading occurs in nbb
- fixed missing deps in logseq.outliner
- Converted a minor cljs.spec to malli since malli is nbb compatible
- Changed exists? to some? since they are functionally equivalent for
  the given arg and some? is nbb compatible
2024-01-15 12:43:16 -05:00
Tienson Qin 774a159451 fix: history e2e tests 2024-01-14 16:55:07 +08:00
Tienson Qin b55e4e7380 fix: db requests could be dropped if some requests not finished yet 2024-01-14 12:55:55 +08: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 66f57104ab fix: fail-invalid? option on in-app db validation
alert can't be called in a worker
2024-01-12 15:12:18 -05:00
Gabriel Horner 690764aa52 fix: unused time dep and duplicated time-ms fns
cljs-time shouldn't be added to nbb.edn since it's already included in
nbb-logseq (since parts of it aren't nbb compatible). duplicated
time-ms fns can now be removed since they are available to all deps
from common dep
2024-01-12 10:41:22 -05:00
Gabriel Horner 98dd1c2b5c fix: published graphs failing on class pages
Bring back get-namespace-pages impl that doesn't add :block/file
to db graphs. :block/file isn't used in db graphs.
Also got kondo lint back to green
2024-01-11 16:40:13 -05:00
Tienson Qin d5e62ae21f fix: ensure linear sequential transactions for the db worker 2024-01-12 04:14:22 +08: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
Gabriel Horner a81e18e9a6 fix: update nbb-logseq and make entity-plus nbb compatible
deps can now load in nbb and all nbb tests pass except for db
2024-01-11 13:10:06 -05:00
Tienson Qin 6173879ca0 fix: test 2024-01-12 00:41:03 +08:00
Tienson Qin a9074f74f4 fix: outdent 2024-01-11 23:43:23 +08:00
Tienson Qin a81229576d fix: group transactions 2024-01-11 20:18:40 +08:00
rcmerci 16f1f448db fix malli_schema for asset-block 2024-01-11 18:09:11 +08:00
rcmerci 2dca1b6df8 feat(rtc): add schema for asset 2024-01-11 14:08:18 +08:00
Gabriel Horner a2bb7e4479 fix: adding timestamps to imports shouldn't change updated-at 2024-01-10 16:06:20 -05:00
Tienson Qin 264f7dd40a Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-11 02:57:37 +08:00
Tienson Qin a550090249 Remove assert 2024-01-11 01:02:13 +08:00
Tienson Qin baefeaad5b fix: use page-handler/<create! if possible 2024-01-11 00:54:19 +08:00
Gabriel Horner 0d4b46be71 fix: remove deleted :block/unknown schema
:block/unknown was a side effect of the last storage approach
2024-01-10 09:20:50 -05:00
Tienson Qin 5cad97c617 feat: returns a deferred promise for logseq.db/transact!
This enables callers to wait for the result.
2024-01-10 20:23:11 +08:00
Tienson Qin 9ee04feeb5 Merge branch 'feat/db' into refactor/pipeline-worker 2024-01-10 16:13:56 +08:00
Tienson Qin 271f34838a fix: page property test 2024-01-10 05:29:52 +08:00
Tienson Qin d09a0d0b80 fix: page rename test 2024-01-10 05:13:33 +08:00
Gabriel Horner 3cb980bf91 fix: invalid pages and whiteboard pages from import
- some pages are missing block/journal? and block/original-name
- removed another file graph only attribute
- fixed whiteboard block schema missing :block/path-refs
- pulled out importing block to its own fn

Part of LOG-2990
2024-01-09 16:03:49 -05:00
Tienson Qin 16f8beefaf fix: model and page ref test 2024-01-10 04:47:18 +08:00
Tienson Qin 2d245295a7 fix: outliner core tests 2024-01-10 04:15:09 +08:00
Gabriel Horner e1ad1fd9c8 fix: invalid blocks in import created by tags and refs
Also make :block/format valid. Part of LOG-2990
2024-01-09 13:43:00 -05:00
Gabriel Horner e715881a4f fix: macro blocks and remove file-graph only attributes for import
Also disable properties until it's ready. Part of LOG-2990
2024-01-09 12:48:27 -05:00
Tienson Qin eb6e5942f8 fix: lint warnings 2024-01-10 01:34:15 +08:00
Tienson Qin 7f0747ca9f start fix lint warnings and tests 2024-01-10 01:00:17 +08:00
Tienson Qin 767827e415 fix: writes don't saved to md files 2024-01-09 19:08:12 +08:00
Tienson Qin 501c06c44f fix: whiteboard redundancy 2024-01-09 16:53:49 +08:00
Tienson Qin 9f66e6d7e7 fix: don't fix pages for whiteboards and hidden pages 2024-01-09 16:04:03 +08:00
Gabriel Horner 6ad5fb2dd4 fix: db graphs not adding :block/content for whiteboard shape
Caused by hopefully one of the last incorrect lookups of
:block/properties
2024-01-08 16:16:07 -05:00
Gabriel Horner 0957cb15b3 fix: built-in props weren't persisted to opfs
and didn't show up in new graphs. Fixes LOG-2998. Issue was that
e6a464e64f introduced transacting built-in
properties twice. Since the first transaction doesn't send tx-data to
the db-worker (an issue with pipeline/invoke-hooks it seems), the 2nd tx
results in missing property info including name. Removing this
incorrectly setup first tx allows the original one to successfully send
initial property data to db-worker
2024-01-08 11:26:22 -05:00
Tienson Qin 5fd91035df wip: transact to worker directly
Previously, the transactions will go though main thread db -> worker
db, this commit changes it to worker db first and then send the
updates to the main thread db.

This change does introduce some bugs because all the db transactions
are async now.
2024-01-08 20:53:23 +08:00
Tienson Qin dbba75157d Sync db worker changes back to the main ui thread 2024-01-08 19:09:54 +08:00
Tienson Qin 38ba0dfa7c Move entity plus to db dep 2024-01-08 15:35:09 +08:00
Tienson Qin 77726bda4c fix: worker dependencies 2024-01-08 12:59:08 +08:00
Tienson Qin 9597330d9f Remove db/state dep on page handler 2024-01-07 17:24:54 +08:00
Gabriel Horner 6e911798e7 fix: Make bare graph valid for file graph import
Fixed blocks, pages and config.edn as part of LOG-2990
2024-01-05 17:03:35 -05:00