New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix(editor): Fix blocks losing references and disappearing from references panel #9389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks removing a "false optimization"?
LGTM
@cnrpman More like a false fix. refs-changed? was a binding that was always evaluating to true. In #9254, we tried to fix it. In fixing it we introduced the current bug. This PR removes the binding since it seems the current block was dependent on it always being true |
@tiensonqin I found the reason we end up needing to always transact :block/path-refs is because |
@logseq-cldwalker Yes, we can remove |
outliner-core/save-block and save-block-inner! were retracting block/path-refs aggressively, especially for cases when no path-refs had changed
a658aa5
to
7378b32
Compare
Also introduce helper fn for common db fixture setup
11c8896
to
15fc77a
Compare
@tiensonqin this is ready for another look |
@@ -213,3 +218,24 @@ | |||
"No page search within backticks")) | |||
;; Reset state | |||
(state/set-editor-action! nil)) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QAed and works as described!
This PR fixes #9365 which was introduced in #9254.
This brings back the previous behavior where the current block always has it's :block/path-refs transacted as noticed in #9254 (comment) . It seems this is needed.This PR fixes this by no longer having :block/path-refs as a retracted attribute. To QA, you can reproduce with the first minute of the video in #9365. You can also QA with:foo #bar
show block data
command on the block and note its :block/path-refsfooz #bar
show block data
command on the block and its :block/path-refs should not changeI'll see if I can do a test for this on Monday