Commit Graph

119 Commits (8b15b643600ce0320b74688fb35515dac0d53550)

Author SHA1 Message Date
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
Tienson Qin 7258cf48da fix deps 2024-01-03 18:12:12 +08:00
Tienson Qin 9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin a6f83c2445 Move worker.util fns to common.util 2024-01-03 17:08:24 +08:00
Tienson Qin b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Gabriel Horner ffa6aaae29 fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be
  used in other electron ns
- remove sqlite-db/connections atom as its not needed
- remove read-graph as its not necessary
- rename cli.persist-graph as its primary purpose has changed
- update effected scripts
2023-12-13 12:06:24 -05:00
Gabriel Horner b5eabc80ee fix: db and graph-parser nbb tests to pass locally
Updated sqlite fns to use updated approach. Deleted some unused
fns from old approach
2023-12-11 13:51:47 -05:00
Gabriel Horner edaf9b286a chore: move frontend db namespaces to a dedicated parent ns
Moved these namespaces to logseq.db.frontend.* to make their purpose
explicit and make the namespaces easier to maintain
2023-10-16 17:24:51 -04:00
Gabriel Horner b1b830c872 fix tests I forgot to update with :block/format fix 2023-10-16 16:14:53 -04:00
Gabriel Horner e09a5d9988 fix: pages didn't consistenly have :block/format
Making attributes consistent reduce bugs in components and query layer (where
most wouldn't know to use get-else)
2023-10-16 12:58:11 -04:00
Gabriel Horner 82994cb79d fix: tests related to :block/type arity change 2023-09-25 12:30:21 -04:00
Tienson Qin 0e8653985d refactor: allow a block to have multiple types
For example, a whiteboard page can be used both as a property and a class.
2023-09-25 10:46:00 +08:00
Gabriel Horner 172ee0ae24 Provide sqlite.cli for reusable sqlite fns
Already had to do read-graph 3 times and will soon need to it outside
logseq so worth putting this behind an api ns
2023-08-15 18:08:44 -04:00
Gabriel Horner 40237b912f Remove nonexistent :block/unordered from test 2023-07-24 12:32:08 -04:00
Gabriel Horner 5f91e6cf0f Merge branch 'master' into feat/db 2023-07-24 12:21:19 -04:00
Gabriel Horner 2b90b0462a Remove explicit :block/unordered that should already be deleted 2023-07-24 10:26:02 -04:00
Gabriel Horner 48009adaf9 chore: reuse common helper for stringifying datoms 2023-07-20 18:37:22 -04:00
Gabriel Horner d7eeea28dd Add a test that ensures file and db graphs have expected datoms 2023-07-20 18:27:07 -04:00
Andelf a59ecb370d chore(deps): bump diff-merge to 0.1.0 2023-06-26 19:20:04 +08:00
Junyi Du bea081c5b0 test: more remove indent test 2023-06-16 00:42:30 +08:00
Tienson Qin bccf5888c7 add tests 2023-06-16 00:42:30 +08:00
Gabriel Horner 51a23934a4 Fix parse-graph not ignoring correctly for relative dir
parse-graph now returns absolute file paths
2023-05-19 21:49:58 -04:00
Gabriel Horner 47508ac2ac Add :hidden config support to graph-parser.cli
Also fix lints and tests from previous commits
2023-05-18 23:25:15 +08:00
Gabriel Horner 91beda09d5 Split out graph fns and reuse them b/n gp-cli and electron
Also added test
2023-05-18 23:25:15 +08:00
Gabriel Horner fe24b61beb Fix asset link creating invalid page for org mode 2023-05-15 11:55:59 +08:00
Gabriel Horner 7335a6f623 Fix org mode page refs - close #9367 2023-05-15 11:55:59 +08:00
Gabriel Horner b26d83d2fc Fix mailto and other links creating invalid pages
Fixes #9346 and fixes #5926.
Also fixes case where relative paths for unsupported paths were creating
pages per directory e.g. `deps/graph-parser/yarn.lock` created deps and
graph-parser pages
2023-05-11 13:56:25 +08:00
Junyi Du 5aba871ead deps: diff-merge
dev: graph parser IoC hook

test: use test db for diff-merge tests

fix: ci lint

dev: refactoring post block-parsing process

feat: diff-merge 2 way merge integration

fix: key namespace of uuid in fix-duplicated-id

fix: duplicated uuid ci
2023-04-17 09:41:39 -04:00
Gabriel Horner eac3c273ca Updates docs version for parse-graph integration tests 2023-04-14 09:35:55 -04:00
Gabriel Horner 5cce967192 Add nbb-test-runner to graph-parser
Replaces manual, hardcoded runner
2023-04-12 11:02:43 +08:00
Gabriel Horner 1c3ef2ccb5 Fix url? detection for raw paste case - fix #7297 2023-03-20 09:54:41 -04:00
Gabriel Horner 6108aa1036 Add tests for timestamp blocks
Also make block attributes more explicit in pre-block and reduce needless coupling
2023-02-27 13:20:10 -05:00
Gabriel Horner 6506c369e8 Add support for block refs in page/block props 2023-02-27 13:20:10 -05:00
Tienson Qin 40ad524443
fix: duplicated block ids in multiple files (#8668)
fix: duplicate block ids in multiple files
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2023-02-21 15:50:09 +08:00
Tienson Qin 3372b3bfbd
fix: duplicate block ids in same file (#8657)
fix: duplicate block ids in the same file
2023-02-21 14:40:43 +08:00
sallto 351a4f34a3
feat: support Media Fragment URIs with audio (#8300)
* fix: fragment urls for audio player

* fix: add Support for url queries and fragments to extension detection

* feat: add tests for extraction of file extension

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2023-02-06 16:47:23 +08:00
Gabriel Horner 917a8aa098 Fix page blocks not displaying full property values in query tables
We were only saving these in pre-block but we also need them in page
block. Also adds tests for blocks that had this behavior since #6529
2023-02-01 16:28:42 -05:00
Gabriel Horner 78506f22d0 Fix deftests that have confusing args that only apply to defn
Follow up to #8412 where we're accidentally copying
invalid forms from other tests
2023-01-30 10:56:06 -05:00
Brooks Rady e7b511dc5b
fix: normalize the case of property keys (#8412)
* fix: normalize the case of property keys

* chore: remove debugging print statement

* chore: remove unneeded file from diff

* Added tests for Org title parsing

---------

Co-authored-by: Bad3r <bad3r@protonmail.com>
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-01-30 10:44:23 -05:00
Gabriel Horner e2fe300da7 Move delete-blocks-fn to graph-parser for reuse for nbb
Also:
- Move test to a more appropriate ns - model-test isn't for testing
  higher level parse file behavior
- Delete model fns that are no longer used
- Fix tests which had incorrect target-page-content and were no longer
  testing retractAttribute
- Add options to cli ns for related nbb reuse
- Light cleanup of block deletion
2022-11-26 01:01:36 -05:00