Fase B3+B4: built-in Project/Area tags and Citation class

B3: registers :logseq.class/Project and :logseq.class/Area as
built-in page-like classes (the TODO in class.cljs already asked for
this), so users can tag pages/journals with them out of the box.
Fixed a markdown-mirror test whose "Custom Tag" fixture used to be
titled "Project" and collided with the new built-in class.

B4: adds :logseq.class/Citation plus /target and /context properties,
following the :logseq.class/Comments pattern. Since target is a
:node-typed ref, citation blocks automatically show up in the
existing block/citation reference graph without any changes there.
This commit is contained in:
2026-08-26 19:03:14 +02:00
parent fcf41c7b41
commit b67f7e9f78
4 changed files with 44 additions and 6 deletions

View File

@@ -7,6 +7,15 @@
(defn- parent-class-id [db]
(:db/id (d/entity db :user.class/Parent)))
(deftest project-and-area-are-built-in-page-classes
(testing "Project and Area are registered as built-in classes that behave like pages"
(is (contains? db-class/built-in-classes :logseq.class/Project))
(is (contains? db-class/built-in-classes :logseq.class/Area))
(is (contains? db-class/page-children-classes :logseq.class/Project))
(is (contains? db-class/page-children-classes :logseq.class/Area))
(is (not (contains? db-class/private-tags :logseq.class/Project)))
(is (not (contains? db-class/private-tags :logseq.class/Area)))))
(deftest get-class-objects-dedupes-inherited-tags-test
(let [conn (db-test/create-conn-with-blocks
{:classes {:Parent {:block/title "Parent"}