Commit Graph

82 Commits

Author SHA1 Message Date
Gabriel Horner
d431f62c97 fix: add more file graph concepts to db linter 2024-08-29 11:40:37 -04:00
Gabriel Horner
2d5a01cbac fix: remove unused db-based page rename
db graphs no longer use it after e8e97c7a694e0fc0177c256a1aff62d143778ff
2024-08-29 10:40:16 -04:00
Tienson Qin
2293d11a2b chore: rename :logseq.property/title-format to
:logseq.property.journal/title-format
2024-08-29 14:29:22 +08:00
Tienson Qin
f2ca6b023d fix: lint 2024-08-29 14:03:25 +08:00
Tienson Qin
0643c862d9 wip: journal custom title 2024-08-28 16:50:48 +08:00
Tienson Qin
37d91f2e5d enhance: allow built-in pages to be renamed
`db/ident` shouldn't be updated, at least for those built-in pages.
2024-08-27 23:22:27 +08:00
Gabriel Horner
85e358e57b fix: not able to create case sensitive classes
Also important to keep db graphs decoupled from file specific
:block/name. Made sure that related fix in logseq/db-test#9 still works
2024-08-20 17:08:14 -04:00
Gabriel Horner
261118d4dc refactor: finish frontend independence from worker and add lint
Remaining fixes worker all file related. Fixes LOG-3717
2024-08-09 12:16:20 -04:00
Gabriel Horner
20eac03cea refactor: mv common worker/frontend ns to frontend/common
Move common core.async, date and search utils to frontend/common.
Part of LOG-3171
2024-08-09 11:18:32 -04:00
Tienson Qin
c1c6197b9b fix: pages of different types can use the same name 2024-08-06 13:08:35 +08:00
Tienson Qin
f46372b346 chore: keep using class instead of tag for internal usage 2024-08-06 07:15:41 +08:00
Tienson Qin
411b05e7ba Prefer to use ldb/{type}? check when possible 2024-08-05 17:51:24 +08:00
Tienson Qin
4083a2d0a0 enhance: prefer tag instead of class on UI
Some users are confused with Classes/Objects, so on UI it'll be
Tags/Nodes.
2024-08-05 15:06:54 +08:00
Tienson Qin
8e41e1d22c fix: block type filter 2024-08-04 13:17:22 +08:00
Tienson Qin
d26e620a82 refactor: update :block/type to cardinality one instead of many 2024-07-31 19:35:26 +08:00
Tienson Qin
d847023dc1 Refactor: rename :block/content to :block/title 2024-07-10 22:33:44 +08:00
Tienson Qin
a1f352773b refactor: rename :block/original-name to :block/title 2024-07-10 21:43:03 +08:00
Tienson Qin
84f7266d96 wip: add "page" :block/type 2024-07-05 21:27:33 +08:00
Tienson Qin
9f6105a62d fix: new page creates two empty blocks 2024-06-23 22:06:40 +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
Tienson Qin
0bd6c05e69 refactor: add page outliner ops
The rule is to avoid calling worker modules from UI, all db
transactions should go through apply-outliner-ops.
2024-06-18 05:21:00 +08:00
Tienson Qin
b294896f8a fix: reuse page uuids when parsing files
This commit also removes `with-id?` because it's too confusing.

Fixes LOG-3143
2024-06-15 22:52:30 +08:00
rcmerci
acd06e1e9e enhance(rtc): ensure refed-blocks from remote existing in client 2024-06-14 18:48:04 +08:00
Gabriel Horner
9f89717a57 refactor: finish splitting file and db page create
db create had file specific assumptions and file create had db specific
assumptions like class?
2024-06-12 14:57:23 -04:00
Gabriel Horner
0b61bdea29 fix: edit an empty page for file and db graphs
To repro, create a block with a page-ref, click into page and
then click on 'Click here to edit'
2024-06-12 13:59:59 -04:00
Gabriel Horner
13f5971d3c chore: mv worker.file.page-rename to appropriate ns
This ns is file graph specific so it should be in a file-graph
specific ns. Its current location was confusing as it was next to
other namespaces in frontend.worker.file.* that are not
file graph specific. Also moved related tests to correct location
2024-06-12 11:38:00 -04:00
Gabriel Horner
99939c600f fix: remove dead code caught when updating linter
Also added a db-concepts not in file linter fn
2024-06-12 10:36:22 -04:00
Tienson Qin
1dc72d79f2 fix: separate page/create impl for db and file graphs
Also, move rtc page create impl to its own fn.
2024-06-12 06:39:06 +08:00
Tienson Qin
2d3f152454 fix: simplify page delete and fix rtc issues 2024-06-11 20:23:57 +08:00
Tienson Qin
4b3920b049 fix: delete page when entity exists 2024-06-11 16:37:53 +08:00
Tienson Qin
20e4ff133c fix: can't delete pages that have refs
Also, redirect to home after deleting the page
2024-06-11 08:30:49 +08:00
rcmerci
8a94b856bd enhance(rtc): add debug prn when failed to transact 2024-06-02 21:19:59 +08:00
Gabriel Horner
effde81161 enhance: all user classes have :db/ident
This is important as a user's ontology (properties + classes) is now describable
with unique identifiers. This will allow for easy sharing and
importing of ontologies between users.
Also <create-class! now exists to create classes consistently. Will
be helpful when we want to provide some validation for classes
2024-05-28 16:52:12 -04:00
Gabriel Horner
d37df950fa fix: property rules now work with property ref values
Also remove use of :string properties in tests
2024-05-16 15:05:37 -04:00
Gabriel Horner
43dfdbe0ae fix: convert remaining built-in :string props to :default 2024-05-16 11:22:09 -04:00
Gabriel Horner
70d92c8f7a fix: pdf related properties for db graphs
Added to new property ns as file and file-path are too generic to be top-level.
Also fixed bugs in page creation
2024-05-09 13:38:31 -04:00
Tienson Qin
1ec4796eff refactor: replace :block/left with :block/order
Finally no need to worry about parent-left conflicts and broken chain.
With :block/order, we only need to re-compute new orders for siblings
with same order (it can happens if there're bugs in our code, or
updates from rtc), but it doesn't break UI.

Another huge potential benefit after discussing with Zhiyuan is:
Ee might be able to simplify both RTC and undo/redo, currently, we
need to handle each new op for both of them, with recently
refactorings like properties being db attributes, :block/order
is a string instead of a ref, we can handle most property value
conflicts using last-write-wins, and others (e.g. :block/parent,
property with :default type) specifically.

I haven't fixed the issues of using :block/left in RTC and undo/redo,
because we might change both soon.
2024-05-02 01:12:22 +08:00
Tienson Qin
5d4ae66d86 revert: remove :block/properties 2024-04-28 19:44:53 +08:00
Gabriel Horner
c87c077d29 enhance: new classes can be case sensitive 2024-04-24 15:18:20 -04:00
Tienson Qin
8d9e6da41e refactor: use :block/type for journal pages instead of :block/journal?
breaking change:
removes :block/journal attribute
2024-04-24 20:12:15 +08:00
Tienson Qin
a15066c862 perf: db reload
Load as less pages && closed values as we can to avoid loading too
much data.

We already know that transacting db attributes is slow, going to
investigate it later.
2024-04-22 23:48:40 +08:00
Tienson Qin
bacba9db6e fix: delete property pair entities when deleting a property page 2024-04-17 01:56:34 +08:00
Tienson Qin
9f9bfbc5e6 Merge branch 'feat/db' into refactor/db-remove-block-name-unique 2024-04-08 23:56:46 +08:00
charlie
4df4ff48be fix(editor): missing outliner op for the create page tx 2024-04-08 19:25:23 +08:00
Tienson Qin
0b49d09fb1 fix: db schema validate 2024-04-07 17:26:58 +08:00
Tienson Qin
f52993ec6d fix: tests and lint warnings 2024-04-07 14:27:05 +08:00
Tienson Qin
6eb6e60b55 Bring back namespaces/page merge/nested pages 2024-04-07 13:48:55 +08:00
Tienson Qin
fe2a426761 fix: rename page tests 2024-04-04 15:57:49 +08:00
Tienson Qin
5a3bbcddac fix: lint warnings 2024-04-04 15:57:49 +08:00
Tienson Qin
1b32378884 more places to use db eid instead of page name 2024-04-04 15:57:49 +08:00