Replies: 1 comment 3 replies
-
The PR is more of a quick fix. Now I noticed some more problems with the block search + autocomplete. For example, undo is impossible after autocompletion, I cannot query for blocks that contain another reference (since the block query panel is replaced with the query panel for the inner reference) and pressing Does anyone have an idea how the current implementation may be improved? I'm thinking about showing the query panel whenever the parser says that the cursor is surrounded by We might also let the user re-open the query panel by pressing |
Beta Was this translation helpful? Give feedback.
-
Problem
Select some text, type
((
. This opens the block search panel. Select a block. One would expect that this results in a block reference to the selected block. However, in BETA-80, nothing happens (except that some characters are unselected), while in BETA-82, instead of a block reference, we get just((
.As an aside (which should probably get a separate bug report), after selecting text and then typing
((
, sometimes no item is selected at all, so that pressing ENTER leads to an error message that the selected index is stillnil
. It seems to be reproducible in the following way: Create a new block and then do the above as the first thing you do. I suspect that there is some problem with the local state of the block. After re-opening the page, this state is flushed and the bug occurs at pre-existing nodes again.I believe the former bug to be a bit more severe.
Demo
Here is a recording demonstrating the two bugs (first the former, then the latter) in the github.io instance.
https://www.loom.com/share/97e1ab3b9d8c40348b5ae1b661a0aa84
Athens version and environment
Tested mainly in the browser (BETA-80 and BETA-82), but this also occured to me in my native BETA-80 running on Linux.
A side remark
My main use case for "write text, select text, type
((
" stems from the performance problems with the block search (see #756). I noticed that searching lots of blocks is only slow when the resulting list of blocks is very long. However, when I write a very specific search query and then surround it with((
, the search is very fast, even in older versions of Athens. This puzzles me a bit, since the #756 performance problems seem to be fixed by optimizing the search queries. I'm puzzled why the very specific search queries have been blazing fast even before this fix.Fix
I have a fix for the first bug, which also contains some refactoring of
auto-complete-inline
. Since this isn't an issue yet, I did not create a PR.Beta Was this translation helpful? Give feedback.
All reactions