fava icon indicating copy to clipboard operation
fava copied to clipboard

Batch editor extension

Open tschicke opened this issue 2 years ago • 3 comments

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.

tschicke avatar Jul 01 '23 23:07 tschicke

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?

yagebu avatar Jul 08 '23 18:07 yagebu

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. No, I don't specifically need the slice editor for anything else. svelte-component seemed like a nice way to expose some higher level UI functionality that fava implements to extensions, since they can't directly use svelte, but it seemed pretty specific to ChartSwitcher since it requires the component to have only a data prop. So I figured I'd start with exposing the slice editor since I had the idea for the batch editor that could use it. If you want to hold off on the batch editor extension for the built in feature (or I guess even if you want to merge it but replace it later with a built in feature), are there any details/discussion anywhere about what the builtin editor would look like and how it would work? If I get some time and have some idea of what it should look like, I may try to attempt that.

tschicke avatar Jul 09 '23 17:07 tschicke