Commit Graph

456 Commits (c8ccc79e82aa775ad56785447629f5ace4c5535b)

Author SHA1 Message Date
Gabriel Horner 12c55f401e Fix parse-graph not ignoring correctly for relative dir
parse-graph now returns absolute file paths
2023-05-23 15:57:33 +08:00
Gabriel Horner 450fb9dae5 custom.js should load last in publishing app 2023-05-22 10:45:01 -04:00
Candide U 3b08b9a7e5 Add test for custom.js to export_test.cljs
Fixed missing thing
2023-05-22 10:45:01 -04:00
Candide U fd8bb11c37 Add test for custom.js to export_test.cljs 2023-05-22 10:45:01 -04:00
Candide U a2cf976161 Export custom.js 2023-05-22 10:45:01 -04:00
Candide U c8312bc6df Add custom.js script to html 2023-05-22 10:45:01 -04: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 c86fd3cd4d Add standard lint tasks to common lib 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
Andelf 51201124ff fix(fs): add unicode normalize to path-fn
This is a catch-all type fix
2023-05-18 12:24:18 +08:00
Gabriel Horner 10da24e5b7 Fix current block with disappearing path refs - close #9365
outliner-core/save-block and save-block-inner! were retracting
block/path-refs aggressively, especially for cases when no path-refs
had changed
2023-05-16 11:35:18 +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
Ben Yorke 928742e66b shui/table introduction 2023-05-12 13:24:54 -04:00
Gabriel Horner b2776bbb18 Remove supported-formats in all the places it's no longer used 2023-05-11 13:56:25 +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
charlie 9367590d9b Merge branch 'master' into feat/custom-children-list-style 2023-04-28 10:30:53 +08:00
Andelf 880ea8b00e test(fs): simple test for protocol-url 2023-04-27 14:30:46 -04:00
Andelf 0c91829365 fix(editor): handle protocol urls
Related: #9243
2023-04-27 14:30:46 -04:00
Andelf a301f25474 Revert "Feat: ordered(number) list blocks (#9141)"
This reverts commit 68492a5c67.
2023-04-25 12:37:30 +08:00
Charlie 68492a5c67
Feat: ordered(number) list blocks (#9141)
* fix(ui): marker of number list
* feat(ui): sub alpha marker for order block (own-property)
* fix(ui): make order list style more compatiable
* fix(ui): reactive block state for all the order list related items
* improve(ux): backspace for the empty order list block
* improve(ui): slash commands for the own number list block
* fix(ui): incorrect order list number for the root block
* fix(ui): order list not work for the custom query blocks
* fix(ui): contextmenu for the number list marker
* improve(ui): remove the property of `logseq.children-as` for the order list feature
* fix(ui): incorrect order list number for the journal pages list
---------

Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-04-25 12:24:09 +08:00
charlie 2f6377ed4c Merge branch 'master' into feat/custom-children-list-style 2023-04-25 10:22:55 +08:00
Gabriel Horner 8697d59b72 Add test to prevent regression on #9119 2023-04-24 11:08:35 +08:00
charlie e075d23758 improve(ui): remove the property of `logseq.children-as` for the order list feature 2023-04-21 17:45:57 +08:00
charlie 0449ee6bdc Merge branch 'master' into feat/custom-children-list-style 2023-04-18 18:26:57 +08:00
Tienson Qin b359718f4a
fix: insert properties will truncate other properties if there's any empty property (#9117)
fix: insert properties not working when there's any empty property
2023-04-18 14:01:13 +08:00
Tienson Qin e0f519b7ab fix: query searching for two or more properties is extremely slow
close #8947
2023-04-18 11:00:17 +08:00
charlie f0855d4021 Merge branch 'master' into feat/custom-children-list-style 2023-04-18 10:05:58 +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
charlie 9183dbfdca Merge branch 'master' into feat/custom-children-list-style 2023-04-17 13:57:57 +08:00
Gabriel Horner a7fe7fa19d Break up var that is too large 2023-04-14 09:35:55 -04:00
Gabriel Horner a53ebf1750 Fix parse-graph namespace bugs
parse-graph didn't have all the extract-options that the app does.
Adding them fixed the bugs.
Also fix publishing bug where old :all-pages-public? option wasn't
respected
2023-04-14 09:35:55 -04:00
Gabriel Horner eac3c273ca Updates docs version for parse-graph integration tests 2023-04-14 09:35:55 -04:00
charlie 1043eff9cd feat(ui): WIP number list block (own-property) 2023-04-14 18:37:31 +08:00
charlie a98e612a54 Merge branch 'master' into feat/custom-children-list-style 2023-04-13 01:00:40 +08:00
charlie d8af0cc35a feat(ui): WIP number list block 2023-04-12 17:43:14 +08:00
Konstantinos 95149e13f6
Feat: Export to image (#9037)
* feat: export to image

* chore: export selection on whiteboards

* fix: whiteboards zoom on export

* fix: loading position

* chore: support video thumb

* core: add export to  whiteboards context menu

* fix: context menu entry

* fix; copy image to clipboard

* fix: copy / export label

* fix: hide ui elements

* fix: remove random character

* fix: graph export

* chore: remove console log and jpg format

* style: run prettier

* fix: disable on multiple selected blocks

* fix: multiple blocks

* enhance: restrict bounds of selected shapes

* chore: export selection on whiteboards

* fix: whiteboards zoom on export

* chore: support video thumb

* core: add export to  whiteboards context menu

* fix: context menu entry

* fix; copy image to clipboard

* fix: copy / export label

* fix: hide ui elements

* fix: remove random character

* fix: graph export

* chore: remove console log and jpg format

* style: run prettier

* fix: disable on multiple selected blocks

* fix: multiple blocks

* enhance: restrict bounds of selected shapes

* Fix any html2canvas related functionality failing in publishing

* fix: portal header gradient on export

* chore: add comment about html2canvas-ignore attr

* fix: use export padding constant

* fix: export collapsed portals with size >  medium

* fix: reset export type

* enhance: export filename

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2023-04-12 17:39:22 +08: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 7dc9c41899 Fix nbb.edn paths with latest nbb-logseq
Also upgrade nbb-logseq in other deps
2023-04-12 11:02:43 +08:00
Gabriel Horner ba840399ff Export should error with exit 1 when an error occurs
Also provide skip env var for when not wanting latest publishing
2023-04-09 23:13:33 +08:00
Gabriel Horner 12c0ae38e5 Fix tests and lints
- Fix publishing tests missing dev dep and workaround nbb.edn bug
- Fix regex which fails in cljs tests
- Fix typo
- Fix missing dep in job
2023-04-09 23:13:33 +08:00
Gabriel Horner fef07fe812 Add docs and workflow for dep
Also rename dep to publishing for consistency with existing names
2023-04-09 23:13:33 +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
Gabriel Horner 9ac17d485a Wire up frontend to use nbb export and html
- Add tests for export
- Refactor export to be more readable
- Add error notification for export that user can see
- Remove unused :ui/show-recent? state
- Cleanup and move escape fns to proper locations
2023-04-09 23:13:33 +08:00
Gabriel Horner 66fdb73bce Reorg namespaces and add package.json
Also add db support
2023-04-09 23:13:33 +08:00
Gabriel Horner 76c4e49f34 Working POC! 2023-04-09 23:13:33 +08:00
Gabriel Horner 06fa65861f Minor clean up and help with feedback
- basic clj-kondo config and cleanup unused binding
- Add some unit tests
- Add a basic readme
2023-03-28 09:14:42 +08:00
Andelf d26622872e chore: address comments 2023-03-28 09:14:42 +08:00
Andelf d5d3857466 refactor(migration): add file/path migration 2023-03-28 09:14:42 +08:00
Andelf 62b4f0a253 refactor(fs): simplify path/absolute? 2023-03-28 09:14:42 +08:00
Tienson Qin c1e8d6ed8e refactor: path/absolute? 2023-03-28 09:14:42 +08:00
Gabriel Horner 07c27b0f59 Fix lint and other minor fixes
- Rename is-file-url to reflect boolean return val
- Remove unused 3rd arg for set-config!
2023-03-28 09:14:42 +08:00
Gabriel Horner 94f35bda18 Add a workflow for test+lint and misc fixes
- Setup cljs tests
- No need for :no-doc
- No need to bind an unused _repo value
- Remove unused datascript dep
2023-03-28 09:14:42 +08:00
Andelf da975da3da fix(test): unit tests fail 2023-03-28 09:14:42 +08:00
Andelf 2ad52eab3e fix(fs): file editing on windows 2023-03-28 09:14:42 +08:00
Andelf 94b27014dd fix(fs): asset path on windows 2023-03-28 09:14:42 +08:00
Andelf 72a290d21c fix(electron): initial warning of local dir 2023-03-28 09:14:42 +08:00
Andelf c79c352e08 fix(fs/mobile): ios fs and loading fix 2023-03-28 09:14:42 +08:00
Andelf f1404fd537 fix(fs): avoid nil repo on ios 2023-03-28 09:14:42 +08:00
Andelf 3c0973013b refactor(fs): mv fs2 logic to logseq.common pkg 2023-03-28 09:14:42 +08:00
Andelf e95d73059b refactor(fs): refactor bfs to memory-fs, add memory:// support 2023-03-28 09:14:42 +08:00
Andelf 6082663f4c fix(electron): assets:// url handling 2023-03-28 09:14:42 +08:00
Andelf ad564a4d72 fix(fs): asset url handling 2023-03-28 09:14:42 +08:00
Andelf 31d7c8f836 refactor(fs): use rpath 2023-03-28 09:14:42 +08:00
Tienson Qin db6fc6b7ee
feat: simple query builder (#8774)
Simple query builder

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: charlie <xyhp915@qq.com>
2023-03-21 14:27:00 +08:00
Gabriel Horner 1c3ef2ccb5 Fix url? detection for raw paste case - fix #7297 2023-03-20 09:54:41 -04:00
rcmerci c3f7417682
enhance: add mldoc ast schema (#8829)
* enhance: add mldoc ast schema

* Add bb task to validate mldoc

Also move mldoc schema to make room for other schemas

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2023-03-20 13:41:13 +08: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
Gabriel Horner d7d65a6c66 Remove :collapsed from properties-text-values like we do for :id
https://github.com/logseq/logseq/pull/8657/files#r1112206914
2023-02-21 12:35:23 -05:00
Zhizhen He 25c15053d6 feat: add typos to GitHub action
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-02-21 12:01:58 -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
Tienson Qin 3fde6f59ec fix(lint): add mldoc-link? to ignore 2023-02-13 15:27:20 +08:00
Tienson Qin c8db7646e2 fix: use mldoc to check links 2023-02-13 15:19:11 +08:00
ksqsf 9f2ce3dd39 enhance: recognize refs as links when inserting links from selection 2023-02-13 15:19:11 +08:00
Junyi Du 9d2055f8b9 enhance: re-index performance 2023-02-10 15:32:54 +08:00
Konstantinos 206844d2a8
Fix: Auto heading on markdown mode (#8327)
* fix: markdown auto heading

* fix: do not remove heading property

* fix: always clear heading before setting

* fix: auto heading preview on edit mode

* fix: inc

* fix: remove console log

* fix: remove numeric heading and revert changes

* disable current state button
2023-02-06 23:04:22 +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
Ben Yorke c76da13570 Adds support for :query-page as an input 2023-01-31 16:05:20 -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 5ac1415726 Comments to describe unresolved behavior more explicitly 2023-01-20 16:19:19 -05:00
Gabriel Horner 5fb73ebb4f Bump nbb-logseq to confirm branch is nbb compatible 2023-01-20 15:57:49 -05:00
Ben Yorke a2efbdb333 Add error test conditions 2023-01-20 13:07:29 +01:00
Ben Yorke ba68a368f4 Add HHMMSS and HHMMSSmmm 2023-01-20 12:53:24 +01:00
Ben Yorke b6c00254e8 Add tests for time related queries 2023-01-20 12:29:22 +01:00
Ben Yorke 4855a539f8 Added HHMM support and split out :relative-date-time 2023-01-20 10:36:05 +01:00
Ben Yorke 5e0d0d4bbe Remove extra date relatives 2023-01-18 14:22:33 +01:00
Ben Yorke 07f58f33d6 Refactor resolve-input to use simple query relative date syntax 2023-01-18 14:08:54 +01:00
Andelf 193677b46f
perf: Reduce usage of remove-nils since it's too slow (#8323)
* reduce usage of remove-nils since it's too slow

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2023-01-12 19:00:50 +08:00
Andelf 8431187eb7 chore: fix lint by adding .carve/ignore 2023-01-12 18:11:04 +08:00
Andelf 268f0a5442 fix(fs): wrong graph name impl
Fix #8292
2023-01-12 18:11:04 +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
rcmerci 1790223ed6 copy distinct-by to graph-parser 2022-12-26 15:50:21 +08:00
rcmerci db7975d09f enhance: also replace distinct-by in deps/graph-parser & electron/search 2022-12-26 15:50:21 +08:00
Junyi Du 2b81378ba2 chore: fix lint error on colons-org 2022-12-21 10:00:22 -05:00
glippi 7249651345 Fix format property reference when org mode 2022-12-21 10:00:22 -05:00
Gabriel Horner 10d6bc28da Switch named block links to autolink to header blocks
Replaced block property approach as it doesn't provide as much
functionality initially
2022-12-15 11:14:56 -05:00
Gabriel Horner b4f26a5c7b Add property which allows for giving a block a routable name
Also update router fn so that it works for all uses of routing to a
block
2022-12-15 11:14:56 -05:00
Gabriel Horner 39e1b8dc8a Add built-in property to list
Hide it on edit so query table doesn't look weird.
Also removed needless arity wrappings in block fns
2022-12-15 20:37:17 +08:00
Gabriel Horner 13277b875d Upgrade to latest clj-kondo - pods were pretty out of date 2022-12-09 13:17:09 -05:00
Andelf ebd2865d30 refactor(unused): rm adoc support 2022-12-05 10:50:56 +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 c44b20ad22
Merge branch 'master' into mrtracy/ref_sync_fix 2022-11-23 14:28:24 +08:00
Tienson Qin 2220fef445
Merge branch 'master' into fix/namespaced-alias 2022-11-23 14:14:04 +08:00
Peng Xiao 926b7d859b
Merge branch 'master' into feat/wb-linkings 2022-11-23 13:12:20 +08:00
Gabriel Horner 794684750e Fix up rules lint know that rules var is a map 2022-11-21 14:02:58 +08:00
Gabriel Horner 70a476dde3 Fix up model tests and remove unused rules 2022-11-21 14:02:58 +08:00
Peng Xiao 883cdacd3e wip: links for any shape 2022-11-19 18:29:09 +08:00
Peng Xiao 07d716756c fix: whiteboard back links in page refereneces 2022-11-19 17:52:28 +08:00
Andelf 20c527a3d9 fix(props): show hierarchy for page alias
Close #7365
2022-11-17 11:01:00 +08:00
Matt Tracy be7e37e924 Retain block references on file reload
Commit fixes a bug where block references (i.e. `:block/refs`
association in the db) are lost when the page containing the referenced
block is re-loaded due to an update of its underlying file.

Description of Bug:

The bug occurs because when a file is re-loaded to the DB from disk, all existing blocks
belonging to the file are deleted via `retractEntity`, and then blocks
from the parsed file are added. If the file had only had small changes,
the new block set will be very similar to the previous one, although
with different db/ids.

However, while new blocks with "id:: " properties will assume the UUID value
of the previous version of the block, any references to that block via
UUID will *not* be restored in the DB; they are deleted with the
retractEntity command. This results in an inconsistent DB state, where references that should
exist do not.

Description of Fix:

The 'delete-blocks-fn' passed to the graph_parser has been modified as
such:

- It now accepts a list of block uuids to *retain*; graph parser will
  pass the blocks parsed from the new file content.
- For any blocks which match a UUID in the retain list, instead of
  deleting via retractEntity, the individual attributes are deleted via
  retractAttribute (the `retract-attributes` from schema.cljs is used
  for this purpose).
2022-11-16 14:05:19 -08:00
Tienson Qin 98703f4d6c fix: typo 2022-11-07 11:39:28 +08:00
Tienson Qin 2dfac3d774 deprecate: on-disk encryption
Why?
1. there're still a lot issues on it and there's no resource to
maintain and develop it considering we need to support it on all the
platforms.
2. it creates more bugs with Logseq Sync.
2022-11-07 10:46:17 +08:00
Tienson Qin 5bf0b49d1e Log error 2022-11-07 09:22:27 +08:00
Tienson Qin dd0169b068 fix: notify users to switch to the new filename format
Notify users to switch to the new filename format if there're reserved
chars when syncing.

Also, this commit replace all `js/decodeURIComponent` with
`safe-decode-uri-component` to avoid UI crashes.
2022-11-07 09:22:27 +08:00
Peng Xiao afd7c1b0f0 fix(whiteboard): persisting whiteboard block collapsed state 2022-10-27 21:23:58 +08: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
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
Charlie d53ac94bfc
Enhance/pdf improvements (#6475)
Full-text search, highlights and assets alias support 
It also exposes a plugin API for highlight context menu   
    ```ts
    /**
       * Current it's only available for pdf viewer
       * @param label - displayed name of command
       * @param action - callback for the clickable item
       * @param opts - clearSelection: clear highlight selection when callback invoked
       */
      registerHighlightContextMenuItem: (
        label: string,
        action: SimpleCommandCallback,
        opts?: {
          clearSelection: boolean
        }
      ) => unknown
    ```
2022-10-09 20:44:18 +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 bb2df1b3b7 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-30 08:51:05 +08:00
Gabriel Horner 88dbb73b6b Add tldraw properties to hidden so they don't show up in unwanted places like autocompletion 2022-09-29 11:21:09 -04:00
charlie 627bfcec9e fix(sync): synced pictures not reload on mobile 2022-09-29 22:39:18 +08:00
Peng Xiao 48d4b657dc fix: ci 2022-09-29 15:11:06 +08:00
Peng Xiao 7bae8313d3 refactor: move tldraw shape related props into logseq.tldraw.shape/page 2022-09-29 14:41:55 +08:00
Peng Xiao d1a7846a3b fix: tests 2022-09-29 00:21:49 +08:00
Peng Xiao 52b81c809c feat: create new portal shape when left-clicking block/page refs inside of portal shape 2022-09-28 22:37:37 +08:00
Peng Xiao ce4b2a4ad1 fix: use :block/type instead of :block/whiteboard? 2022-09-28 18:27:03 +08:00
Peng Xiao 4520399ddf Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-28 10:29:20 +08:00
Tienson Qin 086bae5156 fix: use parsed level as heading level instead of default 2 2022-09-27 16:12:23 +08:00
Tienson Qin a27a270b04 fix: CI 2022-09-27 16:12:23 +08:00
Tienson Qin 8b144269f7 refactor: unify heading UX for both markdown and org mode 2022-09-27 16:12:23 +08:00
Gabriel Horner 639001971d Add shortcut for seeing whiteboards and minor fixes
See #6812 for the catch and we should be using our util fns
for ref chars
2022-09-24 02:58:10 -04:00
Peng Xiao 4044a458ac fix: whiteboard idle check issue 2022-09-24 12:26:35 +08:00
Peng Xiao 3c85585431 fix: parsing whiteboard edn file 2022-09-24 10:36:06 +08:00
Peng Xiao 526a8d99c8 fix: merge issues 2022-09-24 10:16:19 +08:00
Peng Xiao fd94862312 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-24 09:42:00 +08:00
rcmerci 40e7c29bd6 enhance: use transducer in extract-refs-from-mldoc-ast 2022-09-22 15:06:34 +08:00
Tienson Qin 1830b0c082 fix: treat special chars as invalid properties instead 2022-09-22 14:20:15 +08:00
Gabriel Horner 39b7f1bb45 Update docstring for :block/properties 2022-09-21 16:23:56 -04:00
Gabriel Horner 9d9e976b8c Merge branch 'master' into refactor/refs-from-property-values 2022-09-21 15:34:47 -04:00
rcmerci 628cecc2fd enhance: use transducers 2022-09-21 18:32:14 +08:00
Tienson Qin eae49ec1f5 chore: misc clean 2022-09-21 17:10:40 +08:00
Tienson Qin baba078323 fix: support comma in Chinese 2022-09-21 17:03:17 +08:00
Tienson Qin 50db6e42a0 fix: extract property refs support mixed values 2022-09-21 16:46:56 +08:00
Tienson Qin 0ede2d1263 fix: lint 2022-09-21 16:07:05 +08:00
Tienson Qin 310bff0fad fix: CI 2022-09-21 16:02:21 +08:00
Tienson Qin 1fbb364512 Add :block/properties-text-values 2022-09-21 15:06:48 +08:00
Tienson Qin da72d4d620 Some cleanup suggested by Gabe 2022-09-21 12:59:14 +08:00
Gabriel Horner a368cab5e4 Add ns linter to deps libs and then add+update ns docstrings 2022-09-21 10:17:15 +08:00
Gabriel Horner edd79954c1 Another test and address review feedback that shouldn't be controversial
- Added test for 71514ab36c
- Also removed dependency that is no longer used
2022-09-15 18:01:29 -04:00
Gabriel Horner ecce39d13b Misc cleanup and test improvements
- Remove incorrect carve entry
- Move test-only code for extract-properties to test
- Remove unused if branches in extract-properties
- Move json parsing of get-references into mldoc to be consistent about
  json encapsulation like other mldoc fns
- reorganize relevant unit tests
- add tests for alias, tags and comma separated config properties
- Update incorrect docstring
2022-09-14 23:26:00 -04:00
Tienson Qin b0aecd10b4 fix: keep invalid-properties for page too 2022-09-14 22:24:01 +08:00
Tienson Qin 00e13c1fc5 fix: datoms count 2022-09-14 20:45:04 +08:00
Tienson Qin 71514ab36c fix: extracting page's title property from mldoc ast 2022-09-14 20:29:44 +08:00
Peng Xiao 3d8fa09d0d fix: merge issues 2022-09-10 01:02:16 +08:00
Peng Xiao 4d86f4f53f Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-10 00:45:27 +08:00
Tienson Qin 8bd28eeeb8 fix: comma separated refs are not included in block/refs 2022-09-09 15:16:33 +08:00
Tienson Qin 79af14d75e fix: graph parser CI 2022-09-09 14:30:39 +08:00
Tienson Qin 58839059ac fix: CI 2022-09-09 14:13:35 +08:00
Tienson Qin cab5dc45a2 fix: tag parsing 2022-09-09 13:19:35 +08:00
Tienson Qin b516c1db5f Add :property/separated-by-commas option 2022-09-09 12:40:14 +08:00
Tienson Qin 2c7bae1190 fix: , and some chars shouldn't be supported for tags 2022-09-09 12:39:28 +08:00
Tienson Qin 7adf1c9d67 fix: extract ref from mldoc Tag 2022-09-09 12:39:28 +08:00
Tienson Qin 040fd5510f fix: some tests on graph_parser 2022-09-09 12:39:26 +08:00
Tienson Qin d64042df81 chore: bump mldoc for graph parser 2022-09-09 12:38:35 +08:00
Tienson Qin 2dfc3be462 fix: unused vars in graph-parser 2022-09-09 12:38:33 +08:00
Tienson Qin c376c408e0 fix: lint warnings in graph_parser 2022-09-09 12:37:57 +08:00
Tienson Qin 0266c1586b fix ci 2022-09-09 12:37:57 +08:00
Tienson Qin 9e2d6e7cfb fix: page refs 2022-09-09 12:37:57 +08:00
Tienson Qin 336fa578d5 refactor: replace directives(front matter or org) with properties 2022-09-09 12:37:55 +08:00
Tienson Qin d1d1dc50c2 wip: get references from property values 2022-09-09 12:36:54 +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
Tienson Qin e5fd0b6529 perf: importing graph
There're two things makes the importing slow:
1. db transact! for each file, now it's batched for 100 files.
2. block waiting for 10s before parsing so that the progress bar ui
can be changed, this is batched too for 10 files.
2022-09-08 20:21:09 +08:00
Gabriel Horner 7ade955df7 Additional polish and fixes
- fix two bugs with subs - didn't have global config and missing merge
- explicit re-watch for global config
- more docs
2022-09-08 12:34:27 +08:00
Peng Xiao a58e513928 fix: whiteboard load issue on file name 2022-09-07 17:46:11 +08:00
Peng Xiao 91d63b82b9 test: failed test 2022-09-06 23:42:27 +08:00
Peng Xiao f3418a6278 fix: a potential data loss issue for whiteboard blocks 2022-09-06 23:09:26 +08:00
Peng Xiao 5e44055984 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-02 09:46:58 +08:00
Tienson Qin 935ba7930c fix: journal titles with different capitalization in Query
results/Linked References

close #6541
2022-09-01 20:06:50 +08:00
Peng Xiao 33885e619b Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-01 10:29:29 +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
Peng Xiao f5d83483ce Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-31 10:44:18 +08:00
Peng Xiao 94e5c9d1a3 fix: whiteboard block left index on reindex 2022-08-31 10:43:11 +08:00
Peng Xiao 89c6f17283 fix: exclude whiteboard properties for auto complete 2022-08-31 10:17:19 +08:00
Gabriel Horner 9a9e793177 Update test for change in b15da3e78a 2022-08-30 11:13:38 -04:00
Tienson Qin b15da3e78a fix: page name not changed after parsing the title property 2022-08-30 12:14:11 +08:00
Peng Xiao 0ff5324c02 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-29 10:45:15 +08:00
Gabriel Horner b47826d69d Fix page block not saving invalid-properties 2022-08-27 10:52:29 +08:00
Gabriel Horner 340fb8cf9a Invalid property fix and tests
- Fix validator considering 'foo bar' or a number or any valid edn, a valid keyword
- Rename property keys to names as users don't know what keys are
- Also bumped nbb-logseq to latest version
- Also give property validation more product focused namespace and name
2022-08-27 10:52:29 +08:00