Bug 540792 - Quick switch editor (Ctrl+E) popup is too wide
Summary: Quick switch editor (Ctrl+E) popup is too wide
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.12   Edit
Assignee: Patrik Suzzi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 539446
Blocks:
  Show dependency tree
 
Reported: 2018-11-05 06:23 EST by Noopur Gupta CLA
Modified: 2019-05-19 09:29 EDT (History)
5 users (show)

See Also:


Attachments
Screenshot (304.03 KB, image/png)
2018-11-05 06:23 EST, Noopur Gupta CLA
no flags Details
This is the dialog that I would take as a model (62.18 KB, image/png)
2018-12-05 16:01 EST, Patrik Suzzi CLA
no flags Details
Quick switch editor reverted to display short text, and full path on hover. (45.86 KB, image/png)
2019-05-19 09:29 EDT, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2018-11-05 06:23:17 EST
Created attachment 276472 [details]
Screenshot

I20181025-1800

Quick switch editor (Ctrl+E) popup can become too wide now which looks odd. See the attached screenshot.

Looks like the width is now equal to the width of the longest entry in the list. It should be set to a standard width and the remaining part of the entry can be shown on hover along with a horizontal scroll bar at the bottom, similar to the Open Resource dialog.
Comment 1 Andrey Loskutov CLA 2018-11-05 10:18:15 EST
Patrik, can you please take it over? I guess it is coming from bug 539446.
Comment 2 Dani Megert CLA 2018-11-23 11:53:36 EST
(In reply to Andrey Loskutov from comment #1)
> Patrik, can you please take it over? I guess it is coming from bug 539446.

Ping!
Comment 3 Patrik Suzzi CLA 2018-11-28 18:37:21 EST
Currently, we are displaying the following string:
WorkbenchPartReference.getTitle() + " - " = WorkbenchPartReference#getTitleToolTip()

As seen in the screenshot, such string can be quite long. 

A possible solution is to put a scrollbar like on OpenResourceDialog or on the Ctrl + 3 dialog. 

To implement such a solution I will need to know how to compute a maximum size. 
- Is there any Dialog I can take as an example to compute the maximum size?

(example: maximum size = 1/2 total width of the eclipse ide window)
Comment 4 Dani Megert CLA 2018-11-29 06:52:48 EST
(In reply to Patrik Suzzi from comment #3)
> Currently, we are displaying the following string:
> WorkbenchPartReference.getTitle() + " - " =
> WorkbenchPartReference#getTitleToolTip()
> 
> As seen in the screenshot, such string can be quite long. 
> 
> A possible solution is to put a scrollbar like on OpenResourceDialog or on
> the Ctrl + 3 dialog. 

Nope. That would be horrible.


> To implement such a solution I will need to know how to compute a maximum
> size. 
> - Is there any Dialog I can take as an example to compute the maximum size?
> 
> (example: maximum size = 1/2 total width of the eclipse ide window)

I would either use 1/2 of the editor area or define a maximum number of characters and compute the length (must use the correct font).


> the remaining part of the entry can be shown on hover 
Hover is already there.


NOTE 1: The issue is not new. The popup could get wide before when the file has a really long name.

NOTE 2: The current placement is wrong. It uses the window width instead of the editor area width. That can result in the popup to appear besides the editor.
Comment 5 Dani Megert CLA 2018-12-04 11:25:04 EST
Ping! One day left for 4.10.
Comment 6 Patrik Suzzi CLA 2018-12-05 15:56:50 EST
(In reply to Dani Megert from comment #4)
> (In reply to Patrik Suzzi from comment #3)
> > Currently, we are displaying the following string:
> > WorkbenchPartReference.getTitle() + " - " =
> > WorkbenchPartReference#getTitleToolTip()
> > 
> > As seen in the screenshot, such string can be quite long. 
> > 
> > A possible solution is to put a scrollbar like on OpenResourceDialog or on
> > the Ctrl + 3 dialog. 
> 
> Nope. That would be horrible.


I don't understand which one of the following you prefer:
1. remove the path and bring it to the previous state
2. add a scrollbar that shows only in case of overflow





> > To implement such a solution I will need to know how to compute a maximum
> > size. 
>...
> 
> I would either use 1/2 of the editor area or define a maximum number of
> characters and compute the length (must use the correct font).

If you suggest using 1/2 of the editor area, I assume you suggest adding a scrollbar in case of overflow, and limit the width of the dialog to 1/2 editor area. 


> > the remaining part of the entry can be shown on hover 
> Hover is already there.
> 
> 
> NOTE 1: The issue is not new. The popup could get wide before when the file
> has a really long name.
> 
> NOTE 2: The current placement is wrong. It uses the window width instead of
> the editor area width. That can result in the popup to appear besides the
> editor.

- I can recompute the width of the dialog depending on the entries that are currently visible. 
- I am going to change the placement according to the width of the editor
Comment 7 Patrik Suzzi CLA 2018-12-05 16:01:20 EST
Created attachment 276835 [details]
This is the dialog that I would take as a model
Comment 8 Dani Megert CLA 2018-12-14 12:22:02 EST
When showing the path the scroll bar will most likely appear every time.

Please revert the change and show the path in a hover.
Comment 9 Dani Megert CLA 2019-01-04 10:24:55 EST
Ping! M1 is next week.
Comment 10 Kalyan Prasad Tatavarthi CLA 2019-02-15 03:35:38 EST
Ping! M3 is next week
Comment 11 Lars Vogel CLA 2019-02-19 03:32:06 EST
Mass change, please reset target if you still planning to fix this for 4.11.
Comment 12 Patrik Suzzi CLA 2019-05-19 08:27:18 EDT
(In reply to Dani Megert from comment #8)
> When showing the path the scroll bar will most likely appear every time.
> 
> Please revert the change and show the path in a hover.

I am reverting the change and show the path in a hover.

Please, note this revert defeats the purpose of bug 539446
Comment 13 Eclipse Genie CLA 2019-05-19 08:32:33 EDT
New Gerrit change created: https://git.eclipse.org/r/142391
Comment 15 Patrik Suzzi CLA 2019-05-19 09:29:26 EDT
Created attachment 278646 [details]
Quick switch editor reverted to display short text, and full path on hover.

As a consequence, I will re-open bug 539446