'Archive block' functionality
Hey, this plugin rocks; thanks!
To add on top of it, it would not be that difficult to make an 'Archive block' plugin from this plugin.
I've found all 'Comments' and 'comment' strings in the logseq.js and index.js files of the 'assets' folder and replaced them with 'Archive' and 'archive' so I can run locally this modified version of the plugin, which is basically a 1:1 copy, but some labels are different.
However, just one feature of this 'Archive block' plugin should be different from the original version. Since there's no need to write a comment after archiving a block, the archiving plugin should not create a new blank block, as the 'Comment block' plugin does.
It'd be great if you could post this modified version of the plugin here, which does not create a new blank block, ideally as index.js and logseq.js files, so users interested in this feature could use it without downloading it from the marketplace.
Or, even better, if you like this idea and have time for that, you could create and upload this 'Archive comment' plugin to the marketplace :-)
Thanks!
Ohhh, I forgot to mention in the comment above that opening the right sidebar would also be unnecessary for the 'Archive comment.'
Eventually, in the index.js file, I managed to find this 'if' condition
if (blockRefBlock?.uuid) { await logseq.Editor.openInRightSidebar(blockRefBlock?.uuid);,
which triggers the opening of the right sidebar and creates an empty block. Changing it to 'if not' bypassed both opening the sidebar and creating a new block, so this cheap hack solved both of the issues described in the opening post.
For anyone interested in this modification, the resulting index.js file is attached below as a raw text file.
Attached file: index.txt