Commit Graph

242 Commits

Author SHA1 Message Date
Gabriel Horner
9b1a565dd0 Chore: Remove slides (#11854)
* chore: remove slide feature and reveal mentions

Will remove reveal js dep in later commit

* chore: remove built-in property that was only for slides
2025-05-12 13:32:24 -04:00
Gabriel Horner
5be0d024ae fix: model lint and remove unused fns and frontend.db
bindings
2025-05-09 02:51:54 +08:00
Gabriel Horner
b985020d1f refactor: mv file graph model fns to their own ns
All these fns are only used by file graphs. Most only act on file only
attributes e.g. :block/file, :block/pre-block? and :block/namespace
2025-05-09 02:51:54 +08:00
Tienson Qin
c78ae82156 fix: re-index a file graph causes loading issues 2025-04-25 22:03:42 +08:00
Tienson Qin
b39a81db17 fix: lint 2025-04-04 21:39:29 +08:00
Tienson Qin
4c54427640 move graph view data handler to deps/db 2025-03-31 19:38:02 +08:00
Tienson Qin
521aba97b6 add db/sub-entity for using in react functional components
`db/sub-block` can only be used in class components together with
rum/reactive and db-mixins/query.
2025-03-25 17:15:39 +08:00
Tienson Qin
8a0a05183e refactor: remove :block/format for db graphs (#11667) 2025-01-05 12:10:47 +08:00
rcmerci
e1c96411c6 perf: refactor frontend.db.react/remove-query-component! 2025-01-03 20:46:59 +08:00
Tienson Qin
ccbcc76e17 fix: don't persist file/path|last-modified-at for db graphs 2024-11-12 15:16:14 +08:00
Tienson Qin
6b245551a0 fix: wrongly input TAB to editor 2024-09-25 16:18:36 +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
Tienson Qin
3aae90b7fb fix: can't create tag from existing page 2024-08-16 10:57:12 +08:00
Tienson Qin
e30872a8f5 fix: page graph crash 2024-08-13 22:22:11 +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
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
Gabriel Horner
84638989f6 chore: remove some unused db fns and aliases
and some aliases that were barely used
2024-06-25 17:37:52 -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
c862ad0d10 refactor: db/transact! as outliner op
The benefits:
1. all db transactions from the UI thread can be described in outliner
ops now.
2. batch undo/redo
2024-05-23 05:16:51 +08: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
Gabriel Horner
297e408f6f fix: db graphs can use case sensitive properties 2024-04-24 14:25:29 -04: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
6eb6e60b55 Bring back namespaces/page merge/nested pages 2024-04-07 13:48:55 +08:00
Tienson Qin
86f540bb6b fix: page url for whiteboards in recents 2024-04-04 15:57:48 +08:00
Tienson Qin
1f32893547 fix most issues on whiteboards 2024-04-04 15:57:48 +08:00
Tienson Qin
60d4fca0ba wip: remove :block/name uniqueness for db based graphs
This PR also remove supports for:
1. merge pages when renaming a page to existing page
2. namespaces such as a/b/c
3. nested page such as [[a [[nested page]]]]

Pages merge might be added back depends on RTC, but it should be
decoupled from renaming, otherwise it's too complex.

Namespaces and nested pages have been contributed some critical bugs
that lead data-loss, they're so complex together with page alias,
it's just impossible to have a good test coverage and ensure the app
is stable, especially when page rename and RTC.
2024-04-04 15:57:48 +08:00
Gabriel Horner
f728b7b9f6 fix: multiple bugs with built-in pages, fixes LOG-3046
- file graph wasn't creating built in pages
- 3 places where db graphs were incorrectly using file graph built in
  page names
- file graphs creating default pages with incorrect format
2024-03-29 16:21:19 -04:00
Gabriel Horner
12b6ded0e4 fix: remove unused transit and other db-util helpers
also fix lint
2024-03-07 10:41:39 -05:00
Tienson Qin
4c03e58b6c fix: disallow built-in page or property names from being edited
fixes LOG-3049
2024-03-06 21:29:22 +08:00
Gabriel Horner
c1ab37a372 fix: nbb not working in most deps
core.async isn't nbb compatible yet. Moved async transact to its own
frontend ns
2024-03-04 18:06:29 -05:00
Tienson Qin
e79b928c6b fix: sequential writes 2024-03-03 07:41:59 +08:00
Tienson Qin
33a532455b fix: use core.async channel to ensure sequential db transactions 2024-03-03 06:39:05 +08:00
Tienson Qin
94ce77e509 fix: alias always redirect to the source page
No matter whether the alias page has content or not.
Clicking the alias page in its source page's properties redirect to
the alias page though.
2024-02-28 00:52:28 +08:00
Tienson Qin
ff77698083 fix: async query for scheduled and deadlines 2024-02-01 01:22:41 +08:00
Tienson Qin
420e361381 fix: async <get-file and <get-files 2024-01-30 21:17:18 +08:00
Tienson Qin
99b6d543f0 fix: more async queries and export to roam 2024-01-30 20:03:06 +08:00
Tienson Qin
96dcdd979a chore: code cleanup 2024-01-30 18:55:18 +08:00
Tienson Qin
7b754c672f fix: page unlinked refs
Use search indice to search first and then filter the result by the
db worker. This avoids using `d/datoms` which loads all the blocks to
the memory.
2024-01-30 18:31:06 +08:00
Tienson Qin
a3d5fc699d fix: don't run transact! macro if db requests are not finished yet 2024-01-16 13:24:55 +08:00
Gabriel Horner
2305d09cc8 chore: DRY up duplicated vars and needless/confusing aliases 2024-01-15 16:51:27 -05:00
Tienson Qin
9597330d9f Remove db/state dep on page handler 2024-01-07 17:24:54 +08:00
Tienson Qin
e579f668eb wip: remove dependency on frontend.db for outliner core 2024-01-02 23:23:49 +08:00
Tienson Qin
260ad89937 wip: move pipeline to worker 2023-12-26 22:00:21 +08:00
Tienson Qin
b134954e2c Move all search related impl to worker
This commit also introduced a new ns `frontend.db.async` for
async queries.
2023-12-25 17:05:44 +08:00
Tienson Qin
b2afb5b861 chore: remove unused queries 2023-11-29 19:04:27 +08:00
Tienson Qin
ee3442a44b Merge branch 'master' into feat/db 2023-11-14 20:40:36 +08:00
Tienson Qin
1ad81121c9 fix: UI doesn't show new blocks after starting the app
The reason is that the reactive query state for the first page has
been cleared.
2023-10-18 23:25:38 +08:00
Gabriel Horner
edaf9b286a chore: move frontend db namespaces to a dedicated parent ns
Moved these namespaces to logseq.db.frontend.* to make their purpose
explicit and make the namespaces easier to maintain
2023-10-16 17:24:51 -04:00
Ben Yorke
2d659e8058 Indice being built async + jakob feedback 2023-10-10 15:47:19 +02:00
Ben Yorke
6247cc35fe Abandon perf fix attempt 2023-10-09 15:00:35 +02:00