Commit Graph

222 Commits (5ac14157265c3de79a11fbff40972e55c472dcd3)

Author SHA1 Message Date
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