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

enhancement: Preventing overwriting of existing cards from import (in-built merge calling) #117

Open
newageoflight opened this issue Jan 13, 2021 · 5 comments

Comments

@newageoflight
Copy link

newageoflight commented Jan 13, 2021

An enhancement I'd like to see in CrowdAnki is the ability to prevent the importer from overwriting existing cards on import.

When collaborating with others I find that I will often edit cards for people as new changes are being pushed, and importing the newest commits (which don't have my changes in them) will destroy all the edits I've made. In the absence of merging, a simple fix for this would just be to have the ability to suppress overwriting of existing cards. This may not necessarily be the standard behaviour of other imports but I think it's very useful to have in a collaborative context.

I'm aware this can be (sort of) already be solved using git diff. And if my impression is correct I think you guys are already working on merging stuff; I think that having a merge dialogue pop up in Anki (similar to how Unison will call your preferred merge program) would be much more convenient (and would likely present a far lower entry barrier for the non-tech people using this add-on!).

@newageoflight newageoflight changed the title Preventing overwriting of existing cards from import (in-built merge calling) :enhancement: enhancement: Preventing overwriting of existing cards from import (in-built merge calling) Jan 13, 2021
@ohare93
Copy link
Contributor

ohare93 commented Jan 13, 2021

Agreed, this would be a useful toggle in the Import menu. Though you should be able to do this, in part, with Personal Fields 👍 if you only made changes on some specific fields then you can toggle that as "Personal" and keep your own values while importing the rest. I get it would be good to do on a card by card basis (perhaps by tag?), but that's the best CA can currently do.

Good idea 🚀

@newageoflight
Copy link
Author

newageoflight commented Jan 13, 2021

By tag or by deck preferably - I'd rather not have to specify it by type as CA is currently offering. The way my team's workflow works at the moment is basically that I can accept changes in some (sub)decks but not in others.

Though this might just come down to me being insufficiently informed about the addon's usage as well, so just for the record: if I mark all the fields for a specific card type as "Personal Fields", will it essentially skip over all the cards in the JSON that already exist in my collection, thereby only adding the new ones?

@ohare93
Copy link
Contributor

ohare93 commented Jan 13, 2021

Though this might just come down to me being insufficiently informed about the addon's usage as well, so just for the record: if I mark all the fields for a specific card type as "Personal Fields", will it essentially skip over all the cards in the JSON that already exist in my collection, thereby only adding the new ones?

Yes! 👍 There are 3 states for personal fields:

New cards: Always added
Existing card with filled in existing field: never added
Existing card with blank field: Added

By tag or by deck preferably - I'd rather not have to specify it by type as CA is currently offering. The way my team's workflow works at the moment is basically that I can accept changes in some (sub)decks but not in others.

Personal tag/deck would be quite easy to implement, I believe 👍 Will add it to the backlog 😁

@newageoflight
Copy link
Author

Thanks heaps for that! And just to be sure, outside of using git diff or other similar external merging tools, am I right to guess that CrowdAnki doesn't curently have any existing merge capabilities (like the stuff I am proposing) in-built somewhere that I'm missing? i.e. for the existing card with filled in existing field case, I might want to merge changes from another contributor while I am still working on the deck without having to export to a new commit.

@ohare93
Copy link
Contributor

ohare93 commented Jan 14, 2021

You are correct, no such functionality currently exists. Though it would be sweet!

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

No branches or pull requests

2 participants