Skip to content
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

Batch editor extension #1632

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tschicke
Copy link
Contributor

@tschicke tschicke commented Jul 1, 2023

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.

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.
@yagebu
Copy link
Member

yagebu commented Jul 8, 2023

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?

@tschicke
Copy link
Contributor Author

tschicke commented Jul 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants