Commit Graph

930 Commits

Author SHA1 Message Date
Tienson Qin
6642b46cc8 fix: page properties not cleared when cutting the first block 2022-08-22 18:39:53 +08:00
Peng Xiao
3a732aa4e2 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-22 17:55:46 +08:00
Andelf
c579053068 fix(editor): skip empty block when cycle todo 2022-08-22 09:17:57 +08:00
Peng Xiao
5d35e21e8b Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-18 11:57:48 +08:00
Tienson Qin
f502de3ad4 fix: e2e test 2022-08-18 08:18:58 +08:00
Tienson Qin
934fa7291a fix: autocomplete modal closes immediately if the cursor is after ]
close #6392
2022-08-18 06:38:23 +08:00
Peng Xiao
4d0478a515 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-16 11:47:26 +08:00
Tienson Qin
220a55b756 fix: collapsing multi-line block
close #6374
2022-08-16 11:21:59 +08:00
Peng Xiao
d4c0ae900b Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-15 22:31:08 +08:00
Tienson Qin
982e8e1b8a fix: lint warnings 2022-08-15 21:58:46 +08:00
Tienson Qin
ca7b86f082 perf: sub selected block 2022-08-15 21:58:46 +08:00
Tienson Qin
39e2f0ac1c fix: shift-select up 2022-08-15 21:58:46 +08:00
Tienson Qin
442b65d210 fix: can't delete selected blocks in queries 2022-08-15 21:58:46 +08:00
Tienson Qin
ca1c4ee479 fix: delay custom queries 2022-08-15 21:58:46 +08:00
Phoenix Eliot
3c6514ee4b Fix moving cursor outside brackets (#6283)
* Add data attribute to modals for testing

* Add several tests for moving cursor outside/within brackets

Update tests to be more reliable and DRYer

Rename action menu to autocomplete menu; fix test race condition

Rename 'action modal' to 'autocomplete menu'

* Check for being outside of brackets on every keyup

Remove dead code

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2022-08-15 18:47:26 +08:00
Phoenix Eliot
7cb1fc9c3c Add action whitelist and special handling for link/image input dialog 2022-08-15 17:45:39 +08:00
Phoenix Eliot
bc00dba369 Close action menu when pressing escape 2022-08-15 17:45:39 +08:00
Peng Xiao
1b42079949 fix: make-asset-url should support data url 2022-08-15 16:03:03 +08:00
Peng Xiao
a54614c866 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-12 14:09:06 +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
Peng Xiao
d2c3b88865 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-11 18:40:51 +08:00
Giuseppe D'Andrea
4b7ab91488 fix #6309 2022-08-11 16:58:05 +08:00
Tienson Qin
eeb827a1d3 fix: performance degrading for nested linked references
Fix #6316.

This commit also fixed the issue that toggle block children doesn't
work sometimes.
2022-08-11 16:38:00 +08:00
Peng Xiao
866b4793bd Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-08 11:20:21 +08:00
Giuseppe D'Andrea
192a30ae1b fix left-right navigation after selecting multiple blocks 2022-08-08 08:44:08 +08:00
Giuseppe D'Andrea
b129a703ec fix up-down navigation after selecting multiple blocks 2022-08-08 08:44:08 +08:00
Peng Xiao
712c49906c fix: editing issue 2022-08-05 14:16:19 +08:00
Peng Xiao
b30adea656 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-05 13:59:06 +08:00
Peng Xiao
5ce5a1bfc3 fix: remove debug code 2022-08-05 11:33:14 +08:00
Peng Xiao
5f6dad4526 quick add single block 2022-08-05 11:28:24 +08:00
Phoenix Eliot
7eef27c020 Add comments to editor keyup-handler cases 2022-08-04 13:38:17 -04: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
b66ec9cd9f Add tests to confirm property completion fix
Move current-line to specific clause for performance as fn is run on every keystroke
2022-08-04 13:43:10 +08:00
maxweilun1989
d12437722d fix: only show perperty search when current line is wrapped by . #6146 2022-08-04 13:43:10 +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
ab6eec5fc3 Merge remote-tracking branch 'upstream/master' into whiteboards 2022-08-03 14:12:10 +08:00
Phoenix Eliot
0747d5ccb7 Fix pasting race condition (#5964)
* Fix re-running e2e tests when it reuses old app instances

I'm not certain this doesn't break things for other OSes/setups, but it was required for e2e tests to run after the first time I ran them. It keeps a list of all previous (now missing) graphs in the sidebar, and this flow properly causes the new one to be selected, where the old flow did not match what the UI was doing anymore.

* Add e2e test for quickly pasting blocks after editing new blocks

* Fix pasting quickly after editing a new block

* Remove "test.only" focus

* Fix clicking add button in first test by closing error notification

* Improve some flaky race conditions in tests

* Remove unrelated waits in E2E tests

* Update playwright version; update tests to match

* Fix logic for checking if there are unsaved edits

* Fix typescript complaints

* Reduce how long we wait after closing each error popup
2022-08-02 10:54:09 -04:00
Peng Xiao
bb84e99a82 fix: auto resize for single block 2022-08-02 21:02:08 +08:00
Peng Xiao
aa22ab0e39 compact mode wip 2022-08-02 18:38:11 +08:00
Peng Xiao
72e8c16cfb fix: should enter newline in single block 2022-08-02 17:41:51 +08:00
Gabriel Horner
9fa3f0a172 translation and property cleanup
- Caught a missing translation
- QAed that the following fns should refer directly to hidden-properties
  and not the larger umbrella of built-in-properties
2022-07-28 15:46:18 -04:00
Gabriel Horner
6a64cdf4b3 Fix tag completion at start of line or whitespace before cursor 2022-07-26 20:47:36 +08:00
Gabriel Horner
5f8a4ed0bf Don't autocomplete tags within backtick Fix #6135
Also fix autocompleting while cursor is part of a word
2022-07-26 20:47:36 +08:00
Gabriel Horner
c8864e777d Fix page-properties not using :property-pages/* config 2022-07-21 13:59:16 -04:00
charlie
2b94a95f11 fix(api): return non transferable value for plugin api 2022-07-20 09:34:28 +08:00