Commit Graph

205 Commits

Author SHA1 Message Date
Peng Xiao
01b04fc2f8 fix: perf optimize on cleanup 2022-09-28 14:42:42 +08:00
Peng Xiao
b3ecf26b90 fix: revert change of parse-title-and-body 2022-09-28 11:36:11 +08:00
Peng Xiao
fd94862312 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-24 09:42:00 +08:00
Peng Xiao
031ad9c4a9 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-09-15 09:46:44 +08:00
Tienson Qin
585e0dbf9d Merge branch 'master' into refactor/refs-from-property-values 2022-09-14 22:25:09 +08:00
sallto
20542700a5 fix: Date sorting is nonsensical #6363 (#6596)
* fix: Date sorting nonsensical
* simplify normalize-block
* adjusted handling of sets and added tests

Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
2022-09-14 22:13:58 +08:00
Tienson Qin
336fa578d5 refactor: replace directives(front matter or org) with properties 2022-09-09 12:37:55 +08:00
Peng Xiao
9382750dc2 fix: heading style in single block 2022-08-20 11:22:03 +08:00
Peng Xiao
b30adea656 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-05 13:59:06 +08:00
Tienson Qin
a1ca6820df Fix: broken linked references (#6105)
* enhance: clicking the refresh button if a query is slow

* fix: skip running slow queries if there's no need to refresh

* fix: linked reference filtering does not work on TASK items

close #1669

* fix: each block should have its own page as a reference when query page references

* fix: references

* fix: non consecutive blocks in query result and filtered linked references

* simplify filters logic

* fix: ref numbers

* Save both :block/refs and :block/path-refs for different usage

* fix: block refs

* enhance: move scheduled and deadlines to its own ns

* linked references performance tweaks

* mouse hover filters icon to expand the collapsed linked refs

* perf: react/refresh! once instead twice

* enhance: compute flashcards every hour instead of every 5s

* feat: macros as blocks

* feat: flashcards list

* fix: refed pages count

* fix: can't select in linked references

* fix: block editing on linked refs

* perf: editing in linked references

* enhance: update srs cards number when clicking flashcards

* Add a test for the case fixed in #6100

* Address feedbacks from Gabriel

* fix: Block Ref Indicator is missing from the references-blocks class

close #5375

* fix: referenced pages

* fix: page refs

* fix: Using filters pushed the title property to the second block

close #5845

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-08-04 13:03:12 +08:00
Peng Xiao
0a2688de83 feat: showing single block for blocks 2022-07-26 18:05:22 +08:00
Gabriel Horner
538aea0437 Add try/catch for unexpected failures during block extraction
Notify user and sentry when unexpected errors occur
2022-06-08 13:19:50 +08:00
Gabriel Horner
e999ebc149 Automatically set extract-options correctly
- Removed state paths [:config :text-formats], [:config :img-formats]
  and [:me :settins :date-formatter] as they have been unused since
  their introduction in 2020
- Converted incorrect js/Error refs
- Also merged db.config test helpers
2022-05-26 18:04:45 -04:00
Gabriel Horner
b9bbd0c605 Finish migrating extract to nbb 2022-05-13 15:47:54 -04:00
Gabriel Horner
b1e226745d Finish migration block ns to nbb 2022-05-12 16:58:26 -04:00
Gabriel Horner
b83f6bbd19 Migrate half the block deps to be nbb compatible 2022-05-12 16:57:28 -04:00
Gabriel Horner
22ddae8998 Move graph-parser related block code to proper ns and nbb migration wip 2022-05-12 16:57:28 -04:00
Gabriel Horner
20b8b9624d Moved nbb ns into graph-parser. nbb mldoc tests wip 2022-05-10 20:22:48 -04:00
Gabriel Horner
65804b4183 Split out text ns to graph-parser 2022-05-10 20:22:48 -04:00
Gabriel Horner
f529777d78 frontend.text conversion WIP
Removed extract-level-spaces b/c it's not used
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
Tienson Qin
ca5745fc9b fix: title of newly created pages are all lowered 2022-05-09 00:34:04 +08:00
Tienson Qin
362c328e91 fix: missing title properties when page name contains / or reserved chars
Close #5171
2022-05-09 00:34:04 +08:00
Gabriel Horner
a58a411567 Move config fns and remaining util fns that mldoc depends on 2022-05-04 12:02:36 -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
Tienson Qin
904eff6d9d Core outliner operations refactoring (#4880)
* Add outliner nested transact!

Copied the code mostly from https://github.com/logseq/logseq/pull/4671
by zhiyuan

* refactor: insert-blocks

* fix: insert-blocks

* fix: move cursor to the last block when inserting

* fix: replace the current block when inserting and its content is empty

* keep only :insert-blocks

* expose only :delete-blocks

* Use existing implementations for move-nodes-up-down and

indent/outdent.

* fix editing state not updated immediately

* fix editing status

* fix: avoid recursive copy

* fix: inserting blocks after an empty block

* Implement move-blocks with insert-blocks

* fix: block left

* Implement move-blocks-up-down with move-blocks

* fix: paste text

* Implement indent-outdent-blocks with move-blocks

* fix: indent/outdent

* feat: multiple blocks drag && drop

* fix: indent/outdent blocks

* fix: drag drop

* Port unit tests for outliner.core

* enhance: open collapsed parent when indenting blocks

* refactor: block selection

* fix: indent/outdent blocks with different levels

* Add instrument on invalid outliner structure

* fix: can't write a block if the page has any outdated blocks

* fix: editing status for empty page

* fix: multiple drag & drop

* fix: drag & drop disallows moving from parents to its child

* fix: public property

* fix: can't delete first empty block

* Remove unused code

* fix: e2e tests

A workaround is to not select/highlight the block when pressing esc if it has
fenced code.

* remove unused code

* Add batch transaction test

* fix: update :block/page when dragging targets' children to another page

* Add more tests

* Simplify extract

* Replace db/get-conn with db/get-db

* Simplify extracting blocks from ast

* Code cleanup

* Code cleanup

* Add outliner core fuzzy tests

* Remove unused code

* fix: cursor not jump to the upper block when pressing Enter in the beginning

* fix: Enter in the beginning of a non-empty block

* Fix lint warnings

* Add editor random e2e tests

* Fix typo

* enhance: move some fns and add some comments

* enhance(outliner): add page-block? util

* fix: increase td width to prevent content overflow

Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>

* First pass at file tests for file-sync

Each action usually passes by 5th try

* Fix two incorrect calls caught by tests

* More test improvements

- Easier auth setup
- subdirectory is configurable
- list graphs api also exercised

* Address cleanup from #3839

- Remove unused translation key
- Delete or TODO commented code
- Capitalize notifications to users

* fix quick capture template not working

* enhance(sync): add logout

* enhance: add logout i18n

* fix(plugin): sometimes plugin settings of gui not work when entry from app settings

* enable show-brackets? toggle for orgmode [[file:./pages/demo.org][demo]]

* fix(sync): fix unfinishable sync loop

* feature: logseq protocol; refactor persistGraph

* fix: deeplink support

* fix: broadcast persist graph on opening new graph with logseq protocol

* feat: logseq protocol open action for page-name and uuid

* fix: logseq protocol graph param validation

* ux: copy logseq URL of block

* enhance: remove the redundant 'open' from logseq protocol (v0.1)

* ux: page dropdown button for copy page URL

* chore: logseq protocol comments

* don't create new contents file when changing format

Logseq now creates a new contents file when users try to toggle the
preferred format, which causes file duplications error.

* fix pasting in src block not working on iOS

close https://github.com/logseq/logseq/issues/4914

* fix playing video goes into editing mode on iOS

* fix copy to clipboard failure on iOS

* add Podfile item

* fix mobile toolbar order not persisting after restart

* test(e2e): add test for backspace and cursor pos (#4896)

* test(e2e): add test for backspace and cursor pos
* fix(test): refine, fix wrong helper

* fix(ui): warn about illegal git commit interval

* enhance(editor): allow global git cmd shortcut

* style(settings): line-space of general/journals

* enhance(editor): accept enter in dummy block

Fix #4931

* fix editing state not updated immediately

* fix: can't write a block if the page has any outdated blocks

TODO: clean outdated blocks

* fix: editing status for empty page

* Random tree for outliner core tests

* Add pre assertions and fn docs based on Zhiyuan's suggestions

* Made some changes based on Gabriel's suggestions

* fix: tests

* fix: save current block before moving

* Updated the timeout to 100ms based on llcc's suggestion

https://github.com/logseq/logseq/pull/4880#discussion_r851966301

* api-insert-new-block! supports replace-empty-target?

* fix: replace all :reuse-last-block? usage

Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Yue Yang <g1enyy0ung@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: charlie <xyhp915@qq.com>
Co-authored-by: Junyi Du <junyidu.cn@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
2022-04-19 11:14:38 +08:00
Tienson Qin
544f0aed81 fix tests 2022-04-02 21:40:28 +08:00
Tienson Qin
90ef7036ba fix: order is lost when there are more than 8 property:: in a block
related to #3923
2022-03-08 17:12:48 +08:00
llcc
c32fba0ab1 fix: remove assets/draws from All Pages 2022-03-08 14:18:01 +08:00
llcc
f02c21c95b fix: link property causes wrong pages creation 2022-03-08 14:16:28 +08:00
Andelf
2e46a6bcb7 Revert "fix: List properties out of order when contain more than 8 elements"
This reverts commit 6a8ab41d39.
2022-03-07 21:38:50 +08:00
llcc
6a8ab41d39 fix: List properties out of order when contain more than 8 elements 2022-03-07 15:43:12 +08:00
Junyi Du
bee0018a29 fix: insert timestamps on creating page entity by default 2022-03-04 17:13:33 +08:00
Junyi Du
05f6249f28 enhance: add timestamps for pages created from references and timestamps 2022-03-04 17:13:33 +08:00
Tienson Qin
c678fa15e6 fix: can't parse graphs because of links regular expressions
close #4308
2022-02-24 16:35:26 +08:00
Tienson Qin
3ec138ebf2 chore: disable parse_outline_only? temporarily 2022-02-20 01:41:09 +08:00
Tienson Qin
e1064d21d3 fix: page/block refs not working
close #4289
2022-02-19 13:29:34 +08:00
Gabriel Horner
c6d03b67ab Merge branch 'master' into dev/var-sizes-linter 2022-02-08 12:02:39 -05:00
Tienson Qin
1870f44f9a fix lint warnings 2022-02-08 15:50:54 +08:00
Tienson Qin
faea913a40 enhance: cut memory usage 2022-02-08 15:49:09 +08:00
Gabriel Horner
e81678fc69 Mark most vars as cleanup-todo
Fixed a few that I knew how to QA and were low risk
2022-02-04 16:57:49 -05:00
Gabriel Horner
b3ee61b1ca Remove more unused fns 2022-01-27 14:11:59 -05:00
Tienson Qin
6aba8c3241 Improve long page editing performance (#3855)
* Remove expensive parsing when saving files

* Add limit to page blocks query

* Don't collapse block's body to make it compatible with other tools

* Alert if there're unsaved changes when switching graphs

* DB schema migration for :block/collapsed? from it's property

Co-authored-by: Andelf <andelf@gmail.com>
2022-01-18 10:37:31 +08:00
Tienson Qin
21f2237227 fix: lint errors 2022-01-16 13:06:54 +08:00
Tienson Qin
2401ce9e9a fix: property regression : # should be a delimiter
Close #3916

Tests added.
2022-01-16 12:39:41 +08:00
Tienson Qin
b26d4c3fc2 fix: page references in pre-block doesn't work 2022-01-13 22:46:41 +08:00
Gabriel Horner
7497d8b396 Lint a good chunk of src/main/frontend
Left some TODOs to discuss with others and others for me to finish
2022-01-11 17:34:54 -05:00
Junyi Du
7505b0dde6 fix: introduce more page-name sanity 2022-01-10 13:29:40 +08:00
Tienson Qin
704bcda9ad fix: Child namespace pages do not show up in hierarchy view if parent
page does not exist

Addresses #3641
2022-01-05 00:41:49 +08:00