Skip to content
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

Add library selection to "Aux file import" #10472

Closed
koppor opened this issue Oct 9, 2023 · 9 comments · Fixed by #10525
Closed

Add library selection to "Aux file import" #10472

koppor opened this issue Oct 9, 2023 · 9 comments · Fixed by #10525
Assignees
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. ui

Comments

@koppor
Copy link
Member

koppor commented Oct 9, 2023

At "Tools" > "New sub library based on AUX file", JabRef generates a new .bib file based on the cited entries

image

The dialog shows then following

image

Currently, JabRef uses the currently opened library. This may lead to confusion.

We need a library selector (similar to the import dialog)

image

Hints:

For the import dialog, the implementation was done at #9402

@koppor koppor added ui good first issue An issue intended for project-newcomers. Varies in difficulty. labels Oct 9, 2023
@github-project-automation github-project-automation bot moved this to Free to take in Good First Issues Oct 9, 2023
@caitlinlilley
Copy link
Contributor

Hi, I would like to work on this issue as a part of my university assignment. Could I please be assigned to it?

@ThiloteE ThiloteE moved this from Free to take to Reserved in Candidates for University Projects Oct 10, 2023
@ThiloteE ThiloteE moved this from Free to take to Reserved in Good First Issues Oct 10, 2023
@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Oct 10, 2023
@github-actions
Copy link
Contributor

As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.

Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.

@OMEN-Watson
Copy link

Hi, may i give it a try as well ? although it has been assigned to someone, I also would like to solve this issue as a part of my uni assignment.

@caitlinlilley
Copy link
Contributor

Hi, I am still working on this.

@ThiloteE
Copy link
Member

ThiloteE commented Oct 13, 2023

@OMEN-Watson Students are special. We usually only assign one group or one student to an issue. This is, because we at JabRef don't know the grading scheme and the course requirements of students involved. In particular, we don't know if group work is permitted. We also try to minimize conflict and aim to have good organisational workflows for all parties involved. We have had conflicts because of this in the past. Both publishing similar or different fixes at the same time or at different times for the same issue creates all sorts of trouble for the person that has to give you your grade. It is hard to differentiate between "cheating" and "fixing an issue in a mostly similar way by copying and pasting large parts of the solution from other students working on the same issue". Also, keep in mind that if there are two pull-requests, only one of them will be merged.

For all these reasons, I would kindly ask you to choose another issue.

If no students were involved, we would be happy to have cooperation and groupwork, but students are special!

@ThiloteE
Copy link
Member

ThiloteE commented Oct 13, 2023

You can find other good first issues at our projects page: https://github.com/orgs/JabRef/projects/5
(Koppor issues count too)

@OMEN-Watson
Copy link

ok,easy~ i will not submit any PR,just try to fix it locally

@caitlinlilley
Copy link
Contributor

Hi, I have added the visuals for the library selector but I am stuck on how to implement the logic to actually select and use a particular library. Could I please have some guidance?

@Siedlerchr
Copy link
Member

@caitlinlilley check out the implementation in the ImportEntriesDialog:

libraryListView.setEditable(false);
libraryListView.getItems().addAll(stateManager.getOpenDatabases());
new ViewModelListCellFactory<BibDatabaseContext>()
.withText(database -> {
Optional<String> dbOpt = Optional.empty();
if (database.getDatabasePath().isPresent()) {
dbOpt = FileUtil.getUniquePathFragment(stateManager.collectAllDatabasePaths(), database.getDatabasePath().get());
}
if (database.getLocation() == DatabaseLocation.SHARED) {
return database.getDBMSSynchronizer().getDBName() + " [" + Localization.lang("shared") + "]";
}
if (dbOpt.isEmpty()) {
return Localization.lang("untitled");
}
return dbOpt.get();
})
.install(libraryListView);
viewModel.selectedDbProperty().bind(libraryListView.getSelectionModel().selectedItemProperty());
stateManager.getActiveDatabase().ifPresent(database1 -> libraryListView.getSelectionModel().select(database1));

caitlinlilley added a commit to caitlinlilley/jabref that referenced this issue Oct 19, 2023
@ThiloteE ThiloteE moved this from Reserved to In Progress in Candidates for University Projects Oct 19, 2023
@ThiloteE ThiloteE moved this from Reserved to In Progress in Good First Issues Oct 19, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Good First Issues Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants