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

Citation Styles have new line after starting numeric in Entry Preview. Differs from OO Cite. #10

Open
2 tasks done
ThiloteE opened this issue Jul 19, 2024 · 9 comments
Open
2 tasks done
Labels
bug Something isn't working depends-on-external Issues that we cannot easily fix on our own. wontfix This will not be worked on

Comments

@ThiloteE
Copy link
Collaborator

ThiloteE commented Jul 19, 2024

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 10

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

First-logic branch commit ba872be

Select a style and look at entry preview.
image

It is assumed there is not supposed to be a new line. Here is the corresponding citation in LibreOffice:

image

Appendix

No response

@ThiloteE ThiloteE added the bug Something isn't working label Jul 19, 2024
@subhramit subhramit added the good first issue Good for newcomers label Jul 20, 2024
@subhramit
Copy link
Owner

subhramit commented Jul 21, 2024

Hi Thilo, could you shift this issue to the main repo?
I initially thought it's of the level of a "good first issue", tried investigating, but couldn't find what's causing it.
This could mean either I'm missing something obvious, or the bug is deeper down.

@ThiloteE
Copy link
Collaborator Author

Waiting for Olivers opinion. If I remember correctly, you both did talk about this topic before, right?

@subhramit
Copy link
Owner

subhramit commented Jul 21, 2024

Waiting for Olivers opinion. If I remember correctly, you both did talk about this topic before, right?

No, we didn't. I had noticed this, but the first time we talked about this was during our last exchange call (Oliver wasn't there).

Reason I suggested to shift is because the issue exists independent of my changes (it was there in the entry editor of the preferences even before our project began).

@subhramit subhramit removed the good first issue Good for newcomers label Jul 21, 2024
@koppor
Copy link
Collaborator

koppor commented Jul 21, 2024

Yes, we talked about it. Maybe one or two months ago.

@subhramit needs to find out how to deal. Write JUnit tests. Try to craft a minimal example. org.jabref.logic.citationstyle.CitationStyleGeneratorTest is the class to work on. Then adapt org.jabref.logic.citationstyle.CitationStyleGenerator to not have the line break.

@koppor
Copy link
Collaborator

koppor commented Jul 21, 2024

Reason I suggested to shift is because the issue exists independent of my changes (it was there in the entry editor of the preferences even before our project began).

You are learning that one is dependent on other code, which also needs to be adapted. Fortunately, as we are open source, you can do it for yourself and do not need to wait for others to take action. 💪

@subhramit
Copy link
Owner

subhramit commented Jul 22, 2024

Reason I suggested to shift is because the issue exists independent of my changes (it was there in the entry editor of the preferences even before our project began).

You are learning that one is dependent on other code, which also needs to be adapted. Fortunately, as we are open source, you can do it for yourself and do not need to wait for others to take action. 💪

Hey, yes, I'd be more than happy to do that, by the time I had written the first comment, I had already tried debugging it:

Hi Thilo, could you shift this issue to the main repo? I initially thought it's of the level of a "good first issue", tried investigating, but couldn't find what's causing it. This could mean either I'm missing something obvious, or the bug is deeper down.

@subhramit needs to find out how to deal. Write JUnit tests. Try to craft a minimal example. org.jabref.logic.citationstyle.CitationStyleGeneratorTest is the class to work on. Then adapt org.jabref.logic.citationstyle.CitationStyleGenerator to not have the line break.

The issue, I think, is not with CitationStyleGenerator, but PreviewViewer (I am also using CitationStyleGenerator to generate CSL Styles for LO, and none of the outputs produced have the line break, whether after processing, or in the raw HTML). PreviewViewer is also using HTML-format generated citations from CitationStyleGenerator, same as I am using.

Furthermore, speaking of CitationStyleGeneratorTest, if you look at the expected values, none of the numbered citations have a line break after the number, so again it cannot be CitationStyleGenerator.

In PreviewViewer, this is where I think the issue is happening:
image
But don't know how to go deeper than this for the fix... (anything I ctrl+click on deeper than this I get decompiled .classes).

@ThiloteE ThiloteE added the depends-on-external Issues that we cannot easily fix on our own. label Jul 22, 2024
@ThiloteE
Copy link
Collaborator Author

@subhramit
Copy link
Owner

TODO: File issue upstream at JavaFX (WebScene).

@subhramit subhramit added the wontfix This will not be worked on label Aug 6, 2024
@koppor
Copy link
Collaborator

koppor commented Aug 7, 2024

TODO: File issue upstream at JavaFX (WebScene).

I did not see any MWE for this. Requested at #10 (comment). Such an MWE ensures that the "right" component is identified before filing any issue. Moreover, after a fix, one can directly see if any other component broke. Finally, one can work on work arounds... Working on a minimal example is easier, because there is no unnecessary code executed (which takes time and distracts during debugging).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working depends-on-external Issues that we cannot easily fix on our own. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants