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 LaTeX citations tab to the entry editor #5137

Merged
merged 34 commits into from
Jul 29, 2019
Merged

Add LaTeX citations tab to the entry editor #5137

merged 34 commits into from
Jul 29, 2019

Conversation

davidemdot
Copy link
Member

@davidemdot davidemdot commented Jul 18, 2019

Here is an update for the LaTeX integration project. It adds a new tab to the entry editor (can be disabled in preferences), and also update EntryEditor.java to start using PreferencesService.

LaTeX references tab

TODO:


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@davidemdot davidemdot added the ui label Jul 19, 2019
@davidemdot davidemdot changed the title [WIP] Add LaTeX references tab to the entry editor [WIP] Add LaTeX citations tab to the entry editor Jul 25, 2019
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

good wise lgtm so far for me

@davidemdot davidemdot changed the base branch from master to latexintegration July 27, 2019 14:30
@davidemdot davidemdot added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jul 27, 2019
@tobiasdiez tobiasdiez changed the title [WIP] Add LaTeX citations tab to the entry editor Add LaTeX citations tab to the entry editor Jul 27, 2019
Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Nice work! The quality of the code is really improving from time to time!
I've a few comments, but nothing serious.

@tobiasdiez
Copy link
Member

I think the cleanest solution would be to introduce a CitationsDisplay control that completely encapsulates the display of a list of citations and would replace the ListView<CitationViewModel> citationListView. See for example here: https://docs.oracle.com/javafx/2/fxml_get_started/custom_control.htm#BABIDAHI (only don't use FXML and replace the textProperty by a ObservableList<Citations>).
The strategy would then be to replace the citationListView in the fxml by the CitationsDisplay control and only keep the first line in (the other lines should go to the CitationsDisplay class):

citationListView.setItems(viewModel.getCitationListByReference());
new ViewModelListCellFactory<CitationViewModel>()
.withGraphic(citation -> citation.getDisplayGraphic(basePath, Optional.of(citationListView.getWidth() - 50)))
.install(citationListView);

But the current solution is also ok (although the separation between UI-Controls and UI-Logic is not that clear).

@davidemdot
Copy link
Member Author

I think the cleanest solution would be to introduce a CitationsDisplay control that completely encapsulates the display of a list of citations and would replace the ListView<CitationViewModel> citationListView.

At first, I started doing it in that way, but it did not work properly. Because the current version has been more tested and looks stable, I thought it would be a good idea to merge this feature as soon as possible for starting to get feedback from users, and then change this point (and others) with an early patch.

@davidemdot davidemdot merged commit 7a49dd2 into JabRef:latexintegration Jul 29, 2019
@davidemdot davidemdot deleted the latexintegration-entryeditortab branch August 2, 2019 21:50
Siedlerchr added a commit that referenced this pull request Aug 9, 2019
…rter

# By David Méndez (47) and others
# Via GitHub (5) and David Méndez (3)
* upstream/master: (57 commits)
  fix wrong package (#5181)
  Remove logging message for non-existing nested files
  Bump applicationinsights-core from 2.4.0 to 2.4.1 (#5171)
  Bump archunit-junit5-engine from 0.10.2 to 0.11.0 (#5157)
  Bump applicationinsights-logging-log4j2 from 2.4.0 to 2.4.1 (#5172)
  Bump tika-core from 1.21 to 1.22 (#5166)
  Fix fail on testPerformExportForSingleEntry from DocBook5ExporterTest (#5168)
  Add a check for nested files and improve the code to skip lines (DefaultTexParser)
  Add latest changes to latexintegration (#5170)
  LaTeX integration latest changes (#5167)
  Move to extended enums for fields and entry types (#5148)
  Bump archunit-junit5-api from 0.10.2 to 0.11.0 (#5158)
  Revert temporal change
  Fix all issues from reviews of #5137
  Bump com.simonharrer.modernizer from 1.6.0-1 to 1.8.0-1 (#5154)
  Bump checkstyle from 8.22 to 8.23 (#5153)
  Add a new JabRefIcons.LATEX_CITATIONS
  Change toString() methods
  Update DefaultTexParser for explaining when and why it skips the citation matching
  Update TexParserResult for avoiding 'orElse(null)'
  ...

# Conflicts:
#	src/main/java/org/jabref/logic/importer/fileformat/PdfContentImporter.java
#	src/test/java/org/jabref/logic/importer/fileformat/PdfContentImporterTest.java
github-actions bot pushed a commit that referenced this pull request Dec 1, 2020
a20406d Added name of the editors of a given edition (#5140)
9881fc5 Ping on push, not PR, document role of dist-updater (#5137)
04668cc Create nouvelles-perspectives-en-sciences-sociales.csl (#5063)
1d94e21 Update bursa-uludag-universitesi-saglik-bilimleri-enstitusu.csl (#5047)
84f3893 Add Harvard style for Metropolia University of Applied Sciences (#5086)
8e43e79 Create opto-electronic-advances.csl (#5135)
36e4fba Update society-for-american-archaeology.csl (#5124)
69ca360 St. Paul Canon Law new style (#5138)
b490ab0 Update and rename st-paul-university-faculty-of-canon-law.csl to saint-paul-university-faculty-of-canon-law.csl
b498116 There is no en-CA locale
3c35f28 Metadata
7059cca Create tu-dortmund-agvm.csl (#5088)
c321c98 Create new Citation type (#5093)
a7edc8d Update international-organization.csl (#5103)
3d1a052 The AWS load balancer is messing things up (#5133)
ca3839b Fix sort by a single macro (#5136)
5d1a7e8 Update chungara-revista-de-antropologia-chilena.csl (#5123)
cd75d5d ping distribution-updater (#5132)
dcf473a Update wirtschaftsuniversitat-wien-health-care-management.csl (#5125)
a87085e Fix Harvard Praxisforschung Editors (#5130)
d4176ca Switch automated tests to Github Actions (#5111)
726d0d8 Radiology, MPP, CORR -- small fixes: https://forums.zotero.org/discussion/85883/doi-radiology#latest https://forums.zotero.org/discussion/51058/style-request-molecular-plant-pathology#latest https://forums.zotero.org/discussion/85678/citing-style-clinical-orthopaedics-and-related-research#latest
e23db68 Update to la-trobe-university-harvard style (#5119)
c54b278 Create wirtschaftsuniversitat-wien-health-care-management.csl (#5110)
62fb019 Create austral-entomology.csl (#5118)
afa328c Update iso690-author-date-en.csl (#5113)
5468dce Update iso690-author-date-fr-no-abstract.csl (#5112)
98af86c Update iso690-numeric-fr.csl (#5115)
09f84c4 Update iso690-author-date-fr.csl (#5114)
178a9e4 Fix current biology to superscript
1fa5ce7 Create droit-belge-centre-de-droit-prive-ulb.csl (#5107)
3a6a4bc Fix file modes (#5106)
48f50e5 Create chungara-revista-de-antropologia-chilena.csl (#5096)
1e848f8 Create the-journal-of-the-indian-law-institute.csl (#5100)
856524c Create molecular-biology.csl (#5101)
eeebbf4 Create harvard-harper-adams-university.csl (#5104)
d90993d Fix tests
d4037bf WIP: St Paul Canon Law style

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: a20406d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entry-editor project: GSoC status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants