-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Preferences: Add manual prompt control for cross-references in Copy To #12526
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
Preferences: Add manual prompt control for cross-references in Copy To #12526
Conversation
…s-references when using Copy To
…s-references when using Copy To
…nto confirm-crossreff-copy-option
…s-references when using Copy To
…nto confirm-crossreff-copy-option
…s-references when using Copy To
…nto confirm-crossreff-copy-option
False alarm? @koppor |
|
Instead of the prompt, I think the issue asks for a preference whether to "Include cross-referenced entries when using the 'Copy To' option". I think a prompt every time we copy an entry/ are copying multiple entries is useless if we have such a preference in the first place. |
| inspectionWarningDuplicateProperty.setValue(workspacePreferences.shouldWarnAboutDuplicatesInInspection()); | ||
|
|
||
| confirmDeleteProperty.setValue(workspacePreferences.shouldConfirmDelete()); | ||
| shouldAskForIncludingCrossReferencesProperty.setValue(preferences.getCopyToPreferences().getShouldAskForIncludingCrossReferences()); |
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.
(Unrelated to PR)
@calixtus shouldn't this preference have gone to WorkspacePreferences instead of the root preference class?
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.
Always depends on how complex it is. If possible, maintain flat hierarchies. If necessary, introduce a new preference class. Otherwise you wont find anything anymore and it gets harder for newcomers to read the code.
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.
@subhramit, after the updates, should I move this to Workspace Preferences or not?
What does this mean? Does it close the issue or just contribute to a part of it? (We as maintainers should not be forced to read the issue itself - we should invest our time in providing feedback to the code or keep the development setup running) |
Should be fixed. |
Sorry, I should have been more specific. The issue brings up that once you ask not to be given the prompt again, there's no way to undo that. This fixes that problem, even though it doesn't implement the feature requested in the issue. This is why I said "related to" rather than "closes". I plan to make another pull request that closes the issue. |
I can envision a scenario where a user is doing multiple copies and wants to include cross-refs for some but not others. In this case the user might have to open up the preferences many times to switch back and forth if there's no prompt. Also, if the prompt is easy to disable then it won't be an annoyance to users who don't need it. |
You have a point. |
|
@benlevycmp @subhramit In that scenario, user can select the entries which they want to copy and can choose whether they want to include cross-referenced entries or not, next time the same process, the dialog box will appear always until he chooses to not to show the dialog box. This is what I mean. Recording.2025-02-19.mp4Have I understood the scenario correctly? |
Yep, this works. |
|
@benlevycmp do you have any questions, after the discussion above? @priyanshu16095 maybe you can guide him and help him complete the PR? I think the problem is clear now more or less. If possible, (in case I forget) - once this is merged, try to migrate "copy to" to a workspace preference. Tag this comment in the description, a separate issue isn't needed since it's a minor code quality fix. |
|
I have tried this, it works fine and solves the issue. |
|
Is there anything else I need to do? |
subhramit
left a comment
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.
Just one comment
CHANGELOG.md
Outdated
| - The LibreOffice integration for CSL styles is now more performant. [#12472](https://github.com/JabRef/jabref/pull/12472) | ||
| - The "automatically sync bibliography when citing" feature of the LibreOffice integration is now disabled by default (can be enabled in settings). [#12472](https://github.com/JabRef/jabref/pull/12472) | ||
| - For the Citation key generator patterns, we reverted how `[authorsAlpha]` would behave to the original pattern and renamed the LNI-based pattern introduced in V6.0-alpha to `[authorsAlphaLNI]`. [#12499](https://github.com/JabRef/jabref/pull/12499) | ||
| - Added option to "General->User Interface" to enable/disable the prompt for including cross-references when using "Copy To". |
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.
Remove changelog entry. "Copy to" is a feature introduced in an unreleased version. Also uncheck the mandatory check.
[Note that even if we were to keep it, we would have had to refine it using more context - "in preferences" etc.]
…nto confirm-crossreff-copy-option
|
@benlevycmp almost there, can you resolve the conflicts? |
|
@subhramit done, thank you for your help. |
This adds an option to "General->User Interface" to manually enable/disable the prompt that asks the user if they would like to include cross-references when using "Copy to".
This is primarily to allow users to re-enable the prompts if they have disabled them from within the prompt.
Closes #12501
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)