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

Selecting a group impacts column width #6690

Closed
1 task done
mlep opened this issue Jul 16, 2020 · 13 comments
Closed
1 task done

Selecting a group impacts column width #6690

mlep opened this issue Jul 16, 2020 · 13 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups maintable ui
Milestone

Comments

@mlep
Copy link
Contributor

mlep commented Jul 16, 2020

JabRef 5.1--2020-07-13--6344401
Linux 4.9.0-12-amd64 amd64
Java 14.0.1

With "all entries" selected in the group panel, column width can be adjusted by grabbing the column separator and moving it sideways. This is the expected behavior.
But after selecting a subgroup and adjusting the width of a column, all the columns except one get squizzed.

Steps to reproduce the ABNORMAL behavior:

  1. select a subgroup
  2. adjust the width of a column.
    ==> on mouse button release, the column continue to get enlarged (or reduced depending on how you adjusted its width). The other columns get squizzed.

Another way to reproduce this bug:

  1. with All entries displayed (selecting the group "all entries" or not), adjust the width of a column (here, it works as expected).
  2. select a subgroup
    ==> the adjusted column starts to get enlarged (or reduced depending on how you adjusted its width). The other columns get squizzed.

Surprising and ... reproducible!

Nothing in the log.

Tip: the bug is absent in JabRef 5.1--2020-05-26--0d7156b, but present in JabRef 5.1--2020-06-09--595f085 .

Supplementary note:
In JabRef 5.1--2020-05-26--0d7156b (I have not tested with the other versions), switching between groups can lead to changes in the width of the columns (this is not systematic, but quite easy to reproduce). Compared to the issue described above, there is no need to change the column width at first. And it is not dynamic (i.e. the width of the columns do not start moving; they change instantaneously when switching between groups). Going back to the initial group does not re-establish the column width.
This may be a different bug, but it looks very related to the issue initially described. Since the initial issue is not present in JabRef 5.1--2020-05-26--0d7156b, it means the situation got worse afterwards.
Reproduced with the file https://github.com/JabRef/jabref/blob/master/src/test/resources/testbib/jabref-authors.bib

@mlep mlep changed the title Selecting a group impact column width Selecting a group impacts column width Jul 17, 2020
@mlep
Copy link
Contributor Author

mlep commented Jul 27, 2020

@koppor @Siedlerchr @tobiasdiez
I have noticed that you are getting ready to release version 5.1 of JabRef.
I want to attract your attention on the present issue: if other users have the same issue, that will block them from using version 5.1.

@tobiasdiez tobiasdiez added this to the v5.1 milestone Jul 27, 2020
@koppor
Copy link
Member

koppor commented Aug 4, 2020

@mlep Could you make a video using https://www.loom.com/?

@koppor koppor modified the milestones: v5.1, v5.2 Aug 4, 2020
@mlep
Copy link
Contributor Author

mlep commented Aug 4, 2020

Here it is:
Capture-vido-2020-08-04-090348qsdfqf

JabRef 5.1--2020-08-03--f6404b4
Linux 4.9.0-13-amd64 amd64
Java 14.0.2

@mlep
Copy link
Contributor Author

mlep commented Aug 4, 2020

I have tried to narrow it down.
To reproduce the bug, it seems you need to have 3 opened files (and the groups of one of the files must be different from the others (this later condition being quite common in real life, right?).

Let's play with the file https://github.com/JabRef/jabref/blob/master/src/test/resources/testbib/jabref-authors.bib

  1. In a directory, copy jabref-authors.bib into jabref-authors2.bib, jabref-authors3.bib and jabref-authors-mod.bib
  2. In jabref-authors-mod.bib replace "For teaching" by "For fun".
  3. In JabRef, open jabref-authors.bib, jabref-authors2.bib, jabref-authors3.bib; and play with the column width, groups, and switch between files. Nothing abnormal happens.
  4. close jabref-authors3.bib and open jabref-authors-mod.bib
    In jabref-authors-mod.bib, select the group "For fun". ==> the columns collapse

If only 2 files (including jabref-authors-mod.bib) are opened, no abnormal behavior.

@calixtus calixtus added ui bug Confirmed bugs or reports that are very likely to be bugs labels Aug 22, 2020
@mlep
Copy link
Contributor Author

mlep commented Aug 31, 2020

Note: the 3 users reporting column shrinkage are using Linux

@alito21
Copy link

alito21 commented Oct 6, 2020

Note: the 3 users reporting column shrinkage are using Linux

I am experiencing the same problem under Windows 10.

@calixtus
Copy link
Member

Bug seems depend on the SmartConstrainedResizePolicy. Tried with TableView.CONSTRAINED_RESIZE_POLICY and the bug did not occur. Workaround is by disabling "fit table horizontally on screen".

Will think about this one. Maybe this will require a more general solution...

@Blubbaa
Copy link

Blubbaa commented Nov 26, 2020

Had the same bug on

JabRef 5.1--2020-08-30--e023aa0
Windows 10 10.0 amd64 
Java 14.0.2

Workaround by disabling the setting under "entry table -> fit table horizontally on screen" worked!

@mlep
Copy link
Contributor Author

mlep commented Dec 4, 2020

Note: I am experiencing the same behavior with only 2 opened files, but this is rare (and I have not found how to reproduce it yet)
@calixtus Thanks for the work-around!

@koppor
Copy link
Member

koppor commented Dec 7, 2020

The underlying discussion is #967.

We seem to have a cool initial implementation done using the ResizePolicy. See #967 (comment).

In short the idea of #967:

  • Columns have optimal width
  • Sum of widhts matches window size
  • Let this width be optX

There is a column min column width and thus a min window width. Let this be "minoptx".

If window size is increased, column size increases.
If window size decreases below optx, the column widht are decreased until minoptx is reached. Below minoptx, there is a scroll bar added.

Maybe, we did not use minoptx, but only optX.

The idea is refined in #967

  • ability to define a minimal width for each column
  • ability to define that a column should not be scaled
  • automatic sizing of the table:
    • Each column should have at least its minimal size - if the space is not sufficient, a horizontal scrollbar should be used.
    • Columns with fixed size should use those fixed sizes
    • If there is additional space left the remaining columns could be broadend to use this space.

@koppor
Copy link
Member

koppor commented Dec 7, 2020

@koppor koppor added this to the v5.3 milestone Dec 21, 2020
@mlep
Copy link
Contributor Author

mlep commented Mar 12, 2021

I cannot reproduce this bug anymore in JabRef 5.3--2021-03-11--8bb7668 (https://builds.jabref.org/master/)
@Blubbaa and @alito21: could you confirm?

Solved by PR #7507?

@Blubbaa
Copy link

Blubbaa commented Mar 12, 2021

Can confirm, I am not able to reproduce on

JabRef 5.3--2021-03-11--8bb7668
Windows 10 10.0 amd64 
Java 14.0.2 
JavaFX 16+8

Behaviour with "Fit table horizontally to screen" option also feels intuitive and normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs groups maintable ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants