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

Fix Preferences style value too long #6372

Merged
merged 13 commits into from
Apr 29, 2020

Conversation

leitianjian
Copy link
Contributor

@leitianjian leitianjian commented Apr 28, 2020

Fixes #6198

Here are some explanations

origin of the bug
The listener add on chosenSelectionModelProperty

chosenListView.selectionModelProperty().getValue().selectedItemProperty().addListener((observable, oldValue, newValue) -> viewModel.setPreviewLayout(newValue));

When we want to remove some cell from the chosenListProperty, before the remove operation is done. The selectionModel modified listener was fired (remove modified selectionModel too). Then the sourceTextProperty in PreviewTabViewModel.java was modified, which will fire the listener add on sourceTextProperty

sourceTextProperty.addListener((observable, oldValue, newValue) -> {
if (getCurrentLayout() instanceof TextBasedPreviewLayout) {
((TextBasedPreviewLayout) getCurrentLayout()).setText(sourceTextProperty.getValue().replace("\n", "__NEWLINE__"));
}
});

The lambda above will modify the choseListProperty first elements.

So, my solution is clear the selection before we remove some elements
The drag cases are a little bit difficult.
I add a field named dragSourceSelectionModel which is similar to dragSourceList
After these modifications, I think the bug was solved.

I don't know why the merged changes appear again, maybe someone has rollbacked the master branch? I checked the code in the master, which seems the fixes of the issues #6169 have been dropped?

Thanks for any instruction in advanced.

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

leitianjian and others added 9 commits April 8, 2020 22:46
06785fa Update le-tapuscrit-author-date.csl (JabRef#4708)
ada5282 Update norois.csl (JabRef#4707)
c1793d2 Create isnad-metinici.csl (JabRef#4704)
099f4a1 Create isnad-dipnotlu.csl (JabRef#4703)
8e8639e Update norois.csl (JabRef#4706)
62f6221 Create amsterdam-university-press.csl (JabRef#4699)
c31d9ca Create tagungsberichte-der-historischen-kommission-fur-ost-und-westpr… (JabRef#4700)
34220d3 Change apa-fr-provost.csl to fr-CA locale (JabRef#4701)
bbdc9c4 Update to better match RMIT Easy Cite (JabRef#4697)
7c506d9 Create Anatomia Histologia Embryologia csl file (JabRef#4688)
61f3dc5 Update pravnik.csl, masarykova-univerzita-pravnicka-fakulta.csl and iso690-full-note-cs.csl (JabRef#4705)
449eaec add DOI to mdpi.csl back (JabRef#4695)
642002e Create muni-law.csl (JabRef#4691)
483d04a Create iso690-author-date-pt (JabRef#4694)
505c006 Update pravnik.csl (JabRef#4690)
eb260ef Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4692)
9279f0d Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4693)
70f7be6 Create iso690-full-note-cs-pravnik.csl (JabRef#4686)
db54e56 Update CONTRIBUTING.md
2f16a9b Update CONTRIBUTING.md
4cd05ba Create associacao-brasileira-de-normas-tecnicas-ufrgs-footnote-ibid.csl (JabRef#4369)
4d4655e Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4684)
5948265 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4683)
f8b744c Create aberdeen-university-school-of-education-harvard.csl (JabRef#4685)
807930a Update trabajos-de-prehistoria.csl (JabRef#4680)
c25709f Update society-for-american-archaeology.csl (JabRef#4681)
86f888a Update archeosciences.csl (JabRef#4682)
99c4fd3 Create sylwan.csl (JabRef#4678)
d9ba2de Update equine-veterinary-education.csl (JabRef#4677)
7d30659 Update equine-veterinary-education.csl (JabRef#4675)
9a7791f Update equine-veterinary-education.csl (JabRef#4674)
0a46235 Create norois.csl (JabRef#4673)
88726cb Update Rhinology (JabRef#4672)
900e4d5 Create revista-de-biologia-marina-y-oceanografia.csl (JabRef#4671)
01672e3 polimdosains-politeknik-negeri-manado.csl (JabRef#4662)
d97d4b7 Update iso690-author-date-sk.csl (JabRef#4669)
22e0bab Create trabajos-de-prehistoria.csl (JabRef#4670)
6c6bf37 Create proceedings-of-the-joint-international-grassland-and-international-rangeland-congress-2021.csl (JabRef#4667)
b91deaf Create rhinology.csl (JabRef#4666)
d3b58b2 Add OSA dependents (JabRef#4668)
a0d4bab Create the-international-journal-of-tuberculosis-and-lung-disease.csl (JabRef#4663)
5a865de Update harvard-university-for-the-creative-arts.csl (JabRef#4665)
8695d97 Update societe-francaise-detude-de-la-ceramique-antique-en-gaule.csl (JabRef#4660)
0dc2e37 Update freshwater-science.csl (JabRef#4658)
118cfab Update ayer.csl (JabRef#4659)
3ba11bc Create optics-letters.csl (JabRef#4661)
a51eb4f Create societe-francaise-detude-de-la-ceramique-antique-en-gaule.csl (JabRef#4653)
9032e5b Create geografia-fisica-e-dinamica-quaternaria.csl (JabRef#4650)
38996d6 Create multimed.csl (JabRef#4644)
9cd28d3 Update journal-of-urban-technology.csl (JabRef#4652)
265c93f Correct Acta Palaeontologica Polonica in-text citation format (JabRef#4655)
9cf9ddc Create bioscience.csl (JabRef#4654)
277f340 Update brazilian-journal-of-veterinary-research-and-animal-science.csl (JabRef#4656)
a3e4ecf Update associacao-brasileira-de-normas-tecnicas-ufrgs-initials.csl (JabRef#4461)
960b316 Create journal-of-urban-technology.csl (JabRef#4645)
ddf2572 Create universitat-stuttgart-mpp-standard.csl (JabRef#4639)
bde92d6 Update environmental-microbiology.csl (JabRef#4641)
efa68bc Update presses-universitaires-de-rennes.csl (JabRef#4640)
0872e3e Fixes JabRef#4648 (JabRef#4649)
9a159a4 Create studi-e-materiali-di-storia-delle-religioni.csl (JabRef#4642)
e63f13e further updates for websites and paper-conference Update ieee.csl (JabRef#4646)
0cb6762 Create Bulletin du Centre d’études médiévales d’Auxerre (JabRef#4635)
784a1c9 Update instituto-de-pesquisas-energeticas-e-nucleares.csl (JabRef#4634)
e5f9eed Update ieee.csl (JabRef#4636)
e82a783 Fix paper-conference in journal-of-new-zealand-grasslands.csl (JabRef#4637)
7365ce8 fix editor label for french apa.csl (JabRef#4616)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 06785fa
@Siedlerchr
Copy link
Member

I don't know why the merged changes appear again, maybe someone has rollbacked the master branch? I checked the code in the master, which seems the fixes of the issues #6169 have been dropped?

Try to merge in the changes from upstream/master

@calixtus
Copy link
Member

Codewise looks good to me, thank you very much.

@calixtus calixtus marked this pull request as ready for review April 28, 2020 15:31
@calixtus
Copy link
Member

calixtus commented Apr 28, 2020

I think the changelog entry is wrong. Please change that.
Or at least not complete. Just add another entry for the fix about issue #6198

…ences-style-value-too-long

� Conflicts:
�	src/main/resources/csl-styles/isnad-dipnotlu.csl
�	src/main/resources/csl-styles/masarykova-univerzita-pravnicka-fakulta.csl
�	src/main/resources/csl-styles/society-for-american-archaeology.csl
@leitianjian
Copy link
Contributor Author

I don't know why the merged changes appear again, maybe someone has rollbacked the master branch? I checked the code in the master, which seems the fixes of the issues #6169 have been dropped?

Try to merge in the changes from upstream/master

I don't know why git fetch upstream does not fetch the upstream changes. After pull the changes from upstream. I think the problem was solved. Thank for your tips。

I think the changelog entry is wrong. Please change that.
Or at least not complete. Just add another entry for the fix about issue #6198

I modified the changelog entry. Please check it again. Thanks

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Looks. Good. Thank you for your contribution.
I hope you liked working with JabRef. As you can see, there is still plenty to be done, many bugs to fix and enough space to add ideas of your own to this software. We would be happy if you consider to contribute more.

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.

Thanks again for contributing! The changes look good to me as well

@calixtus calixtus merged commit d10e56f into JabRef:master Apr 29, 2020
Siedlerchr added a commit that referenced this pull request Apr 30, 2020
…ionCaseInsensitive

* upstream/master:
  New Crowdin translations (#6375)
  Squashed 'src/main/resources/csl-styles/' changes from 143464e..906cd6d
  Fixes #6357: File directory (#6377)
  Disable the generate button if the ID field is empty (#6371)
  Fix Preferences style value too long (#6372)
  Fix various Dark theme issues (#6368)
  Correct label name in dependabot
  Bump java-diff-utils from 4.5 to 4.7 (#6365)
  Try with info.plist.template also (#6366)
  Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDialog. (#6358)
  Bump flexmark-ext-gfm-strikethrough from 0.61.6 to 0.61.20 (#6361)
  Bump checkstyle from 8.31 to 8.32 (#6360)
  Bump flexmark-ext-gfm-tasklist from 0.61.16 to 0.61.20 (#6364)
  Bump flexmark from 0.61.16 to 0.61.20 (#6359)
  Bump org.beryx.jlink from 2.17.7 to 2.17.8 (#6362)
  Bump classgraph from 4.8.71 to 4.8.77 (#6363)
  Change blue and red colors in Merge entries dialog in Dark theme (#6356)
  Add Info plist to mac resources (#5986)
  Backward compatibility for 4.3.1 (#6296)
Siedlerchr added a commit that referenced this pull request May 2, 2020
* upstream/master: (166 commits)
  New Crowdin translations (#6382)
  Update code-howtos.md (#6393)
  Fix jstyle was invalid with default section at the start (#6386)
  Correcting file name for groups.uml (#6373)
  Fix underscore character being omitted from file name in Recent Libraries list (#6389)
  Rework journal abbreviation caching (#6304)
  Fix selecting custom export for copy to clipboard with uppercase file ext (#6290)
  New Crowdin translations (#6375)
  Squashed 'src/main/resources/csl-styles/' changes from 143464e..906cd6d
  Fixes #6357: File directory (#6377)
  Disable the generate button if the ID field is empty (#6371)
  Fix Preferences style value too long (#6372)
  Fix various Dark theme issues (#6368)
  Correct label name in dependabot
  Bump java-diff-utils from 4.5 to 4.7 (#6365)
  Try with info.plist.template also (#6366)
  Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDialog. (#6358)
  Bump flexmark-ext-gfm-strikethrough from 0.61.6 to 0.61.20 (#6361)
  Bump checkstyle from 8.31 to 8.32 (#6360)
  Bump flexmark-ext-gfm-tasklist from 0.61.16 to 0.61.20 (#6364)
  ...
koppor pushed a commit that referenced this pull request Jul 1, 2023
80b3861bce Update al-jamiah-journal-of-islamic-studies.csl (#6581)
b6fb00e415 Create arachnologische-mitteilungen.csl (#6375)
2dbc8edf8e Update universitat-basel-iberoromanistik.csl (#6580)
fd230a7073 Create veterinary-clinical-pathology.csl (#6372)
ac0afa3cae Create dedicated Basque APA file (#6370)
fee0677a88 Update chicago-author-date.csl (#6289)
ca1bf2db6e Create van-yuzuncu-yil-universitesi-fen-bilimleri-enstitusu.csl (#6230)
f4116db325 Create Turcica.csl (#6240)
0e4311a802 Create jurnal-teknik-mesin-indonesia.csl (#6211)
e73bf46674 Update vancouver.csl (#6156)
b73c3ef193 Create independent TF AIP Style
befa82e7ef Create harvard-xi-an-jiaotong-liverpool-univeisity.csl (#6181)
048c9bddbc Add csl for SDMI (#6129)
1c2aedd088 Update and rename dependent/energy-research-and-social-science.csl to energy-research-and-social-science.csl (#6567)
b77084255f Update the-quarterly-journal-of-economics.csl (#6572)
cf66f60f25 Update publicatiewijzer-voor-de-archeologie.csl (#6577)
9e9e08c219 Update isara-iso-690.csl (#6578)
4b4e8f442d Create silva-fennica.csl (#6568)
dd8760bb2b Update american-journal-of-botany.csl (#6569)
8b0e505363 Update haute-ecole-de-gestion-de-geneve-iso-690.csl (#6560)
016050c4b7 Update geographie-et-cultures.csl (#6563)
e8b62f1c80 Update and rename dependent/retina.csl to retina.csl (#6565)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 80b3861bce121a64d43ef167581f8d100a4f70aa
calixtus pushed a commit that referenced this pull request Jul 1, 2023
…ce (#10048)

80b3861bce Update al-jamiah-journal-of-islamic-studies.csl (#6581)
b6fb00e415 Create arachnologische-mitteilungen.csl (#6375)
2dbc8edf8e Update universitat-basel-iberoromanistik.csl (#6580)
fd230a7073 Create veterinary-clinical-pathology.csl (#6372)
ac0afa3cae Create dedicated Basque APA file (#6370)
fee0677a88 Update chicago-author-date.csl (#6289)
ca1bf2db6e Create van-yuzuncu-yil-universitesi-fen-bilimleri-enstitusu.csl (#6230)
f4116db325 Create Turcica.csl (#6240)
0e4311a802 Create jurnal-teknik-mesin-indonesia.csl (#6211)
e73bf46674 Update vancouver.csl (#6156)
b73c3ef193 Create independent TF AIP Style
befa82e7ef Create harvard-xi-an-jiaotong-liverpool-univeisity.csl (#6181)
048c9bddbc Add csl for SDMI (#6129)
1c2aedd088 Update and rename dependent/energy-research-and-social-science.csl to energy-research-and-social-science.csl (#6567)
b77084255f Update the-quarterly-journal-of-economics.csl (#6572)
cf66f60f25 Update publicatiewijzer-voor-de-archeologie.csl (#6577)
9e9e08c219 Update isara-iso-690.csl (#6578)
4b4e8f442d Create silva-fennica.csl (#6568)
dd8760bb2b Update american-journal-of-botany.csl (#6569)
8b0e505363 Update haute-ecole-de-gestion-de-geneve-iso-690.csl (#6560)
016050c4b7 Update geographie-et-cultures.csl (#6563)
e8b62f1c80 Update and rename dependent/retina.csl to retina.csl (#6565)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 80b3861bce121a64d43ef167581f8d100a4f70aa

Co-authored-by: github actions <jabrefmail+webfeedback@gmail.com>
koppor pushed a commit that referenced this pull request Jul 15, 2023
a97dbb32c5 Update studii-teologice.csl (#6591)
e19e08780e Update acm-sig-proceedings-long-author-list.csl (#6594)
c8abbcdd88 Update acm-sig-proceedings.csl (#6595)
725ace4a40 Create uppsala-university-library-harvard.csl (#6574)
a973041e0e update bluebook-law-review.csl (#6583)
0891cfc49a Update masarykova-univerzita-pravnicka-fakulta.csl (#6589)
80b3861bce Update al-jamiah-journal-of-islamic-studies.csl (#6581)
b6fb00e415 Create arachnologische-mitteilungen.csl (#6375)
2dbc8edf8e Update universitat-basel-iberoromanistik.csl (#6580)
fd230a7073 Create veterinary-clinical-pathology.csl (#6372)
ac0afa3cae Create dedicated Basque APA file (#6370)
fee0677a88 Update chicago-author-date.csl (#6289)
ca1bf2db6e Create van-yuzuncu-yil-universitesi-fen-bilimleri-enstitusu.csl (#6230)
f4116db325 Create Turcica.csl (#6240)
0e4311a802 Create jurnal-teknik-mesin-indonesia.csl (#6211)
e73bf46674 Update vancouver.csl (#6156)
b73c3ef193 Create independent TF AIP Style
befa82e7ef Create harvard-xi-an-jiaotong-liverpool-univeisity.csl (#6181)
048c9bddbc Add csl for SDMI (#6129)
1c2aedd088 Update and rename dependent/energy-research-and-social-science.csl to energy-research-and-social-science.csl (#6567)
b77084255f Update the-quarterly-journal-of-economics.csl (#6572)
cf66f60f25 Update publicatiewijzer-voor-de-archeologie.csl (#6577)
9e9e08c219 Update isara-iso-690.csl (#6578)
4b4e8f442d Create silva-fennica.csl (#6568)
dd8760bb2b Update american-journal-of-botany.csl (#6569)
8b0e505363 Update haute-ecole-de-gestion-de-geneve-iso-690.csl (#6560)
016050c4b7 Update geographie-et-cultures.csl (#6563)
e8b62f1c80 Update and rename dependent/retina.csl to retina.csl (#6565)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: a97dbb32c57c8c00e47422dae4ba4f480e753da5
koppor pushed a commit that referenced this pull request Aug 1, 2023
0749a19b83 Update journal-of-experimental-botany.csl (#6604)
b1768724fe Update modern-language-association.csl (#6606)
dd364c1815 Create modern-language-association-for-JEI.csl (#6593)
6cb436997b Partial update of APA styles for 1.0.2, including software, legal, most localizations (#6270)
d7c4ebec85 fix film/video authors for american-sociological-association.csl (#6602)
a97dbb32c5 Update studii-teologice.csl (#6591)
e19e08780e Update acm-sig-proceedings-long-author-list.csl (#6594)
c8abbcdd88 Update acm-sig-proceedings.csl (#6595)
725ace4a40 Create uppsala-university-library-harvard.csl (#6574)
a973041e0e update bluebook-law-review.csl (#6583)
0891cfc49a Update masarykova-univerzita-pravnicka-fakulta.csl (#6589)
80b3861bce Update al-jamiah-journal-of-islamic-studies.csl (#6581)
b6fb00e415 Create arachnologische-mitteilungen.csl (#6375)
2dbc8edf8e Update universitat-basel-iberoromanistik.csl (#6580)
fd230a7073 Create veterinary-clinical-pathology.csl (#6372)
ac0afa3cae Create dedicated Basque APA file (#6370)
fee0677a88 Update chicago-author-date.csl (#6289)
ca1bf2db6e Create van-yuzuncu-yil-universitesi-fen-bilimleri-enstitusu.csl (#6230)
f4116db325 Create Turcica.csl (#6240)
0e4311a802 Create jurnal-teknik-mesin-indonesia.csl (#6211)
e73bf46674 Update vancouver.csl (#6156)
b73c3ef193 Create independent TF AIP Style
befa82e7ef Create harvard-xi-an-jiaotong-liverpool-univeisity.csl (#6181)
048c9bddbc Add csl for SDMI (#6129)
1c2aedd088 Update and rename dependent/energy-research-and-social-science.csl to energy-research-and-social-science.csl (#6567)
b77084255f Update the-quarterly-journal-of-economics.csl (#6572)
cf66f60f25 Update publicatiewijzer-voor-de-archeologie.csl (#6577)
9e9e08c219 Update isara-iso-690.csl (#6578)
4b4e8f442d Create silva-fennica.csl (#6568)
dd8760bb2b Update american-journal-of-botany.csl (#6569)
8b0e505363 Update haute-ecole-de-gestion-de-geneve-iso-690.csl (#6560)
016050c4b7 Update geographie-et-cultures.csl (#6563)
e8b62f1c80 Update and rename dependent/retina.csl to retina.csl (#6565)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 0749a19b8306f2e8dcb9bf1a2e3a6992666030ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storing selected preview throws java.lang.IllegalArgumentException: Value too long:
3 participants