Commit Graph

3732 Commits

Author SHA1 Message Date
Gabriel Horner
b2d5315a68 enhance(dev): add deps/db/src/logseq/{frontend,sqlite} to
separate linter. Will catch mistakes like
e92b107b5b next time. Also fixed
a few more ldb/* calls and expanded /db-based-graph? check
2025-02-19 16:44:17 -05:00
Gabriel Horner
e92b107b5b fix: entity-util/{journal?,whiteboard?,page?} calls
Split up fns of these checks into entity-util, file-entity-util and
common-entity-util so that we have explicit fns for checking in single
or multi-graph contexts. By doing this, were were able to fix more than
20+ fns that were calling general fns in a single graph context e.g.
checking for :block/type in DB graph only namespaces. Some of these
calls were happening on every :block/title lookup so there may be
some perf enhancements
2025-02-19 16:29:26 -05:00
Gabriel Horner
0964331b8a chore: move 2 more db namespaces to db.common
b/c they are used by both graph types
2025-02-19 16:29:26 -05:00
Gabriel Horner
73cff9db44 chore: mv file-specific vars in db dep
to their own file-based.* namespaces. logseq.db.frontend
can now be linted
2025-02-19 16:29:26 -05:00
Gabriel Horner
18db6b1937 chore: mv db namespaces common to both graphs to logseq.db.common 2025-02-19 16:29:26 -05:00
Tienson Qin
ef43f997ea fix: lint 2025-02-20 05:20:25 +08:00
Tienson Qin
79d0008637 Merge branch 'feat/db' into enhance/reference-view 2025-02-20 05:17:37 +08:00
Tienson Qin
1b72337b11 enhance: fade in table footer to avoid ui jitter 2025-02-20 03:36:44 +08:00
Tienson Qin
a7f81ffe47 fix: add persistent :migrate-new-block-uuid 2025-02-20 02:14:34 +08:00
Gabriel Horner
753abd2732 fix: importer failing when property-pages/* config present
Fixes https://github.com/logseq/db-test/issues/220. Also removed
unused :extract-refs-from-property-value-fn
2025-02-19 10:03:53 -05:00
Tienson Qin
a838edd0e4 fix: multiple views created if there's no view yet 2025-02-19 21:05:09 +08:00
Tienson Qin
6cf56b6ea8 Merge branch 'feat/db' into enhance/reference-view 2025-02-19 19:04:47 +08:00
Tienson Qin
59ad706a72 fix: remove unused property history blocks
Remove :logseq.property.attribute/xxx
2025-02-19 15:59:40 +08:00
rcmerci
af56de64cc enhance(import): remove rtc related entities when import sqlite
Otherwise, the imported graph will connect to the corresponding remote graph.
2025-02-19 15:40:01 +08:00
Gabriel Horner
033c7e5060 fix: export+import references to block
in same page
2025-02-17 15:03:06 -05:00
Gabriel Horner
f597f7c9c0 chore: mv handler.common.file to file-based
now that this ns is only used by file graph namespaces.
This is important as it then makes explicit that another 500+ lines
in the graph-parser are file-graph specific. Also added docs to most
graph-parser namespaces to make explicit which are file-graph specific
and not
2025-02-17 14:02:49 -05:00
Gabriel Horner
fac4a45e62 fix: allow any class to be a build/class-parent e.g. schema class 2025-02-17 09:50:53 -05:00
Tienson Qin
a7c2035682 fix: lint warnings 2025-02-17 22:48:52 +08:00
Tienson Qin
4e70901f0d enhance: display columns visibility only for the table view 2025-02-17 18:28:40 +08:00
Tienson Qin
6a5555bfaf fix: all pages view 2025-02-17 18:14:09 +08:00
Tienson Qin
c5b23f8609 enhance: create linked reference view when there're references
The view is created only if it's going to be displayed to avoid
generating meaningless views for all the blocks.
2025-02-17 14:02:54 +08:00
Gabriel Horner
52acbd0ed2 fix: block objects failed import if they have properties 2025-02-14 14:29:53 -05:00
Gabriel Horner
6071681306 enhance: export+import block refs from a block
Add more docstrings to help with maintainability
2025-02-14 14:06:04 -05:00
Gabriel Horner
b9e4fad959 fix: import of different types of refs still failed
if they had deep enough properties or tags. Shallow copied
the refs to fix these failures. Also added undefined uuid
detection
2025-02-14 12:33:27 -05:00
rcmerci
ce3f618e62 fix: parse-schema-version support sequential arg 2025-02-14 13:48:18 +08:00
Gabriel Horner
a4aacf022d chore: use medley/dissoc-in instead of copied version
Can rely on medley as it is nbb compatible
2025-02-13 17:50:20 -05:00
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
charlie
8d3dbaa0eb fix(ux): incorrect behavior for the sub menu content within the table header popup 2025-02-11 11:43:31 +08: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