Commit Graph

1926 Commits

Author SHA1 Message Date
Gabriel Horner
4f25e27d9b fix: exporting class parent or property class
could sometimes lead to failure. Address by shallow copying
as page export should not be recursively exporting properties and
classes that are not visible on a page
2025-02-13 17:18:53 -05:00
Gabriel Horner
8b02790215 chore: add test helpers to reduce
redundant defaults for input export maps
2025-02-13 15:24:46 -05:00
Gabriel Horner
7da4f7a9b7 enhance: improve error handling for exports + imports
Display user friendly notification when unexpected failures occur.
Also actively validate export to ensure it can even import
2025-02-13 14:00:57 -05:00
rcmerci
dd97879e81 fix(rtc): fix format of :server-schema-version in the API get-graph-skeleton response 2025-02-13 21:27:57 +08:00
Tienson Qin
e7e4294088 Feat: view group by (#11731)
* wip: view group by

* feat: view group by rendering

* enhance: use current group's value when creating new block

* enhance: add icons for view layouts

* fix: group rows selection

* fix: property type migration from #11695

* refactor: use namespaced keyword for block export

instead of confusing :build/block. Also improved related tests,
simplified import steps, added some missing sqlite.build docs,
and fixed :build/uuid not working for some existing journals.

* fix: remove export+imports invalid

when uuids are kept and when journals are created.
Also removed :logseq.class/Journal from export as its needless noise

* fix(ux): incorrect behavior for the sub menu content within the table header popup

* fix: group rows delete

* fix: lint

* fix: group block delete

* fix: bump version

* fix: group by titles not correct for :checkbox

Also enable group-by for :date as they just work

* fix: disable nonsensical and unreadable groupings for :many properties

* fix: grouping not working for :default property type

and sometimes :number or :url.
Was grouping by entity and not what user reads. If there are
2 :default values with 'text ha', this seemed buggy

* fix: icons not showing for grouping by status

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: charlie <xyhp915@qq.com>
2025-02-12 12:56:55 -05:00
rcmerci
70aa057b12 fix: schema-version maybe a int 2025-02-12 23:01:46 +08:00
Tienson Qin
da6d85369f Merge pull request #11722 from logseq/enhance/rtc-migrate-graph-schema
refactor: update schema-version format
2025-02-12 22:01:57 +08:00
Tienson Qin
cda5b09d56 fix: delete block's property history when retracting a block 2025-02-12 17:22:40 +08:00
rcmerci
0533377e0f Merge remote-tracking branch 'origin/feat/db' into enhance/rtc-migrate-graph-schema 2025-02-12 15:05:36 +08:00
rcmerci
4195d40241 refactor: remove defrecord SchemaVersion, use a simple map for better compatible with nbb 2025-02-12 15:02:41 +08:00
Gabriel Horner
83078a9bef enhance: include class children in all exports
Also fix get-classes-parents only returning first tag's parents
2025-02-11 14:13:55 -05:00
Gabriel Horner
aae1bb04f2 fix: export commands return partial results
Use worker db to get full results. Using render db only returned
what had been lazy loaded
2025-02-11 10:11:58 -05:00
Gabriel Horner
8faa1a9d91 fix: remove export+imports invalid
when uuids are kept and when journals are created.
Also removed :logseq.class/Journal from export as its needless noise
2025-02-10 16:58:03 -05:00
Gabriel Horner
8b8055dd72 refactor: use namespaced keyword for block export
instead of confusing :build/block. Also improved related tests,
simplified import steps, added some missing sqlite.build docs,
and fixed :build/uuid not working for some existing journals.
2025-02-10 15:18:45 -05:00
Tienson Qin
f5c227e7ae feat: match all/any filters suport (#11695) 2025-02-10 13:56:12 +08:00
Tienson Qin
38a197eec4 feat: match all/any filters suport (#11695) 2025-02-10 13:32:44 +08:00
rcmerci
1ad5422acf enhance(rtc): more precise malli-schema for :schema-version 2025-02-08 17:32:11 +08:00
rcmerci
dfdd55a972 chore: add docstring 2025-02-08 17:32:11 +08:00
rcmerci
3dddc4323a enhance(rtc): show more info in debug-ui 2025-02-08 17:32:11 +08:00
rcmerci
5143d7467d feat: introduce SchemaVersion to replace current schema-version using a plain number 2025-02-08 17:32:11 +08:00
rcmerci
9a54d2a4b4 enhance(rtc): notify when need to upload/download higher schema graphs 2025-02-08 17:32:11 +08:00
rcmerci
ebbb3222d5 enhance(rtc): validate major-schema-version before rtc 2025-02-08 17:32:11 +08:00
rcmerci
215f86a777 enhance(rtc): rename ns frontend.worker.rtc.branch-graph, fix rtc malli-schema 2025-02-08 17:32:11 +08:00
Gabriel Horner
ac8b3dbe68 enhance: introduce :build/keep-uuid? for export/import
to consistently keep uuids for all node types.
Allows page and block hacks to be removed. Marking blocks
this way was the right balance of efficient at preserving block relationships
while being easy to maintain
2025-02-07 18:20:13 -05:00
Gabriel Horner
2edbadf1b5 enhance: block export supports content refs
Also refactor block tests and how export-maps are built and
2025-02-07 16:26:11 -05:00
Gabriel Horner
11669f8f80 fix: block ref export+import not working in app
We override :block/title in app so have to hack around this attribute override
2025-02-07 14:14:17 -05:00
Gabriel Horner
8bc9b730f2 enhance: page export+import journal refs 2025-02-07 11:57:35 -05:00
Gabriel Horner
310164068b chore: cleanup export tests
by creating test helpers. Also add 2nd import assertion on two more tests
now that's easy
2025-02-07 11:07:21 -05:00
Gabriel Horner
fcdfe518be enhance: export+export refs to classes 2025-02-07 10:27:28 -05:00
Gabriel Horner
02beff3ec1 enhance: export+import page handles most ref types in blocks
All ref types handled except class ref. Also fixed most block types not
persisting uuid when :build-existing-tx? set
2025-02-06 18:29:30 -05:00
Gabriel Horner
b54d13b7d9 enhance: sqlite.build EDN supports uuid refs
Needed for export+import of refs
2025-02-06 11:56:14 -05:00
Gabriel Horner
5faffdc8f1 enhance: page export includes its properties and tags 2025-02-05 18:06:02 -05:00
Gabriel Horner
38aff834f5 fix: export+import of blocks with built-in property closed values
e.g. Status. Also tweak class-parent to not needlessly emit Root
which is the default
2025-02-05 15:22:44 -05:00
Gabriel Horner
ca011c980e enhance: add command to export/import graph's ontology 2025-02-05 14:47:12 -05:00
Gabriel Horner
a746a4ded3 enhance: import/export :node properties with block
property values. Import works well for new graphs
2025-02-04 15:57:41 -05:00
Gabriel Horner
c925daa45d enhance: export/import :node properties with classes
Also enhance :build/page refs so their tags export
2025-02-04 12:10:18 -05:00
Gabriel Horner
c4fee6bdeb chore: remove deprecated [:page "FOO"]
refs from sqlite.build as they have been replaced with
an improved [:build/page ...]
2025-02-04 09:12:26 -05:00
Gabriel Horner
d06d582932 enhance: can import :date properties
for both existing or other graphs. Introduced an enhanced `[:build/page]` ref for
this
2025-02-03 18:16:33 -05:00
Gabriel Horner
fbf7107969 enhance: only build property export
once for a page
2025-02-03 14:08:38 -05:00
Gabriel Horner
469f77ea19 enhance: page export exports blocks at any level 2025-02-03 13:41:31 -05:00
Gabriel Horner
43c6633543 enhance: page import works for existing pages
or graph. Also add tests for fresh page import
2025-02-03 11:24:24 -05:00
Gabriel Horner
44cf521d3a enhance: initial support for export+import of current page
Works across graphs for basic top-level blocks. Generalized import
command to work with block+page and other future exports
2025-01-31 20:09:17 -05:00
Gabriel Horner
a88c04fb8e fix: build-existing-tx? didn't differentiate
between existing and new blocks correctly. Imports
into a block worked fine because it always existed but
imports into new blocks were failing
2025-01-31 16:31:01 -05:00
Gabriel Horner
02f893f66b enhance: better error handling when importing data
Gracefully handle invalid EDN and property conflicts
2025-01-31 09:01:05 -05:00
Gabriel Horner
002edb103e fix: sqlite.build auto-create new pages
from properties. Also fix user specified :pages-and-blocks not building
with :build-existing-tx?
2025-01-30 16:32:24 -05:00
Gabriel Horner
ddf4dc0646 enhance: export+import closed values across graphs 2025-01-30 13:53:44 -05:00
Gabriel Horner
bd4af68e43 enhance: can export+import classes across graphs
including their properties
2025-01-30 12:08:49 -05:00
Gabriel Horner
b8ad82e650 chore: add kondo aliases for db.sqlite namespaces 2025-01-29 18:03:28 -05:00
Gabriel Horner
574becd8bb enhance: import a block with properties across graphs
Add test to confirm multiple imports are idempotent.
Also fix sqlite.build not handling valid value for :db/cardinality
2025-01-29 17:57:06 -05:00
Gabriel Horner
085872ea64 enhance: dev commands for exporting and importing
a block data. Works within same graph currently
2025-01-29 11:35:54 -05:00