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:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user