Commit Graph

208 Commits

Author SHA1 Message Date
Gabriel Horner
5962e0621d Bump to latest kondo and enable new aliased-namespace-symbol linter 2022-10-19 21:24:54 +08:00
Tienson Qin
c3b8c2edfa fix: typo 2022-10-19 21:09:49 +08:00
Tienson Qin
c52dd87315 chore: add safe check on page title 2022-10-19 04:12:54 +08:00
Gabriel Horner
e05f28672a Fix: Remove hidden task properties that weren't used (#6938)
* Remove task properties that weren't used - fix #6902

* Address feedback - remove unused marker
2022-10-11 11:16:01 -04: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
29c1173259 fix: total time in query-table 2022-09-30 11:46:26 +08:00
Spyros Seimenis
e76f0d75ef Fix total clock-time calculation in query table
Fixes issue #6844
2022-09-30 11:45:26 +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
c074465b8a fix: readdir
also, fix warnings on persist var
2022-09-13 22:13:38 +08:00
Gabriel Horner
51c318e2da Enable two disabled linters and bump kondo dep
All the fixes were on used-underscored-binding
2022-09-09 12:14:32 +08:00
Andelf
5b50e229e0 refactor(sync): rename graph-txid to graphs-txid 2022-09-08 11:38:59 +08:00
Andelf
ed18d136da fix: do not backup persist_var 2022-09-08 11:38:59 +08:00
Andelf
0043ba6cf0 fix: persist var init promise 2022-09-07 15:54:39 +08:00
Charlie
01d879c18e feat!: File Sync (#5355)
- file sync for electron/ios/android
- age encryption of both file content and file path
- massive UI enhancement
- corresponding CI tasks

Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-09-01 00:31:49 +08:00
Viktor Moros
f5824322b3 Improve backtick autopairing (#6496)
* If you type a backtick and then some letters and then another backtick, the last backtick should close the first one and not spawn another autopair
2022-08-27 12:32:46 +08:00
Phoenix Eliot
bb199c4de5 Fix wrapped-by? utility function
Improve readability of test failures, add more unit tests
2022-08-11 22:58:51 +08:00
Tienson Qin
59b924f25d fix: CI 2022-08-04 17:25:29 +08:00
Gabriel Horner
4ec5827902 Move block-ref fns and vars to their own ns
Similar to page-ref to keep namespaces explicit
2022-08-04 17:25:29 +08:00
Gabriel Horner
e0b1f6b2de Move common uses of page-ref to its own ns
By having a specific ns for page-ref utils, our code is more readable
and intention revealing. Also found that
text/{get-page-name,page-ref-un-brackets!} was getting called in
contexts that didn't make sense e.g. query layer was checking for
markdown and org page-refs
2022-08-04 17:25:29 +08:00
Gabriel Horner
8be0deecd0 Move markdown property colons into a var 2022-08-04 17:25:29 +08:00
Gabriel Horner
001e0d302d Finish block-ref helpers
There were a couple scattered in 2 text namespaces and there were
a couple uses of block-ref that involved escaping.
Removed block-ref-un-brackets! once it was seen as the equivalent
of an or statement
2022-08-04 17:25:29 +08:00
Gabriel Horner
a3d30e0b52 Move all block ref parens strings to vars
Extracted a couple fns we kept reinventing across namespaces
2022-08-04 17:25:29 +08:00
Gabriel Horner
de61b28000 Add additionable built-in properties that shouldn't have pages created
Introduced hidden naming as that is a more accurate name for its usage.
There may be a possible bug with existing built-in-properties but not
familiar with all cases here and don't want to introduce more bugs
before release
2022-07-15 15:26:09 +08:00
Gabriel Horner
50bce350de Don't auto-create pages for built-in properties
Fixes #5963
2022-07-15 15:26:09 +08:00
llcc
6f395175d5 fix key duplicates caused by key case when insert page property (#5889)
* fix key duplicates caused by key case when insert page property

* use lower-cased property key
2022-07-12 10:58:21 +08:00
Tienson Qin
139075e679 fix: suggestions from gabriel 2022-07-07 01:42:16 +08:00
Tienson Qin
7b74117d85 enhance: auto-complete for property values 2022-07-07 01:42:16 +08:00
Tienson Qin
7c7312d830 refactor: cursor positions 2022-07-07 01:42:16 +08:00
Andelf
4faf26f838 address comment 2022-06-27 15:45:13 +08:00
Andelf
c9be357476 fix(editor): wrong cycle todo when heading symbol on the same line
Fix #5836
2022-06-27 15:45:13 +08:00
llcc
292bda9f8b fix bilibili embed issues
1. fix #5820
2. fix #5811
2022-06-27 15:42:43 +08:00
Gabriel Horner
15b8e5e9df Setup CI jobs that are only for graph-parser
Also move all non graph-parser fns to frontend thanks to carve lint
2022-05-26 18:04:45 -04:00
llcc
2d8047de7f fix: dwiw paste in markdown source block 2022-05-23 11:15:38 +08:00
Andelf
1e3a628c31 fix(fs-watcher): notify all files, skip read non-text files 2022-05-21 13:21:02 +08:00
Gabriel Horner
1d390f7bd4 Replace medley/{map-keys/map-vals} with {update-keys,update-vals} 2022-05-19 14:58:33 +08:00
Gabriel Horner
fec0b755a8 Upgrade cljs + shadow
- Upgraded shadow to keep goog compiler versions the same
- Converted some safe-parse-int's to parse-long
- Converted some safe-parse-float's to parse-double
- Simplified impl of safe-parse-* fns
2022-05-19 14:58:33 +08:00
Tienson Qin
1d9da5c847 fix: properties update 2022-05-19 10:28:13 +08:00
Gabriel Horner
5b0d5fb8b5 Decouple graph-parser util from app util usage
For tiny util heavily used fns like safe-re-find and uuid-string?,
decouple graph-parser from so much of the app
2022-05-13 16:17:44 -04:00
Gabriel Horner
b83f6bbd19 Migrate half the block deps to be nbb compatible 2022-05-12 16:57:28 -04:00
Tienson Qin
0e5d1614a0 Merge pull request #5265 from logseq/enhance/graph-parser-part-two
Enhance: Migrate mldoc and text to graph-parser
2022-05-12 20:22:51 +08:00
Tienson Qin
6073fa1f0a fix: upsert properties
close #5219
2022-05-12 20:01:49 +08:00
Gabriel Horner
65804b4183 Split out text ns to graph-parser 2022-05-10 20:22:48 -04:00
Gabriel Horner
67461aaede Necessary parts of mldoc are nbb compatible
Also merged in parser tests which were not running
2022-05-10 20:22:48 -04:00
Gabriel Horner
657bb09591 Add mldoc integration test and start mldoc split 2022-05-10 20:22:48 -04:00
Gabriel Horner
85bd1fecb2 Move first batch of util fns to graph-parser.util
Still need to fix external.roam
2022-05-04 12:02:36 -04:00
Yue Yang
a32ece7a4d perf: use t/in-minutes
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-04-30 21:22:38 +08:00
Yue Yang
19127b705a perf: optimize the calculation of clock-summary
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
2022-04-30 21:22:38 +08:00
Junyi Du
cf430963af fix: auto save on editing properties 2022-04-26 13:57:07 +08:00
Shotaro Yamada
2b2fc92c4b Fix logbook clock-summary
Current implementation does not correctly handle the carrying up to hours. E.g., for logbook records `0:30:30` and `0:29:30`, it would return `00:00:00`.
2022-04-25 10:29:42 +08:00