Commit Graph

997 Commits

Author SHA1 Message Date
Tienson Qin
d84d3f9652 enhance(ux): set/unset #Page to convert between page and block (#11970)
* enhance(ux): add/remove #Page to toggle page/block

* enhance(ux): "p t" to set tags for selected blocks

Updated "p a" to toggle displaying all properties including hidden ones.

* feat: cmd+k move blocks

* fix: block could be converted to page and create invalid nodes

Pages with block namespace parents is nonsensical and pages in
property values led to multiple validation errors. Also guard
against class and property pages as namespace parents

* fix: warn on failed cut+paste or indent/outdent of page blocks. Better to warn than silent failure which leaves user confused on
what happened. 

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2025-08-05 17:45:57 +08:00
Tienson Qin
8c402676a9 fix: page references with same name in one block (#12017)
* fix: page references with the same name in one block

* fix: empty :block/name for Library pages

* fix: invalid call to uuid-string?

trace suddenly showing up in multiple CLI calls

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2025-08-01 00:09:31 +08:00
Tienson Qin
d8a07234c1 perf: linked references
1. don't use recursive rule `block-parent`
2. using `:block/path-ref` to get both parent and children
3. run `hidden-ref?` check for refs only (not path-refs)
2025-07-01 22:50:19 +08:00
Gabriel Horner
268889d0b7 chore: rename sqlite.build :build/class-parent to :build/class-extends
Matches new property name and its arity. :build/class-parent deprecated
2025-06-29 15:21:09 +08:00
Tienson Qin
ded9c8e517 fix: update :build/class-parent to multiple values 2025-06-29 15:21:09 +08:00
Tienson Qin
9bede53a34 fix: tests 2025-06-29 15:21:09 +08:00
Tienson Qin
e443bbca9c fix: lint 2025-06-25 18:41:34 +08:00
Gabriel Horner
1b3a9cdd53 fix(dev): test build can't be watched
With last shadow-cljs upgrade, can no longer start a separate test watch
so instead start one with `npx shadow-cljs watch test`
2025-06-24 08:40:33 -04:00
Tienson Qin
33331cc3e6 enhance(perf): avoid re-run built-in queries when collapsed 2025-06-22 18:26:18 +08:00
Tienson Qin
9bb6842b1e fix: missing db/ident for inline tags 2025-06-18 21:57:57 +08:00
Tienson Qin
53e0d1a4ca enhance: put library page name to config to make it easier to rename 2025-06-18 08:25:47 +08:00
Tienson Qin
3759046885 Merge branch 'master' into refactor/page-parent 2025-06-17 08:09:57 +08:00
Gabriel Horner
b48dfce552 fix: migrated properties not migrating :logseq.property/type or
most of the property-only properties that a user could have set
2025-06-17 06:29:01 +08:00
Tienson Qin
d775a3dba9 fix: test 2025-06-17 06:29:01 +08:00
Tienson Qin
db18543383 Add migration test 2025-06-17 06:29:01 +08:00
Tienson Qin
92ec65d61d Merge branch 'master' into refactor/page-parent 2025-06-15 08:27:33 +08:00
Tienson Qin
88216d2992 fix: able to convert an existing page to a property (#11940)
* enhance: use page as property

* fix: ensures block/uuid doesn't change after converting to property
2025-06-14 13:17:33 +08:00
Gabriel Horner
7cc9ddc26b chore: bump docs graph being tested
Hadn't been updated in over a year
2025-06-13 10:43:42 -04:00
Tienson Qin
00f6662f73 fix: lint 2025-06-12 03:06:17 +08:00
Tienson Qin
4abbdd0fce fix: lint 2025-06-12 02:59:44 +08:00
Tienson Qin
3605a82483 Add repeat task get-next-time tests 2025-06-12 02:50:00 +08:00
Tienson Qin
be66270a49 fix: filters not work for linked references (#11937)
* fix: linked references

* Using datascript query for linked references

* don't render blocks children that have excluded refs

* fix: set persistent width for reference filter

* fix: duplicated refs

* fix: separate queries for children refs and non-children refs

* refactor: move reference fns to logseq.db.common.reference

* fix: set matched children ids even if it's empty

* add tests

* add unlinked reference test

* add transit files to typos ignore

* don't memoize on node

* add comment
2025-06-12 01:56:13 +08:00
Tienson Qin
8eee397b45 fix: rtc creates duplicated first blocks for new journal pages (#11913)
* fix: rtc creates duplicated first blocks for new journal pages

The root cause is that those blocks from different clients have
different ids. Instead of using persistent block id, this fix avoids
generating the first block until users really start editing it.

* fix: add button not displayed when the last block is not empty

* fix: e2e tests

* enhance: remove dummy block

* fix: open-last-block
2025-06-02 14:19:19 +08:00
Gabriel Horner
f846ec9dae fix: repo test
need to stub worker-state config instead of state config. Also removed
unused async code in test fn
2025-05-29 00:39:51 +08:00
Tienson Qin
33b6433dc9 wip: move file parse to worker 2025-05-29 00:39:51 +08:00
Gabriel Horner
b55c55831f chore: add test for migration bug
in f4d3dca19c. Put the fix in feat/db
since it should be deploy asap and test in this branch
since only this branch has the ability to test migrations
2025-05-21 16:11:53 -04:00
Gabriel Horner
a350aa4cc3 fix: remove unused :node-class? option on fn
Only classes will use this fn so it's no longer needed. The option was
also missing on a couple fns which could've lead to buggy behavior
2025-05-21 10:05:20 -04:00
Tienson Qin
42163df4b3 Merge branch 'feat/db' into refactor/page-parent 2025-05-17 05:36:58 +08:00
Gabriel Horner
6c07d8838e fix: invalid keywords can be created by user
In https://github.com/logseq/db-test/issues/278, user has graph that
contains invalid edn keyword caused by name part of keyword starting
with a number e.g. :user.property/2ndsomething. Added thorough tests
based on reference doc for both nbb and cljs versions of buggy fn. For
cljs version, allowed a few more special characters in as they've
all been confirmed to be valid edn
2025-05-16 14:02:17 -04:00
Tienson Qin
337db306c8 fix: tests 2025-05-17 01:07:08 +08:00
Tienson Qin
c0e3a5f81c fix: lint 2025-05-16 23:34:14 +08:00
Gabriel Horner
28675be54b enhance(dev): cljs tests can run with or without repeatable idents 2025-05-16 11:29:22 -04:00
Tienson Qin
baa615f463 Add migration test 2025-05-16 23:15:45 +08:00
Tienson Qin
0822e455f8 Add tests for namespaces in Library 2025-05-16 16:27:28 +08:00
Tienson Qin
407154d537 fix: tests 2025-05-16 15:01:13 +08:00
Tienson Qin
99e816e9de chore: rename get-page-parents to get-class-extends 2025-05-16 14:45:44 +08:00
Tienson Qin
61d5aa3605 Rename :logseq.property/parent to :logseq.property.class/extends 2025-05-14 17:56:35 +08:00
Gabriel Horner
5be0d024ae fix: model lint and remove unused fns and frontend.db
bindings
2025-05-09 02:51:54 +08:00
Gabriel Horner
b985020d1f refactor: mv file graph model fns to their own ns
All these fns are only used by file graphs. Most only act on file only
attributes e.g. :block/file, :block/pre-block? and :block/namespace
2025-05-09 02:51:54 +08:00
Gabriel Horner
4f65a00c68 refactor: rename :logseq.task properties to :logseq.property
These are the only built-in properties that don't start with
:logseq.property
2025-05-06 12:29:09 +08:00
Gabriel Horner
762b83a3c9 refactor: use less util/node-test? where possible
also add new ns to kondo lint
2025-04-23 10:30:00 -04:00
rcmerci
13d7061f7b Squashed commit of the following:
commit 0df1208ae6
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Apr 20 19:32:24 2025 +0800

    fix: remove d/store calls

    There's a bug with `d/store`: it doesn't clear `tx-tail` in the conn atom.

commit 7d436cf5eb
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Apr 20 18:03:23 2025 +0800

    chore: bump datascript

commit 878331c53e
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Apr 20 12:30:11 2025 +0800

    fix: block title inline

commit 2a8461b41a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Sun Apr 20 12:17:16 2025 +0800

    fix: no way to edit the query as the settings icon doesn't show up

commit f843df9482
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Apr 18 23:41:29 2025 +0800

    fix: empty data not trigger query view re-render

commit 6042c8b112
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Apr 18 09:44:27 2025 -0400

    refactor: keep testing concerns in tests

    Move testing requirement to relevant test to make production code easier
    to maintain. Where possible we should avoid helpers like util/node-test? as
    they couple testing concerns with production code

commit c9177abc9a
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Apr 18 15:20:22 2025 +0800

    fix: tests

commit b7c45f881c
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Apr 18 13:19:37 2025 +0800

    fix: don't show query builder for non-query blocks

commit 46bdd1a366
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Apr 18 13:17:07 2025 +0800

    enhance: set query title && code

commit abf90fbb7d
Author: Tienson Qin <tiensonqin@gmail.com>
Date:   Fri Apr 18 11:47:26 2025 +0800

    fix: queries don't automatically update

    Fix https://github.com/logseq/db-test/issues/237

    This commit also updates custom queries to only fetch :db/id to
    improve performance.

commit aa45b3fa6c
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Apr 18 14:31:00 2025 -0400

    fix(regression): paths of file graph exports

    markdown + opml exports had zipped files several
    directories deep because they used the full path of the graph

commit 63403bd8c5
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Apr 18 12:32:51 2025 -0400

    fix: remove unused workarounds from #11774

    Previous commit fixed these issues

commit 4ad4944b4e
Author: Gabriel Horner <gabriel@logseq.com>
Date:   Fri Apr 18 12:29:06 2025 -0400

    fix: for file graphs, tags with blank space in the namespace parent

    creates entities with nil :block/title to be created. This
    created unexpected bugs in the UI e.g. all pages and
    caused duplicate content to appear.
    Example from test graph: 'tags:: [[Some / Namespace ]]'
    Fixes
    https://test.logseq.com/#/page/68017fb5-7b9c-448a-9f64-6bb8d8669396
2025-04-20 22:22:26 +08:00
rcmerci
76b4affbde Merge remote-tracking branch 'origin/feat/db' into fix/multiple-tabs 2025-04-18 18:18:36 +08:00
Gabriel Horner
548971bdf4 chore: remove test :focus 2025-04-17 14:28:05 -04:00
Mega Yu
3a6888d48a command input tolerance threshold set to 2 2025-04-17 23:00:22 +08:00
Mega Yu
cfd5ea9d0b enhance the / input tolerance 2025-04-17 20:41:36 +08:00
Tienson Qin
47c2ed2bee fix: tests 2025-04-16 03:06:15 +08:00
Tienson Qin
d1557a0599 fix: lint 2025-04-16 01:12:55 +08:00
Tienson Qin
f969537bc5 fix: lint 2025-04-14 18:02:40 +08:00
Tienson Qin
a9e38f0e0d Merge branch 'feat/db' into perf/app-start 2025-04-14 17:48:32 +08:00