Commit Graph

819 Commits (cab7cc7f620b6a08d5deaf93ee96ffe8f099167f)

Author SHA1 Message Date
Gabriel Horner 0769583183 fix: more missed renames of :page to :node type
from #11433
2024-08-02 10:34:35 -04:00
Tienson Qin 55f211be16 fix: query-dsl tests 2024-08-02 22:34:04 +08:00
Tienson Qin 914a21c47e fix: replace outdated :page type with :node type 2024-08-02 22:14:37 +08:00
Tienson Qin d1ef3fbeec enhance: use identity to avoid multiple vals binding error 2024-08-02 21:44:20 +08:00
Tienson Qin 36e3366a74 enhance: dynamic query in :property rule depends on db/valueType 2024-08-02 21:35:06 +08:00
Tienson Qin bb365b0171 fix: task rule uses :property-ref-type 2024-08-02 20:54:10 +08:00
Tienson Qin e743091909 fix: :property dsl query 2024-08-02 19:42:43 +08:00
Gabriel Horner 2d50f565ea chore: mv table property idents to their own ns
table feature will grow with time and could benefit from its own ns
2024-08-01 17:12:00 -04:00
Tienson Qin 8c81895ff7 refactor: don't store :checkbox as ref type 2024-08-01 13:06:47 +08:00
charlie 685df8c87f fix: typo 2024-08-01 12:01:01 +08:00
Tienson Qin 76f7baedd3 fix: remove repeated clause 2024-08-01 11:43:48 +08:00
Gabriel Horner 2e13c9758b enhance: add a table for property pages
that display all nodes for the current property.
Property pages now behave like classes and display a table instead of blocks.
Also update linter to include objects ns
2024-07-31 15:25:03 -04:00
Tienson Qin d26e620a82 refactor: update :block/type to cardinality one instead of many 2024-07-31 19:35:26 +08:00
Gabriel Horner 46c5110701 fix: document and validate a db only config.edn option
Also fix another outdated comment
2024-07-30 17:20:12 -04:00
Gabriel Horner 3767f1d3c7 chore: rename task class ident
Only class ident name that wasn't capitalized and didn't match its
title. Considered renaming :logseq.task but unsure if it even makes
sense for their names to match since they aren't sharing a common ns.
:logseq.task may be better off under :logseq.property.*
2024-07-30 17:09:27 -04:00
Gabriel Horner 354ffabf88 fix: outdated comments related to changes in #11433 2024-07-30 15:26:54 -04:00
Tienson Qin 3bc1a673cb refactor: replace both :page and :object types with :node 2024-07-30 17:25:46 +08:00
Tienson Qin 08ed6a131d refactor: show linked refs and unlinked refs for blocks too 2024-07-30 12:53:48 +08:00
Tienson Qin b3a786db02 Merge branch 'feat/db' into refactor/narrow-gap-between-page-and-block 2024-07-29 13:36:00 +08:00
Tienson Qin e013e78c85 fix: migrate to the new schema 2024-07-29 13:27:33 +08:00
Gabriel Horner d3f9defb6d chore: bump nbb to latest datascript 2024-07-26 21:27:10 -04:00
Tienson Qin 50eb74927b chore: bump datascript 2024-07-25 22:28:21 +08:00
Tienson Qin 4accddebbe fix: switch to use :map type for pdf hl-value 2024-07-25 16:25:56 +08:00
Tienson Qin eaf35e4a27 Merge branch 'feat/db' into refactor/narrow-gap-between-page-and-block 2024-07-25 16:07:54 +08:00
Tienson Qin 4f368d5c79 fix: inline tags 2024-07-25 15:13:11 +08:00
rcmerci 04e7d2c17b enhance: generate db-ident block's uuid like:
00000002-<hash-of-db-ident>-<fill-with-0>
2024-07-25 11:18:29 +08:00
Tienson Qin 7274a0bb40 Merge branch 'feat/db' into refactor/narrow-gap-between-page-and-block 2024-07-25 09:57:37 +08:00
charlie 73d42536e5 enhance(pdf): persist block highlights data to the annotation block property value 2024-07-24 15:31:59 +08:00
Tienson Qin d84639a655 fix: replace refs with content when deleting a object tag 2024-07-22 21:25:02 +08:00
Tienson Qin cada6e2d9b fix: delete tagged block 2024-07-22 21:14:59 +08:00
Tienson Qin a44f6c27d5 Merge branch 'feat/db' into refactor/narrow-gap-between-page-and-block 2024-07-21 11:34:49 +08:00
Tienson Qin 249d21df4a fix: don't create pages for refed objects 2024-07-21 11:10:50 +08:00
Tienson Qin ed1ee94d88 refactor: blocks search returns all blocks including pages
Fuzzy search support both pages and objects (blocks have tags).
2024-07-20 20:10:36 +08:00
Gabriel Horner 60cd9b00da fix: db import of namespaced page created invalid class
Encountered this with docs graph. Part of LOG-3176
2024-07-12 12:32:48 -04:00
Gabriel Horner 879e07b2f4 fix: db import of aliases
Also ignore :filters for now so they don't make graphs invalid and
add more tests for tags. Part of LOG-3176
2024-07-11 23:13:08 -04:00
Tienson Qin d847023dc1 Refactor: rename :block/content to :block/title 2024-07-10 22:33:44 +08:00
Gabriel Horner 2718ee3b20 fix: new property causes invalid graph
New property namespaces are declared in this var /RCmerci
2024-07-10 10:01:54 -04:00
Tienson Qin a1f352773b refactor: rename :block/original-name to :block/title 2024-07-10 21:43:03 +08:00
rcmerci a0ef7b3407 enhance(rtc.asset): add built-in property :logseq.property.asset/remote-metadata 2024-07-10 18:44:20 +08:00
Gabriel Horner 60b13a525e fix: db import of collapsed block being invalid
Also cleanup infer fn which had import-specific code and add tests
for :default to :page :type change. Part of LOG-3176
2024-07-09 14:23:22 -04:00
charlie f3888e4509 enhance(ui): polish priority related icons 2024-07-09 10:53:35 +08:00
Gabriel Horner 057d6b459f fix: :url property values with macros
Macros in :url are useful for having urls with a common hostname that
can be configured once. Without this fix, docs graph is invalid
2024-07-08 13:34:28 -04:00
Gabriel Horner 3d732cb018 fix: new class should always set :block/type to "class"
New change with :block/type "page" was causing :tag-classes option to
fail. Part of LOG-3176
2024-07-08 11:46:27 -04:00
Gabriel Horner 4efca908a4 fix: sqlite.build not generating valid pages and journals 2024-07-08 11:06:34 -04:00
Gabriel Horner f7b753758c fix: tests with outdated :block/type assertions
also fix lint
2024-07-08 09:51:29 -04:00
Tienson Qin b9603c56b7 refactor: create blocks for class views
Table state will be stored in the view entity instead of the class.

This is for multiple views support, there could be multiple views
including table, kanban, card, etc.
2024-07-08 09:46:30 +08:00
Tienson Qin 1854286cf0 refactor: persistent views stored using blocks 2024-07-07 21:05:14 +08:00
Tienson Qin e27e5f9aa9 fix: built-in? value block is not loaded 2024-07-07 15:08:12 +08:00
Tienson Qin 1a0b333e7d Merge branch 'refactor/add-page-type' into feat/db 2024-07-07 13:31:27 +08:00
Tienson Qin 7f209d1776 fix: add page type for file graphs too 2024-07-07 13:29:34 +08:00
Tienson Qin 49b9bfc487 fix: add page type for old db graphs 2024-07-07 13:18:54 +08:00
Gabriel Horner 655c701d9d chore: make last arg optional for get-page-blocks 2024-07-06 12:24:07 -04:00
Tienson Qin dc456c0c72 fix: get children classes' objects too for a parent class 2024-07-05 22:08:26 +08:00
Tienson Qin 84f7266d96 wip: add "page" :block/type 2024-07-05 21:27:33 +08:00
Tienson Qin f0b496db93 Merge branch 'feat/tables' into feat/db 2024-07-05 15:25:10 +08:00
charlie d4e8f1d90c enhance(ux): management for the property shortcuts in the global shortcuts module 2024-07-04 18:14:58 +08:00
Tienson Qin 2f50b41066 feat: DB migration for built-in properties && persistent table state 2024-07-04 04:12:51 +08:00
Tienson Qin 6da32a33a0 wip: persist table state 2024-07-04 01:01:12 +08:00
Gabriel Horner fa4790f027 Revert "fix: prefer to use db-based schema's cardinality && valueType"
This reverts commit dbd9ab6bbb.
This was only temporarily needed for rtc graphs which should longer have
this problem
2024-07-02 20:17:02 +08:00
Gabriel Horner ba9d8d7920 Bump nbb with latest datascript
Test fixes are reasonable as datascript catches more invalid uses of
query
2024-07-02 20:17:02 +08:00
Gabriel Horner d7adee57e8 fix: Insufficient bindings error after datascript upgrade
After upgrading our forked datascript from 1.5.3 to 1.7.1,
bindings in two of our rules behaved differently. The workaround
of adding an `and` where none was required before is sufficient.
Fixes LOG-3177
2024-07-02 20:17:02 +08:00
Gabriel Horner 99769dbcbf fix: db/id enhancement failing non-tx validation contexts
Simplify addition of :db/id and add it without forcing adding :db/id
in all schema declarations
2024-07-02 20:17:02 +08:00
Gabriel Horner 772b2d7836 chore: add docs to explain property values more 2024-07-02 20:17:02 +08:00
Tienson Qin 6c653094dd wip: class objects table 2024-06-29 00:50:30 +08:00
Gabriel Horner 9160f5a347 Revert "fix: prefer to use db-based schema's cardinality && valueType"
This reverts commit dbd9ab6bbb.
This was only temporarily needed for rtc graphs which should longer have
this problem
2024-06-28 12:04:10 -04:00
Gabriel Horner e24b386079 Bump nbb with latest datascript
Test fixes are reasonable as datascript catches more invalid uses of
query
2024-06-27 18:07:44 -04:00
Gabriel Horner e58f1221d2 fix: Insufficient bindings error after datascript upgrade
After upgrading our forked datascript from 1.5.3 to 1.7.1,
bindings in two of our rules behaved differently. The workaround
of adding an `and` where none was required before is sufficient.
Fixes LOG-3177
2024-06-27 16:15:08 -04:00
Gabriel Horner 6b0b9c5e18 fix: db/id enhancement failing non-tx validation contexts
Simplify addition of :db/id and add it without forcing adding :db/id
in all schema declarations
2024-06-27 14:50:54 -04:00
Gabriel Horner 53bb0b689d chore: add docs to explain property values more 2024-06-27 12:11:30 -04:00
Tienson Qin dbd9ab6bbb fix: prefer to use db-based schema's cardinality && valueType
Instead of those values stored in the property blocks.
2024-06-27 23:24:35 +08:00
Tienson Qin 16c7a52468 enhance: add :db/id to invalid entity map when validated failed 2024-06-27 22:40:54 +08:00
Tienson Qin fec74edc0c Revert "fix: don't set :logseq.property/built-in? for properties"
This reverts commit e5bb634a08.
2024-06-27 16:27:41 +08:00
Tienson Qin 073427d898 enhance: add backlinks and type to all pages 2024-06-27 16:27:15 +08:00
Tienson Qin 324a6f91ca Merge branch 'experiment/tanstack-table' into feat/db 2024-06-27 15:49:24 +08:00
Tienson Qin e5bb634a08 fix: don't set :logseq.property/built-in? for properties
We still keep :logseq.property/built-in? for built-in classes, pages
and closed values.

Reasons why this change:
1. built-in? value is a entity (which type is `checkbox` and value is
`true`), this breaks the rule that db attributes shouldn't reference
non-db-attribute blocks, it also forces us to load the built-in? value
entity first when loading the db.
2. we already have a built-in properties map, we can use it to check
whether a property is built-in.
2024-06-27 15:10:33 +08:00
Tienson Qin b6bdc4b1d5 chore: update datascript version 2024-06-27 00:35:37 +08:00
Tienson Qin 039804d87a chore: bump upstream datascript 2024-06-27 00:26:31 +08:00
Gabriel Horner 5e5a8ee1df fix: display property names not idents for query
table and settings
2024-06-26 09:34:33 -04:00
Tienson Qin 5c965e5235 fix: load all pages initially
There're still some issues when loading partial pages initially,
let's improve the performance during the test.
2024-06-26 17:46:52 +08:00
Gabriel Horner c772b0cdd1 fix: migrate built-in? property to use :checkbox
Can now delete temporary :boolean type
2024-06-25 15:02:25 -04:00
Tienson Qin da4f9b5498 chore: remove :block/collapsed-properties 2024-06-25 10:57:44 +08:00
Gabriel Horner 4fce0cb5d5 fix: sqlite.build journals should use new journal uuid format 2024-06-24 13:40:15 -04:00
Gabriel Horner 67d546850c fix: recent bugs with create-user-class-ident-from-name
This fn keeps api's assumptions and bugs with property idents only in the api ns and
prevents them from affecting all other namespaces creating properties /cc @xyhp915. Users
should not be choosing the property namespace. Doing so allows users to
overwrite logseq's built in ones which can break basic features. It also
allows users to specify a non-property namespace, which means the
property would not work in the app
2024-06-24 11:56:50 -04:00
charlie 305b7ff570 fix(api): ignore qulified keyword when create user property name 2024-06-24 18:25:26 +08:00
Tienson Qin f17289c34a fix: prefer chosen UUID value than page name
The reason is that multiple pages can share the same name
2024-06-24 12:11:15 +08:00
Tienson Qin 1c22c78c94 chore: remove buggy and rough template
Also, :object kinda works like template, and we also plan to
support templates on Classes.
2024-06-23 22:22:33 +08:00
Tienson Qin caf1af1911 enhance: bring back inline tags support 2024-06-23 17:50:51 +08:00
Gabriel Horner d4a323805d fix: deps lints 2024-06-20 09:14:59 -04:00
Tienson Qin 74a077668c fix: add missing malli schema for :file/size 2024-06-20 20:55:57 +08:00
Tienson Qin dec56b31f0 chore: remove unused :file/handle 2024-06-20 20:53:15 +08:00
rcmerci dc785a92a7 refactor: make journal-day page's uuid like this
00000001-2024-0620-0000-000000000000
2024-06-20 17:01:58 +08:00
Tienson Qin 62a2564f4d fix: add missing file/created-at attribute for db graphs 2024-06-20 16:57:38 +08:00
Tienson Qin 626e0b67e8 fix: store latest file stat
Fixes LOG-3143
2024-06-20 09:22:35 +08:00
Tienson Qin adae8ef5eb fix: get-block-and-children returns sorted blocks
Fix unit tests
2024-06-20 07:56:30 +08:00
Gabriel Horner 7b787a8fb2 fix: db lint 2024-06-19 14:39:39 -04:00
Tienson Qin 71dc122a75 fix: copy block properties doesn't work
Fixes LOG-3160
2024-06-20 00:39:08 +08:00
Gabriel Horner 16248f0bd2 fix: unable to build :default property for sqlite.build
Also add tests for different built-in cases and addressed
related TODO
2024-06-18 16:29:01 -04:00
Gabriel Horner ee77145caf fix: :checkbox property not working in simple queries and rules
Also fix booleans not rendering in query table
2024-06-18 10:38:09 -04:00
Tienson Qin 96be194de5 Refactor: use last modified time to decide if file has been changed
Previously, we're using file content.

Fixes LOG-3161
2024-06-16 11:00:40 +08:00
Tienson Qin 54e54ebd63 fix: get-pid not works for non-built-in properties in file graphs 2024-06-15 23:20:13 +08:00