Batch editor extension - #1632
Conversation
This allows extensions to use the SliceEditor in their template html. This requires changing the json object that the components provide to be the entire props object instead of just the data field.
|
I've been wanting to add some sort of batch editing functionality for a while :) I'd like for this to be a builtin feature. Do you need the slice editor for some other purpose? |
|
Yeah I knew batch editing had been talked about before, and it wasn't too hard to put this together as an extension, so I figured I'd try it out since the built in feature doesn't exist yet. |
|
Hi all, is there still interest in adding batch editing? I implemented a version, which gives an additional "Apply All" checkbox in the SliceEditor, to propagate a change being made to one transaction to all the transactions in the parent journal view. It uses the deepdiff library to generate a diff and applies it to a group of transactions, based on the filters applied to the ledger. Demo: Screen.Recording.2025-07-07.at.10.45.06.AM.mp4I thought I could clean up my branch and submit a PR if there is interest in merging this. EDIT: I have released this as an extension |
|
@paulsc any chance you'd be willing to publish the patch/branch with the "apply all" button from your demo video? You extension is nice, but a lot less practical than the version shown here, since one needs to change to another view to reapply a change to the rest of the list. No worries if this is a branch off of an old version of fava, I'd be happy to port it forward to keep it with the few other personal edits on my fork. Thanks in advance! |
Hi @BenjaminDebeerst, thanks for your interest! Unfortunately I don't seem to have that code anymore. It broke almost immediately due to changes upstream. I've tried the manual patch and fixing it when upstream changes come -strategy before, but it in the long run it was always too annoying and better to stick to the extension system with a fixed API. |
This exposes the SliceEditor svelte component through svelte-custom-elements, which allows extensions to use the SliceEditor by using
<svelte-component type="slice-editor"><script type="application/json">{{ <json props>|tojson }}</script></svelte-component>This also adds another built in extension, batch_edit, which uses the slice editor to provide an editor page where you can input (part of) a BQL query to limit to a set of entries, and get a slice editor for up to 20 of those entries one after the other, to allow you to view different sets of transactions/entries simultaneously while editing.