-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Problems during group renaming/changing in some cases #8824
Comments
Edit: I now CAN JabRef 5.7--2022-05-16--6a2332f
|
Hm, interesting. Not sure whether that is what happened. I'll do some other tests, then. |
Just tried again and couldn't reproduce, either. I think, I experienced this problem already before. So it was not the first time, I ran into it. What do you mean with "the UI will depict weird stuff"? That did not happen to me. Possibly, I got an exception that I ignored. But I am not confident that it was an index out of bounds exception. I'll leave this open for a few more days in case I run into this again. At least, it seems clear that this behavior is not normal (so no need for improvement). |
See e.g. issues #8012 and #8527 for "weird stuff"
In general: As far as I understand it, if there is an out of bounds syntax error (which are somehow connected to the bi-directional binding), the UI will either depict an old state as compared to what you entered or it will depict a new state, but on disc there is still old data. So you can't trust what is shown on the UI. If you get one, restart JabRef, the best thing you can do. Of course, right now, we don't know if it was an index out of bounds issue. I was just speculating. |
From what you describe, that is not what happened to me. I saw this looking at the .bib file itself. So the old category was still in there. |
refs #8826 |
I assume you renamed groups by right clicking on a group and choosing "edit"? |
Yes, that is how I renamed the group. |
It also works the other way round: Do the same thing, except
|
@DohaRamadan, since you seem to be interested in UI / groups issues, and you already have gained some experience, I suppose this issue might be of interest. This is a very annyoing one, as it is the root cause of very unintuitive experiences. |
Thank you! i will check it out |
A very closely related, but different issue is #8836. Reading through this bug might help you to better understand how the groups feature works and it's current limitations. |
I found out that there is another issue, |
Also, I'm having trouble understanding the whole edit group logic, shouldn't entries be assigned to the new group and removed from the old group always? why is there a dialog to assign entries to the new group when it's by intuition should always be assigned to the new group, and the removePreviousAssignments variable is vague too? |
I don't think there is a specific issue for this apart from this issue here. |
If you ALWAYS remove it automatically from the group, you will also remove the entry from all other groups with this name. So if you have a group hierarchy like this: Bugs:
Birds:
and you delete the prio1 group from bugs, you will also delete the prio1 from birds, which is NOT what you would want. This could lead to unintentional dataloss and users will be confused too. We would fix one issue, but simply create another issue. So we have to think hard how to solve this. The easy way out is to come up with a preference or clickable option during the ui popup that allows users to decide. The more complicated, but maybe better solution, would be to change the whole groups architecture. |
(PS, I am not good at coding. Hoping for other maintainers to comment on the coding stuff) |
I understand the problem better now, the group identifier is its name and that's the main problem in my opinion, there are 2 solutions to this |
I want to work on this. |
@DohaRamadan This opens a very old box of the pandora, see #1495. I tend to agree that id-based serialization is a good idea, although it invalidates some of the advantages outlined at #629. With JabRef Online we will have the same issue to not be able to identify what group an entry actually belongs to. @JabRef/developers please discuss this in the jabcon/next devcall |
@DohaRamadan just so you know, the next regular devcall is in four days (Monday evening, every two weeks). |
Meta: We should write down a clean ADR (Folder: https://github.com/JabRef/jabref/tree/main/docs/decisions) +1: For IDs. ID stays same even if name changes. ID technology:
We have to ensure that we do not simply rewrite the library, but ask for it. - Thus, #10370 is a pre-condition of the solution of this issue. And that issue also has a pre-condition |
In jabrefonline, I use cuid's. |
Any pro/con list? I vote for CUID2, because if "Deterministic Length" in comparison to CUID1. With length 10, CUID2 is short enough for me (remember the storage in plain text and that BibTeX users will check the file) https://github.com/paralleldrive/cuid2#configuration |
Mostly because prisma doesn't yet support cuid2 by default (prisma/prisma#17102), but there are workarounds...so no hard requirement from my side. |
Nice to see some activity on this. Reading the discussion, I was thinking, whether some hybrid approach with both IDs and names might be interesting. For storage, that would then allow users to read the group names in the BibTeX file. Additionally, it might be helpful for copying between libraries. In such cases, the current approach of IDs would probably generate new groups. With a name attached, one could try to match groups with the same name and open a dialog where the user can manually select whether the pasted entry groups should be merged with existing ones (of the same name) or a new group should be created. |
For now, as it seems that the current implementation timeline for an ID-based system is pretty long (please correct me if this assumption is wrong): Might it be sensible to require unique group names for now as a quick solution that already fixes many problems? |
Yes, the timeline seems to be long, as for all problems here, nothing is really broken. I realized the other day, that our groups feature is actually a "keywords/tags/labels" feature, so we could theoretically rename groups to tags and then introduce a "real" groups feature. For all problems here, there is a (lenghty and uncomfortable) workaround by adjusting user workflows and giving groups unique names, so in my opinion, the priority is "I am looking forward to and it would be very nice to have a real groups feature, which I personally find kinda important, but urgency is medium/low, as workarounds exist". Also, this feature competes with other issues that are arguably even more important (e.g. CSL styles, finishing the new Search, fixing performance, JabRef online, Fixing Grobid, Fixing ISBN fetcher, etc.) |
I think, we had the discussion about groups being more like keywords/tags/labels already some time ago :) I'd argue that right now, there is quite something not working correctly (or as expected) for the group feature. It is not robust in any way. But yes, if there are no resources for this, that's fine. I just thought about not blocking @DohaRamadan or others from improving the feature with postponing the point where it can be really improved unnecessarily into the future. |
Is your suggestion for improvement related to a problem? Please describe.
When I rename a group, I am asked whether I want all old entries to that group. However, the old group name remains assigned to this group.
Describe the solution you'd like
I had expected that the old group gets removed from the entries, at least an option for that should be provided.
Additional context
The text was updated successfully, but these errors were encountered: