Commit Graph

258 Commits

Author SHA1 Message Date
Tienson Qin
7258cf48da fix deps 2024-01-03 18:12:12 +08:00
Tienson Qin
9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin
a6f83c2445 Move worker.util fns to common.util 2024-01-03 17:08:24 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Gabriel Horner
ffa6aaae29 fix: remove unused db.sqlite related fns
- remove sqlite-db/close! as its not used and didn't make sense to be
  used in other electron ns
- remove sqlite-db/connections atom as its not needed
- remove read-graph as its not necessary
- rename cli.persist-graph as its primary purpose has changed
- update effected scripts
2023-12-13 12:06:24 -05:00
Gabriel Horner
b5eabc80ee fix: db and graph-parser nbb tests to pass locally
Updated sqlite fns to use updated approach. Deleted some unused
fns from old approach
2023-12-11 13:51:47 -05: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
Gabriel Horner
b1b830c872 fix tests I forgot to update with :block/format fix 2023-10-16 16:14:53 -04:00
Gabriel Horner
e09a5d9988 fix: pages didn't consistenly have :block/format
Making attributes consistent reduce bugs in components and query layer (where
most wouldn't know to use get-else)
2023-10-16 12:58:11 -04:00
Gabriel Horner
82994cb79d fix: tests related to :block/type arity change 2023-09-25 12:30:21 -04:00
Tienson Qin
0e8653985d refactor: allow a block to have multiple types
For example, a whiteboard page can be used both as a property and a class.
2023-09-25 10:46:00 +08:00
Gabriel Horner
172ee0ae24 Provide sqlite.cli for reusable sqlite fns
Already had to do read-graph 3 times and will soon need to it outside
logseq so worth putting this behind an api ns
2023-08-15 18:08:44 -04:00
Gabriel Horner
40237b912f Remove nonexistent :block/unordered from test 2023-07-24 12:32:08 -04:00
Gabriel Horner
5f91e6cf0f Merge branch 'master' into feat/db 2023-07-24 12:21:19 -04:00
Gabriel Horner
2b90b0462a Remove explicit :block/unordered that should already be deleted 2023-07-24 10:26:02 -04:00
Gabriel Horner
48009adaf9 chore: reuse common helper for stringifying datoms 2023-07-20 18:37:22 -04:00
Gabriel Horner
d7eeea28dd Add a test that ensures file and db graphs have expected datoms 2023-07-20 18:27:07 -04:00
Andelf
a59ecb370d chore(deps): bump diff-merge to 0.1.0 2023-06-26 19:20:04 +08:00
Junyi Du
bea081c5b0 test: more remove indent test 2023-06-16 00:42:30 +08:00
Tienson Qin
bccf5888c7 add tests 2023-06-16 00:42:30 +08:00
Gabriel Horner
51a23934a4 Fix parse-graph not ignoring correctly for relative dir
parse-graph now returns absolute file paths
2023-05-19 21:49:58 -04:00
Gabriel Horner
47508ac2ac Add :hidden config support to graph-parser.cli
Also fix lints and tests from previous commits
2023-05-18 23:25:15 +08:00
Gabriel Horner
91beda09d5 Split out graph fns and reuse them b/n gp-cli and electron
Also added test
2023-05-18 23:25:15 +08:00
Gabriel Horner
fe24b61beb Fix asset link creating invalid page for org mode 2023-05-15 11:55:59 +08:00
Gabriel Horner
7335a6f623 Fix org mode page refs - close #9367 2023-05-15 11:55:59 +08:00
Gabriel Horner
b26d83d2fc Fix mailto and other links creating invalid pages
Fixes #9346 and fixes #5926.
Also fixes case where relative paths for unsupported paths were creating
pages per directory e.g. `deps/graph-parser/yarn.lock` created deps and
graph-parser pages
2023-05-11 13:56:25 +08:00
Junyi Du
5aba871ead deps: diff-merge
dev: graph parser IoC hook

test: use test db for diff-merge tests

fix: ci lint

dev: refactoring post block-parsing process

feat: diff-merge 2 way merge integration

fix: key namespace of uuid in fix-duplicated-id

fix: duplicated uuid ci
2023-04-17 09:41:39 -04:00
Gabriel Horner
eac3c273ca Updates docs version for parse-graph integration tests 2023-04-14 09:35:55 -04:00
Gabriel Horner
5cce967192 Add nbb-test-runner to graph-parser
Replaces manual, hardcoded runner
2023-04-12 11:02:43 +08:00
Gabriel Horner
1c3ef2ccb5 Fix url? detection for raw paste case - fix #7297 2023-03-20 09:54:41 -04:00
Gabriel Horner
6108aa1036 Add tests for timestamp blocks
Also make block attributes more explicit in pre-block and reduce needless coupling
2023-02-27 13:20:10 -05:00
Gabriel Horner
6506c369e8 Add support for block refs in page/block props 2023-02-27 13:20:10 -05:00
Tienson Qin
40ad524443 fix: duplicated block ids in multiple files (#8668)
fix: duplicate block ids in multiple files
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2023-02-21 15:50:09 +08:00
Tienson Qin
3372b3bfbd fix: duplicate block ids in same file (#8657)
fix: duplicate block ids in the same file
2023-02-21 14:40:43 +08:00
sallto
351a4f34a3 feat: support Media Fragment URIs with audio (#8300)
* fix: fragment urls for audio player

* fix: add Support for url queries and fragments to extension detection

* feat: add tests for extraction of file extension

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2023-02-06 16:47:23 +08:00
Gabriel Horner
917a8aa098 Fix page blocks not displaying full property values in query tables
We were only saving these in pre-block but we also need them in page
block. Also adds tests for blocks that had this behavior since #6529
2023-02-01 16:28:42 -05:00
Gabriel Horner
78506f22d0 Fix deftests that have confusing args that only apply to defn
Follow up to #8412 where we're accidentally copying
invalid forms from other tests
2023-01-30 10:56:06 -05:00
Brooks Rady
e7b511dc5b fix: normalize the case of property keys (#8412)
* fix: normalize the case of property keys

* chore: remove debugging print statement

* chore: remove unneeded file from diff

* Added tests for Org title parsing

---------

Co-authored-by: Bad3r <bad3r@protonmail.com>
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-01-30 10:44:23 -05: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
Gabriel Horner
93dd107b8f Fix file links creating garbage pages
Fixes #6034, #6618, #6930
2022-10-27 20:56:31 +08:00
Gabriel Horner
5962e0621d Bump to latest kondo and enable new aliased-namespace-symbol linter 2022-10-19 21:24:54 +08:00
Gabriel Horner
daf654172c Disallow tags as property names - fix #6753 2022-10-19 21:19:26 +08:00
Gabriel Horner
c6a3eb2de0 Fix title and other built-in properties incorrectly parsing refs
Fixes issues in #6970. Introduced built-in property types as there are
fewer to list as parsed than unparsed.  Also removed test case that was
incorrectly introduced in #5580
2022-10-16 12:17:11 +08:00
Junyi Du
99dc9c371c test: double queare bracket in title 2022-10-16 12:17:11 +08:00
Peng Xiao
cca1d35510 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-10-08 17:26:45 +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
Tienson Qin
91dddd7541 Fix: stuck re-index when there're multiple whiteboards have the same UUID (#6890)
* fix: keep parsing even if some whiteboards can't be transacted

* enhance: notice parse errors

* enhance: instrument parse-and-load-error

* chore: add tests for whiteboards parsing and loading
2022-10-07 12:04:43 +08:00
Peng Xiao
d1a7846a3b fix: tests 2022-09-29 00:21:49 +08:00
Peng Xiao
ce4b2a4ad1 fix: use :block/type instead of :block/whiteboard? 2022-09-28 18:27:03 +08:00
Peng Xiao
fd94862312 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-24 09:42:00 +08:00