Bug 540778 - huge width of repository view context menu
Summary: huge width of repository view context menu
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.2   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 315619
Blocks:
  Show dependency tree
 
Reported: 2018-11-05 03:56 EST by Michael Keppler CLA
Modified: 2018-11-10 06:16 EST (History)
1 user (show)

See Also:


Attachments
screenshot (7.57 KB, image/png)
2018-11-05 03:56 EST, Michael Keppler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Keppler CLA 2018-11-05 03:56:49 EST
Created attachment 276468 [details]
screenshot

When I create long branch names, I sometimes have a very wide context menu afterwards, where the width seems to depend on the length of the branch name (i.e. the longer the branch name, the wider the context menu).

See screenshot. That was after creating a branch "bugfix/AAAAA-12345_have_status_bar_for_navigator_content".
Comment 1 Thomas Wolf CLA 2018-11-05 05:44:05 EST
Cannot reproduce on Mac. SWT problem?
Comment 2 Michael Keppler CLA 2018-11-05 05:48:48 EST
Might be SWT, and this is on Windows.

The calculation might be related to the "Push branch 'branchName'..." menu. That one gets huge when the long branch is the current one, and probably influences the width of the overall menu even afterwards, when it has a new label for the next (shorter) branch.

Does anyone know if there is something similar to Composite.layout() for menus, i.e. redoing the size calculation?
Comment 3 Thomas Wolf CLA 2018-11-05 06:01:02 EST
Ah, you had the branch with the long name checked out at one point. Possibly even when that screen shot was taken (I notice you had several repositories selected).

So two possibly culprits:

* bug 315619?
* menu size might be calculated before visibility?

Which Eclipse version do you see this with?

A work-around in Egit might be to abbreviate the branch name, appending an ellipsis if it is longer than some threshold. Like we do in the history view. A tooltip on the menu (should work at least in newer eclipses) could still give the full branch name.
Comment 4 Michael Keppler CLA 2018-11-05 14:45:23 EST
I'm not sure anymore if the branch was checked out at that time, but I definitely know the menu remains that big even after switching to another. Basically the only reset of the menu size happens by restarting Eclipse, once this huge width has occured. So bug 315619 sounds very much the same. Might even be common navigator specific.

This is Windows 10, Eclipse 4.10M1.