-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Added warning label that allows user to jump to already existing entry #13390
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
base: main
Are you sure you want to change the base?
Added warning label that allows user to jump to already existing entry #13390
Conversation
Oh binaries for different platforms are re-checked with every commit ? I'll try to make fewer commits. |
Hey @jayvardhanghildiyal , thank you for your PR and interest in JabRef. |
O sorry, i just noticed, that message "you must provide" was not your change, that was already before.... but anyways, maybe you still want to take a look into it on the fly? |
jabgui/src/main/java/org/jabref/gui/newentry/NewEntryViewModel.java
Outdated
Show resolved
Hide resolved
@calixtus I've looked into it and would like to explain what I think is happening. I'll post some code below mostly for my reference and understanding . Do correct me if I've missed the point of the request ! My Understanding of the validation logicSo this validator below helps control the visibility of FXML components.
Validators like this can affect labels in the FXML file and the button in the new entry dialog window.
Requested ChangeI have to:
|
I think I've done it, but there is an error that says:
It comes from the CSLStyleLoader.java. I don't remember changing anything related to it. I'll try to see what it is about. |
Ignore the error, this might because you did not initialize the submodules. But it should run anyways |
On the command line, execute Merge latest As Carl said: it can be ignored for this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, something went wrong during merge of main - and the architecture needs to be fixed 😅
…eateEntry function
jabgui/src/main/java/org/jabref/gui/newentry/NewEntryViewModel.java
Outdated
Show resolved
Hide resolved
…now be functional
…ildiyal/jabref into fix-for-issue-13261
Hi, We discussed this in our devcall:
In the badge, show the text "Entry already exists in library XXXX" (can we show the library name?) Use localization https://devdocs.jabref.org/code-howtos/localization.html#localization-in-fxml |
A helpful page about validation in ui: Wa had a discussion about that in the devcall: However in general, we think that the tooltips on the validation badges are not the best ui design. We go with it for now, as this is the current ui design approach in other places and we should think in the future to do this differently. Eventually when the entry editor will be rewritten (TM 😬) But for now, move forward as @Siedlerchr suggested. Mind that in rtl languages the "Jump to entry" should appear on the left of the textinput control. |
Hi @Siedlerchr ! I will keep looking at the tests.
Yes, that is doable ! In the commit before the latest one, I used the To highlight the entry present in the current library I am using the I'll try my best ! |
A new map with all BibEntry(ies)? This is a bad idea. Think of a library with 10.000 entries. Not uncommon. |
…lso added a new key in jabref_en.properties
jabgui/src/main/java/org/jabref/gui/newentry/NewEntryViewModel.java
Outdated
Show resolved
Hide resolved
Hey there ! I've implemented some of the requested changes. I will continue working on the rest. Had some issues with the IDE so took more time than needed to. Some old logic not in use anymore is commented out, I'll remove it later ! Keeping it for my own reference for now. For now, when a duplicate entry is detected, the triangle shows up next to the textfield. But the text doesn't. When I hover over the textfield at an unknown angle, the orange tooltip appears just for a second and disappears. Gotta figure that one out. Probably something to do with the existing tooltip trying to take precendence (I don't know I'll have to check xD) ? So, a few questions I wanted to ask:
|
warning is perfectly fine. |
jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml
Outdated
Show resolved
Hide resolved
Looks good so far, just remove the commented out code and i think it's ready |
jabgui/src/main/java/org/jabref/gui/newentry/NewEntryViewModel.java
Outdated
Show resolved
Hide resolved
Hey @Siedlerchr ! I wanted to talk about the Since I do not have access to other LibraryTabs (reason discussed before), let me know which implementation would be better:
I think utility-wise, option 1 is better because the implementation will alert the user over all the entries. And if they want to add a new entry to a library, they will know that the same one exists somewhere else too. Not being able to jump to it sucks, but at least the user will be aware. I will now send out a commit that implements option 1, which I personally think will give out more consistent and useful warnings. Do let me know ! In the meantime, I'll remove the commented code and add the suggested changes ! |
…commented code and unused variables.
jabgui/src/main/java/org/jabref/gui/newentry/NewEntryViewModel.java
Outdated
Show resolved
Hide resolved
Oh that's odd. The last time I hovered over the symbol, appeared every single time. I'll look into it once again. |
@trag-bot didn't find any issues in the code! ✅✨ |
Hi again ! I've added the suggestions ! Working with the Tooltip Also, the |
Closes #13261
This pull request adds a
checkDOI
function, listener logic and somefxml
toNewEntryView.java
andNewEntry.fxml
. This addition aims to add a UI component that warns the user when trying to add an already existing entry to a library, while also allowing them to jump to it instead.Steps to test
demonstration.mp4
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)