Commit Graph

497 Commits

Author SHA1 Message Date
Tienson Qin
37faef37b0 Fix broken page after transaction
Tests has been added
2023-08-21 23:24:51 +08:00
Gabriel Horner
9fff912f1e Improve on create graph script
- Split out reusable fns to their own ns
- Created graph now initializes all the same data as in the app
- Had to make a copy of block-with-timestamps for nbb compatibility
  and started using it in a couple places that are easy to QA
2023-08-20 02:38:53 -04:00
Tienson Qin
6f8b9712d9 fix: other unit test 2023-08-18 21:42:37 +08:00
Tienson Qin
c1b16cea89 fix: enable repl test on non-node environments 2023-08-18 20:54:55 +08:00
Tienson Qin
b1d525fb86 fix: wrong argument 2023-08-17 15:37:04 +08:00
Tienson Qin
2e9b1e6fa5 add fn extract-plain 2023-08-15 15:39:25 +08:00
Gabriel Horner
e85557bacd Fix graph-parser lint
Also bump property perf for db-graph as it's a little slower but
still within reasonable range
2023-08-01 16:48:35 -04:00
Gabriel Horner
991c0994e5 All query-dsl tests pass for db graphs
Add to CI. Also fix graph-parser lint and typo
2023-08-01 16:34:48 -04:00
Gabriel Horner
81ae67cdbe Add timestamp support to sort-by for db graphs 2023-07-31 16:34:33 -04:00
Gabriel Horner
8e360405d6 Fix sort-by for user properties with db graphs
sort-by-queries test passes except for timestamps.
Had to introduce another query to resolve property uuids.
Made it as efficient as possible with datoms and pull.
Refactored load-test-files to support journal files and
allow page and block properties from one file
2023-07-31 16:07:23 -04:00
Gabriel Horner
cd4059c890 Add support for page property queries
page-property-queries test passes
2023-07-27 11:57:10 -04:00
Tienson Qin
1671f540fb Move property-edit to file-based.property
Also, util.property -> file-based.property.util
2023-07-27 11:47:08 +08:00
Gabriel Horner
4a5dd5bd83 Allow dsl-query tests to run from existing :block/content
Generate :file/blocks from content thus allowing more tests to run
under db graph. Also loosened a couple query-dsl tests to pass
with db graphs without sacrificing test accuracy
2023-07-26 16:07:41 -04:00
Gabriel Horner
3f52860cf1 Fix perf issue with property rules for db graphs
Use multiple clauses instead as confirmed by perf test.
Using multiple clauses made rule preparation for d/q more complex
so introduced extract-rules
2023-07-25 17:20:17 -04:00
Gabriel Horner
0ca7d1a4de Fix multi-valued properties and enable first property graph test
Run db prop test with: DB_GRAPH=1 node static/tests.js -i focus
2023-07-24 16:42:36 -04:00
Gabriel Horner
5f91e6cf0f Merge branch 'master' into feat/db 2023-07-24 12:21:19 -04:00
Gabriel Horner
ba53bf297c Remove last use of :block/unordered
This was coming directly from the block's ast so it was harder to trace
2023-07-24 10:26:02 -04:00
Gabriel Horner
2b90b0462a Remove explicit :block/unordered that should already be deleted 2023-07-24 10:26:02 -04:00
Andelf
e8bf419596 fix(sync): tune merge priority, current change first 2023-07-11 10:12:07 +08:00
Gabriel Horner
271b074673 Merge branch 'master' into feat/db 2023-06-28 16:16:29 -04:00
Tienson Qin
b7ec3d93ea fix: batch-transact test 2023-06-28 14:29:11 +08:00
Tienson Qin
d078e207ae fix: export pages test 2023-06-28 14:25:25 +08:00
Mega Yu
4cbfb92432 add test 2023-06-27 14:14:13 +08:00
Tienson Qin
23d918dcc2 Merge branch 'master' into feat/db 2023-06-26 20:10:41 +08:00
Junyi Du
da97d7620e fix: ast->diff-block pre-block meta raw-body 2023-06-26 19:20:04 +08:00
Andelf
a59ecb370d chore(deps): bump diff-merge to 0.1.0 2023-06-26 19:20:04 +08:00
Junyi Du
fb4e23bb95 fix: handle multi-line blocks spaces correctly 2023-06-26 19:20:04 +08:00
Tienson Qin
fd6b587235 Merge branch 'master' into feat/db 2023-06-21 14:09:16 +08:00
Gabriel Horner
2432230c22 Some more query cleanup
Remove unused query-triggered atom, remove duplicative state in result
ns and rename query maps to query-m as query being used to refer to
multiple concepts - the query map and the :query inside a query map
2023-06-20 11:53:22 -04:00
Tienson Qin
029b196432 refactor: remove db/get-paginated-blocks 2023-06-20 14:06:42 +08:00
rcmerci
3dc67e550d replace all property/Fns with property-edit/Fns
property-edit/Fns do nothing if current repo is db-based version
2023-06-17 01:37:39 +08:00
rcmerci
90fe19fa82 update frontend.util.property-edit 2023-06-16 12:56:52 +08:00
Gabriel Horner
144fc5196f Fix block hidden editable properties with user properties
Fixes
https://github.com/logseq/logseq/issues/9489#issuecomment-1590974141 .
Moved logic to util ns to simplify hairy component and test it
2023-06-16 00:11:06 +08:00
Gabriel Horner
29ebf73476 Upgrade clj-kondo in frontend with new fixes
- Couple tests didn't have an is so nothing was tested
- test-non-consecutive-blocks->vec-tree test was fixed
  by updating block->entity-map to include nil attributes
  as the original test wanted
- Also removed a stray :focus
2023-06-13 14:48:50 +08:00
Gabriel Horner
57c3253761 Test another paste scenario and some refactor
Split up fairly long fn and comment understand cases
2023-06-08 11:55:30 -04:00
Gabriel Horner
26dfa792ff Fix formatted link pasting for special links - close #8981 2023-06-08 11:55:30 -04:00
Gabriel Horner
c3aa16de3e Fix query functions not working when in page view 2023-06-06 22:12:08 +08:00
Gabriel Horner
e2214b9963 Add tests for function macro
Split out macros ns that it can be tested. Merged in handler ns as it is
only used for the function macro
2023-06-06 22:12:08 +08:00
Gabriel Horner
064132954c Fix query table functions not evaluating 2023-06-06 22:12:08 +08:00
Gabriel Horner
4c2e61cbd3 Remove deprecated :editor/command-trigger option
This option has been deprecated for a couple months
2023-06-02 11:49:08 -04:00
situ2001
235c9fbb58 fix(editor): handle backspace when at beginning of line in embed page/block (#8421)
* fix(editor): handle backspace when pos is 0 on embed page

* fix(editor): embed block should also be handled

* fix(editor): handle backspace when pos is 0 on embed page

* fix(editor): embed block should also be handled

* refactor(editor): reduce repeated code

* Add tests for deleting block with backspace

Also replace get-prev-block-non-collapsed-in-embed which
isn't being used enough to merit another copy and paste

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2023-05-31 15:37:39 -04:00
Gabriel Horner
12c55f401e Fix parse-graph not ignoring correctly for relative dir
parse-graph now returns absolute file paths
2023-05-23 15:57:33 +08:00
Gabriel Horner
1be540ab27 Refactor and simplify dicts
- frontend.dicts encapsulates dicts behavior for all other namespaces
- Each dict ns only has one var which prepares us
- No longer need shortcut.dicts
- Fix remaining lints that were broken
- Also bring back frontend.dicts
- Update guide
- Add a false binding to :editor/toggle-undo-redo-mode which throws a
  needless warning
2023-05-23 15:57:33 +08:00
Avelino
20937d194d shortcut/i18n: isolate package languages
Signed-off-by: Avelino <avelinorun@gmail.com>
2023-05-23 15:57:33 +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
514b5faf6e Refactor and simplify dicts
- frontend.dicts encapsulates dicts behavior for all other namespaces
- Each dict ns only has one var which prepares us
- No longer need shortcut.dicts
- Fix remaining lints that were broken
- Also bring back frontend.dicts
- Update guide
- Add a false binding to :editor/toggle-undo-redo-mode which throws a
  needless warning
2023-05-18 18:13:50 -04:00
Avelino
a2d1f65c2f shortcut/i18n: isolate package languages
Signed-off-by: Avelino <avelinorun@gmail.com>
2023-05-18 18:05:22 -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
7d50520f5d test refactor
Bring back helper and cleanup lets
2023-05-17 11:13:19 -04:00