netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

GIT: Large empty space between the file path and the Show Actions button

Open troizet opened this issue 2 years ago • 10 comments

Apache NetBeans version

Apache NetBeans 17

What happened

Снимок экрана от 2023-03-19 19-10-09(2)

If you click on Show all files: Снимок экрана от 2023-03-19 19-11-12

On the previous commit: Снимок экрана от 2023-03-19 19-11-58

Снимок экрана от 2023-03-19 19-12-26

How to reproduce

  • Open the php.editor module
  • Git -> Show history for file php/php.editor/src/org/netbeans/modules/php/editor/verification/ReturnTypeHintError.java
  • In summary find commit f55ac21 and expand for a list of files

Did this work correctly in an earlier version?

No / Don't know

Operating System

Ubuntu 22.04.2 LTS

JDK

OpenJDK Runtime Environment 11.0.18+10-post-Ubuntu-0ubuntu122.04

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

troizet avatar Mar 19 '23 12:03 troizet

this seems to be an optimization: https://github.com/apache/netbeans/blob/67cc93027d9ebbb69bf5e00fd6e529f9bf960a4b/ide/versioning.util/src/org/netbeans/modules/versioning/history/SummaryCellRenderer.java#L203

it computes the line size only if the commit has less than 20 "events". An event is essentially a change to a file, like add/remove/modify.

We might be able to remove this check, or bump it to a larger number.

going to fix this in an upcoming PR since I try to improve the history view a bit.

mbien avatar Mar 03 '24 04:03 mbien

-> https://github.com/apache/netbeans/pull/7128 PR should create a dev-build to play around with

mbien avatar Mar 04 '24 02:03 mbien

@mbien I don't seem to have described the problem clearly, sorry.

The location of the Show Actions button depends on the longest file path in the commit, even if that path is not displayed. And when the commit file list is minimized to a single file, it looks strange. And sometimes because of one file with a long path, the button can go off screen for all the other files in the commit. I think it would be better to remove the empty space between the file path and the button.

troizet avatar Mar 05 '24 14:03 troizet

@troizet in your screenshot it shows only one file for some reason which makes it look weird if it happens to be the shortest path.

I can't explain why you see only one file. I also question a bit how useful the "show all files" button is. I am thinking about making this the default and removing the button, so that when a user expands a commit, there would be always all files.

For me personally, I think it looks a bit better when its formatted like a table, yes there can be the odd situation when a very short path is next to a very long path - but this is already mitigated a little bit by limiting the max empty space to 400 chars.

mbien avatar Mar 05 '24 15:03 mbien

I can't explain why you see only one file.

One file is displayed if you look at the commit history for a specific file. I have recorded a video for clarity.

Display commit history for a specific file:

https://github.com/apache/netbeans/assets/9607501/21618a80-2179-47ec-a176-2f04db258eda

Display full commit history:

https://github.com/apache/netbeans/assets/9607501/fca23efc-e3dd-40fb-a7e8-271f9853a24a

I think it looks a bit better when its formatted like a table

I agree with you here.

troizet avatar Mar 05 '24 16:03 troizet

ah! thanks, that was the missing piece - now I understand how to get there.

I check atm if I can implement a file filter with highlighting, after that I check if this can be improved somehow.

mbien avatar Mar 05 '24 16:03 mbien

I also question a bit how useful the "show all files" button is.

I think it would be fine, but just not for the commit history for a particular file.

troizet avatar Mar 05 '24 16:03 troizet

this should work now I hope. PR is updated (see dev-build).

mbien avatar Mar 10 '24 05:03 mbien

Tried dev-build. Everything works fine. Thank you very much!

troizet avatar Mar 10 '24 07:03 troizet

@troizet wow that was quick! Thanks for checking.

mbien avatar Mar 10 '24 07:03 mbien