-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improvement ideas regarding handling of subtags when their parent tag is deleted #352
Comments
This comes from using removeItem in "catma/src/main/java/de/catma/ui/module/tags/TagsView.java". In the vaadin code, it says the function "Remove a given item from this structure. Additionally, this will recursively remove any descendants of the item." (see: https://github.com/vaadin/framework/blob/master/server/src/main/java/com/vaadin/data/TreeData.java#L291). My java is too rusty to submit a merge request, but you have functions like getChildren, getParent and setParent in that vaadin class, it doesn't seem that much of a stretch to write a small loop using them to save the children. |
Hi @GuillaumeFromage, thank you for you improvement ideas regarding handling of subtags when their parent tag is deleted. Moving the subtags up a level is an interesting thought. The changes would be a bit more involved than simply editing the UI (Vaadin) code however, as the hierarchical structure is also present in our backend data model. P.S.: If you lost data as a result of the deletion (annotations using the subtags) and would like us to restore it, please send a quick message to [email protected] |
Hi @maltem-za, Thanks. My data is fine, I was just testing. If I make a pull request for it, would you be interested in including it? I would most likely do that one and one that also to move subtags from one tag to another, by setting the parent. A lot of the coding methodologies for social sciences rely on such recategorization, and its highly problematic that you'd need to recode all of the subtags. My java is rusty AF but I'm sure I can make something work. |
Generally speaking we would welcome community contributions :) There is also a workaround that can be used to "move" a tag, if you can live with deleting the associated existing annotations and re-creating them in a semi-automatic way. Whether this is a viable approach will also depend on whether and to what extent properties are being used. |
I'd be curious to hear the workaround just so it can give me hints on how to implement it in code. |
If you're serious about implementing your "re-parenting" idea then we should have a chat, as there are quite a few things to consider and it will undoubtedly be a deep rabbit hole (consider yourself as having been warned ;) ). It seems simple enough on the surface, but once you add the multi-user and synchronisation (merging) aspects it quickly becomes complicated. I don't mean to discourage you, but I suspect you haven't yet grasped the magnitude of the undertaking (also because I've understated it until now). In terms of the workaround, this is purely using the GUI and existing functionality. I wouldn't use it as a reference for a "proper" solution (which would look quite different in my mind), but I mentioned it because it might be good enough in some instances. So as not to derail the conversation here too much, please send a quick mail to [email protected] and I'll gladly send you the details. |
I'm serious about it. Do you mean a talk like video call? Or you'd write a list of considerations? My way of offloading some of that work onto me would be to dig into the code a bit, to try to figure out what you mean. Is there a general diagram of how the architecture of the application is done? Or could you give me pointers on how the tagset are passed from one user to the next and how the data is stored? I'll try to dig tomorrow (I'm based in so-called Quebec) and come up with some general strategy and I'm totally cool with following your pointers on how you like things. |
Yes exactly, I meant a video call. I've sent you a mail. |
Got the email, will answer soon! |
Describe the bug
When you delete a tag that has subtags, the subtags are deleted also without warning.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I can think of two more acceptable behavior: a) you replace the the parent for all subtags, so they end up in their parent tag (or just in the tagset), b) offer a warning that says "all subtags will be deleted".
Information about your environment
The text was updated successfully, but these errors were encountered: