jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Groups only show 4 digit number of entries

Open ilippert opened this issue 2 years ago • 10 comments

JabRef version

Other (please describe below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 5.7--2022-05-15--a90ee23 Linux 5.17.6-300.fc36.x86_64 amd64 Java 18.0.1 JavaFX 18+12

Checked with the latest development build

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

Steps to reproduce the behaviour

open a library with more than 9999 entries; the first digit is not shown on my system.

Appendix

Screenshot from 2022-05-15 15-56-15

ilippert avatar May 15 '22 13:05 ilippert

JabRef version

Latest main development branch https://github.com/JabRef/jabref/commit/c38d18bbee4446b2ad879ad7d2ad8af50b2f4727

Operating system

Windows

Details on version and operating system

Windows 10

ss

It looks good with JabRef in Window 10.

LIM0000 avatar May 16 '22 01:05 LIM0000

On

JabRef 5.7--2022-06-12--e3b2ab2 Linux 5.17.13-300.fc36.x86_64 amd64 Java 18.0.1 JavaFX unknown

Fedora 36 it is still a problem

ilippert avatar Jun 14 '22 10:06 ilippert

@LIM0000 would you mind sharing your database with 16 760 entries? :D

ThiloteE avatar Jun 16 '22 20:06 ThiloteE

@ThiloteE you can generate one yourself https://github.com/JabRef/jabref/blob/main/scripts/bib-file-generator.py

Siedlerchr avatar Jun 16 '22 21:06 Siedlerchr

How can I run the script?

ThiloteE avatar Jun 16 '22 22:06 ThiloteE

Hi @ThiloteE , you can

  1. download python 3 from here https://www.python.org/downloads/.
  2. install latest version of python 3 to your system
  3. create a file name bib-file-generator.py using notepad and copy all the lines from https://github.com/JabRef/jabref/blob/main/scripts/bib-file-generator.py into your file
  4. Open terminal and command python3 bib-file-generator.py

Additional note: Please navigate to bib-file-generator.py directory using cd command, otherwise absolute path might be needed.

Hope this helps.

LIM0000 avatar Jun 16 '22 22:06 LIM0000

Thanks for the help! :-)

Can confirm: The problem can be observed on Linux Mint (Cinnamon) 20.3 as well using the portable version of JabRef. @Siedlerchr what about mac?

ThiloteE avatar Jun 17 '22 10:06 ThiloteE

Can confirm: Might be also related to the screen resolution grafik

Probably the size calculation needs to be adjusted: https://github.com/JabRef/jabref/blob/a355534765b581861cb656c1fb18709f3e6299d0/src/main/java/org/jabref/gui/groups/GroupTreeView.java#L116-L121

Siedlerchr avatar Jun 17 '22 14:06 Siedlerchr

Hi @ThiloteE , I am a student who needs to contribute to an OpenSource project in my coursework, so I was wondering if you can assign this to me. This issue seems to be a good initiation of my journey towards contribution to FOSS projects. Can you please assign this to me?

theshashankpal avatar Sep 10 '22 05:09 theshashankpal

Yes you can :-)

As a general advice: Check out https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md for a start. Also, https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace is worth having a look at. Feel free to ask if you have any questions here on GitHub or also at 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.

ThiloteE avatar Sep 10 '22 07:09 ThiloteE

In yesterday's mob programming session, we could reproduce the behavior by changing the font size in the preferences (Appearance → Override default font size)

Very likely this method needs to be adjusted https://github.com/JabRef/jabref/blob/a1f2d5181ce1d99674c30bbd4894158f9b3d1437/src/main/java/org/jabref/gui/groups/GroupTreeView.java#L195-L225

Siedlerchr avatar Nov 11 '22 11:11 Siedlerchr

Hey @Siedlerchr, we solved this here, for a university project. Could you take a look?

alescrocaro avatar Dec 12 '22 17:12 alescrocaro

Note. The issue is not solved. I tried to check some options and the font size is set correctly for the text, I tried the following but did not succeed:

   if(group.isRoot()) {
                                        EasyBind.subscribe(group.getHits(), (val)-> {
                                            double width = text.getBoundsInLocal().getWidth();
                                            node.setMaxWidth(width);
                                            node.setPrefWidth(width);
                                        });
                                    }

Siedlerchr avatar Jan 04 '23 12:01 Siedlerchr

Hi, can I work on this issue if it's still open?

sambhav97 avatar Mar 07 '23 16:03 sambhav97

@sambhav97 Yes, make sure to read through the thread. Easiest way to reproduce: Change the font size in the preferences -> Appearance -> Override default font size. Change to e.g. 12

Siedlerchr avatar Mar 07 '23 18:03 Siedlerchr

Hint: Controls should be sized in relation to the base font size of the main application window. See the documentation on jfx css measure units: https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typelength

calixtus avatar Mar 19 '23 20:03 calixtus