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: undo block deletion needs multiple steps #8833
Conversation
116f78c
to
ea98097
Compare
:end? true}}) | ||
new-content (str value "" (:block/content next-block)) | ||
repo (state/get-current-repo)] | ||
(outliner-tx/transact! transact-opts |
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.
We can group multiple operations in the same db transaction with outliner-tx/transact!
.
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.
transact!
could be nested too.
@@ -18,7 +18,7 @@ | |||
(move-blocks! ...) | |||
(delete-blocks! ...))" | |||
[opts & body] | |||
(assert (map? opts)) | |||
(assert (or (map? opts) (symbol? opts)) (str "opts is not a map or symbol, type: " (type opts) )) |
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.
better to have a schema for opts? and validate using :malli/schema? (not sure :malli/schema is supported on defmacro)
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.
Updated b9a0f40
31c1e3a
to
5fe0107
Compare
5fe0107
to
97a501a
Compare
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.
Works great! Both in MacOS and Windows.
384ccaf
to
05ea6f5
Compare
… component" This reverts commit 9b6b5a6.
05ea6f5
to
e41e81c
Compare
Before:
https://www.loom.com/share/5e0df1e8ca83436ab7b34a22ba25ab8b
After:
https://www.loom.com/share/d443a5528d584fd8b18951ea76a1bae9