Commit Graph

211 Commits

Author SHA1 Message Date
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
Gabriel Horner
a93fe4d81b Move recalculate-block-path-refs to outliner dep
Moved dependent query fns also into the outliner dep. Removed
get-block-children-ids from model as there was only one use of it after
the refactor. Also setup testing for outliner and moved in a test for it
2023-09-06 16:20:29 -04:00
Tienson Qin
c81e114a1c fix: lint 2023-06-28 15:20:22 +08:00
Gabriel Horner
75ff4db4aa Fix: circular dependencies again b/n deps <-> frontend
Breaks setup of deps/ and most tests
2023-06-27 16:39:10 -04:00
Gabriel Horner
4e99e21642 Fix commandline publishing not working e.g. bb dev:publishing
Also fix db dep having a circular dependency. frontend.* namespaces depend on deps/ dependencies
so we can't have frontend namespaces in deps/
2023-06-23 16:52:54 -04:00
Tienson Qin
029b196432 refactor: remove db/get-paginated-blocks 2023-06-20 14:06:42 +08:00
Tienson Qin
55ff7584b7 wrap-parse-block impl for db && file 2023-06-14 15:13:22 +08:00
Tienson Qin
e01846188a refactor: add frontend.db.listener 2023-05-29 17:56:35 +08:00
rcmerci
a2a8aaf93b add frontend.db.restore 2023-05-25 23:28:01 +08:00
rcmerci
8f65b3709f sort tx-data when restore graph from sqlite 2023-05-25 00:03:15 +08:00
rcmerci
a6f362550b fix restore-graph-from-sqlite 2023-05-24 21:36:45 +08:00
rcmerci
4461f06254 update sqlite schema 2023-05-24 19:10:00 +08:00
Tienson Qin
860f9cbfa3 fix: loading journal blocks twice 2023-05-24 11:41:48 +08:00
Tienson Qin
d7ae59378f fix: transact schema first 2023-05-23 23:01:47 +08:00
Tienson Qin
76046eea41 fix: clean code 2023-05-23 15:57:34 +08:00
Tienson Qin
19ca0df01b perf enhancement for loading graph from sqlite 2023-05-23 15:57:34 +08:00
Tienson Qin
a3b3c2e5d4 increase per-length for db restore 2023-05-23 15:57:34 +08:00
Tienson Qin
b158262ce6 initial load from sqlite 2023-05-23 15:57:34 +08:00
Tienson Qin
df11ccc17a db wip 2023-05-22 13:01:55 +08:00
Tienson Qin
cb7e1321c0 fix: disable reactive queries in api
close #9063
2023-04-12 23:57:05 +08:00
Gabriel Horner
5186070248 Finish migration of publishing to deps
* Frontend and cmdline version use the same fns!
* Add docstrings and db tests
* Fix bug with intermittently failing asset copies
* Move publish cli to scripts since publish-spa shouldn't have graph-parser dependency
* Fix parse-graph bug noticed while testing publishing
2023-04-09 23:13:33 +08:00
Andelf
d5d3857466 refactor(migration): add file/path migration 2023-03-28 09:14:42 +08:00
Tienson Qin
6a5b0c8199 Fix pencil not working if drawing quickly (replace tldraw's undo/redo history with logseq's) (#7786)
* fix: pencil not working if drawing quickly

* feat: mod+c mod+g to toggle grid

Co-authored-by: Konstantinos Kaloutas <konstantinos@logseq.com>
2023-02-22 23:16:52 +08:00
Gabriel Horner
17f51c7b77 Make resolve-input nbb compatible
- Brought back Xd-{before,after}-ms and tested it
- Move it to its own ns in graph-parser
- Updated nbb-logseq in deps/
- Made db-utils alias consistent
- Organized resolve-input
2023-01-07 02:49:07 -05:00
Tienson Qin
542137047c fix: UI not updated after code changes 2022-12-20 14:57:20 +08:00
Gabriel Horner
e2fe300da7 Move delete-blocks-fn to graph-parser for reuse for nbb
Also:
- Move test to a more appropriate ns - model-test isn't for testing
  higher level parse file behavior
- Delete model fns that are no longer used
- Fix tests which had incorrect target-page-content and were no longer
  testing retractAttribute
- Add options to cli ns for related nbb reuse
- Light cleanup of block deletion
2022-11-26 01:01:36 -05:00
Tienson Qin
0da1f2ce83 fix: lint warning 2022-10-18 09:51:41 +08:00
Tienson Qin
d1d28602fb fix: can't collapse/expand in the exported public graph 2022-10-18 09:49:01 +08:00
Junyi Du
0e4037ab61 Feat: new file name escaping rules (#6134)
* feat: new file name escaping for namespace

feat: new file name decoding back to page name

* test: file name sanitization

feat: use _0x to encode %

feat: don't create title property

test: extra URL encoding for escaped file names

fix: fit pdf prefix into new file name rules

fix: encoding rules on some characters

fix: handle the buggy file names imported by users

fix: pdf block ref failed to jump

fix: #6167

* fix: enhance backward compatibility

chore: title validation

test: fix namespace queries test

chore: use index version stored in config.edn instead of search.versions

* feat: convert old version graph mechanism

ui: file conversion UI

feat: rename files for conversion

feat: don't trigger conversion when title property is manually edited

fix: file conflict notification while renaming files on some OS

feat: re-index on update version

feat: clicking NO in the re-index dialog would update the index-ver flag to suppress the dialog

feat: use html entities for reserved char escaping

dev: remove unresolved vars & minor refactor

chore: move file name sanity from gp-util to fs-util, as it's for encoding only but not parsing

test: update file name tests to html entities rule

test: convert files from dir ver 3 for repo_tests

feat: convert Windows reserved file names

fix: save index version into idb instead of file

fix: decode uri of path while parsing files on mobile

fix: couple dir version and index version to ensure only re-index on converted dirs

feat: go back to url-encode for special chars

* chore: fix lint

chore: improve codebase to address Gabriel's comments

fix: remove file remnants on add conflict

fix: remove file remnants on rename conflict

chore: add test ns to nbb runner

Also fix typoed fn and remove unused code

* fix: issues of rebase PR6134 to master after file-sync merged

* feat: switchable filename format

* fix: use  go block to replace promesa for rename all with blocking

* feat: re-index after apply rename all

* ui: file conversion enhancement

* fix: merging filename format PR with master

* fix: filename format lint & CI

* ui: filename format flow

* fix: error handling on the rare internal file path confliction case

* chore: shorten component code for files-breaking-changed

* chore: fix CI

* Minor fixes per latest code review

- Remove unused page-name-order
- Update catch usage to be consistent with what's on master
- Place state fn in right place
- Wording fixes:
  - select and apply -> manual. There are no checkboxes for the user
  - Update -> Edit. We use edit for all other settings button
  - Alternatives to starting sentences with May. Not a common way to
    start a sentence
  - update outdated template comment

* ux: rename instruction update

* ux: rename instruction update (2)

* Tweak wording of conversion modal

Simplifed first paragraph and explained the page to the user in first
sentence, may isn't a common way to start sentences and updated outdated
wording

* Fix large-var warning by splitting out a piece of component

* fix: right slash on Windows; legacy format file sanitization

* fix: triple lowbar renaming fns

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-10-08 15:47:45 +08:00
Gabriel Horner
1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Gabriel Horner
2ce6dfad41 Use catch :default for default error handling in cljs
This is considered normal practice for cljs. See
https://clojure.atlassian.net/browse/CLJS-661 for when it was introduced
and background on it
2022-09-23 02:00:55 +08:00
Tienson Qin
7fa9209e29 fix: load global config synchronously instead of relying on watcher
This commit also refreshs the shortcuts when config files has been edited.
2022-09-08 12:34:27 +08:00