Skip to content

Tabular UI for naming linked files #12624

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

Open
wants to merge 67 commits into
base: main
Choose a base branch
from

Conversation

priyanshu16095
Copy link
Contributor

@priyanshu16095 priyanshu16095 commented Mar 5, 2025

Closes #11368

This PR adds a tabular construct similar to "Key patterns" for "Linked files name" in the Linked files tab in preferences.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [/] Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Screenshot (202)

@priyanshu16095 priyanshu16095 changed the title Tabular UI Tabular UI for naming linked files Mar 5, 2025
private final StringProperty pattern = new SimpleStringProperty("");

public LinkedFileNamesPanelItemModel(EntryType entryType, String pattern) {
Objects.requireNonNull(entryType);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of Objects.requireNonNull is discouraged. Instead, the @nonnull annotation from JSpecify should be used to ensure non-null values.


public LinkedFileNamesPanelItemModel(EntryType entryType, String pattern) {
Objects.requireNonNull(entryType);
Objects.requireNonNull(pattern);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of Objects.requireNonNull is discouraged. Instead, the @nonnull annotation from JSpecify should be used to ensure non-null values.

@jabref-machine
Copy link
Collaborator

JUnit tests are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

@priyanshu16095 priyanshu16095 marked this pull request as ready for review April 18, 2025 20:55

public class CitationKeyPatternTabViewModel implements PreferenceTabViewModel {

private static final String DEFAULT_ENTRY_TYPE = "default";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Literals in code should be private final or take a Java comment, except for constant declarations. This is a constant declaration, so it is acceptable.

@priyanshu16095
Copy link
Contributor Author

Recording.2025-04-19.mp4

Works fine, solved the problem of not storing values.
After resolving conflicts, I pulled the changes, after which the checks failed as this newly added task is giving some error.

image

Please review.

@jabref-machine
Copy link
Collaborator

Your pull request conflicts with the target branch.

Please merge upstream/main with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.

Copy link

trag-bot bot commented May 24, 2025

@trag-bot didn't find any issues in the code! ✅✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes-required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Citation key generator and Linked files
5 participants