This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 377085 - [Trim] Auto-unmaximize when there are no more 'minimized by zoom' elements in the trim
Summary: [Trim] Auto-unmaximize when there are no more 'minimized by zoom' elements in...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Eric Moffatt CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard: candidate43
Keywords:
: 374461 381579 382275 384026 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-18 08:42 EDT by Lars Vogel CLA
Modified: 2014-05-02 11:26 EDT (History)
8 users (show)

See Also:


Attachments
Help (88.80 KB, image/png)
2012-04-18 08:42 EDT, Lars Vogel CLA
no flags Details
Expected Result (105.18 KB, image/png)
2012-04-18 08:46 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2012-04-18 08:42:00 EDT
Created attachment 214176 [details]
Help

Build id: I20120411-2034

The Welcome Screen sometimes get broken, especially after installation of new plugins which contribute to it. 

The easiest way to reproduce I found is the following:

1.) Start Eclipse 4.2 with a new workspace
2.) Use the Quick Access Box to create a new Java project
3.) Use the Quick Access Box to create a new Java class

-> Result as in Screenshot

Alternative use Open Type to open a Java class after the installation of a new feature which contributes to the help screen.
Comment 1 Paul Webster CLA 2012-04-18 08:43:53 EDT
Actually, the welcome screen "minimized" the entire perspective.  When you access it, it opens the perspective similar to how it opens a view (that's what you are seeing).  AFAIK it's one of our new features.

Eric can confirm.

PW
Comment 2 Lars Vogel CLA 2012-04-18 08:46:57 EDT
Created attachment 214178 [details]
Expected Result

I think it would be better if it behaves similar to a double-click on the header, expected result attached as screenshot.
Comment 3 Lars Vogel CLA 2012-04-18 08:47:37 EDT
Reopened for verification. Please close if the current behavior is expected.
Comment 4 Paul Webster CLA 2012-04-18 09:01:11 EDT
(In reply to comment #3)
> Reopened for verification. Please close if the current behavior is expected.

The current behaviour is as expected (it should work as a minimized stack, so if you click on the icon again it should disappear).

But we can check with Eric and see if we want the different behaviour.

PW
Comment 5 Lars Vogel CLA 2012-04-19 14:54:12 EDT
I think it currently looks broken, hence this bug report.
Comment 6 Curtis Windatt CLA 2012-04-19 15:13:13 EDT
This is a bit of a problem.  Once you get into the state, it isn't obvious how to get out of it.  Yes the restore button works, but clicking the java perspective buttons does nothing.  If you click on the welcome screen in frustration, it takes the selection and opens items on the welcome screen.  

That being said, I don't think it is worth worrying about for 4.2.
Comment 7 Paul Webster CLA 2012-04-20 07:59:10 EDT
apparently re-acting the old way can lead to bug 353837

PW
Comment 8 Paul Webster CLA 2012-06-04 11:41:53 EDT
*** Bug 381579 has been marked as a duplicate of this bug. ***
Comment 9 Eric Moffatt CLA 2012-06-04 13:15:55 EDT
The 'correct' behavior for Intro in the past was to hide the trim altogether but that behavior makes Intro 'magic' (it behaves differently from *all* other eclipse parts). We'd prefer to give Intro (and implicitly all other eclipse parts the ability to hide the trim when they want).

The current min/max story is: Maximize == minimize everything else to the trim

If we take 'everything else' in the above statement and replace it with 'its siblings' then the logical extension of this when maximizing a part that is *outside* the perspective is to minimize its siblings, including the PerspectiveStack to the trim. This is how we've ended up where we are...
Comment 10 Eric Moffatt CLA 2012-06-04 13:30:18 EDT
Lars, I'm going to re-purpose this defect. The effect that you're seeing is that restoring the minimized perspective stack is not removing the maximized state from the Intro view (so it's not showing its 'standby' format).

Note that this is, for the most part, intentional behavior. It allows someone to restore a single stack after a maximize without having everything else restored as well. 

The bug is actually that if there are *no* 'minimized by zoom' elements left in the trim then we should auto-unmaximize the currently maximized element. This would not only give the results you expect in this case (since the perspective stack is the only 'minimized by zoom' element) but would also fix some confusion that has come up in regular handling.

I'll re-title this accordingly...
Comment 11 Paul Webster CLA 2012-06-11 12:59:24 EDT
*** Bug 382275 has been marked as a duplicate of this bug. ***
Comment 12 Paul Webster CLA 2012-07-04 10:23:22 EDT
*** Bug 384026 has been marked as a duplicate of this bug. ***
Comment 13 Eric Moffatt CLA 2013-10-22 14:14:39 EDT
*** Bug 374461 has been marked as a duplicate of this bug. ***
Comment 14 Eric Moffatt CLA 2014-02-04 15:34:02 EST
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=14d3678339a4239fae4c399678144485af899c37

This refactors the addon to have two new methods (for symmetry):

getElementsToMinimize: Returns the elements that need to be minimized during a 'maximize'

getElementsToRestore: returns the list of elements that need to get restored on an 'unzoom'.

This lets do the following on a 'restore';

1) Find the maximized element (if any)
2) Check if there are any more elements that would restore on an unzoom using 'getElementsToRestore'
3) If there are no more elements to restore remove the MAXIMIZED tag from the currently maximized element.

Now if you open the Welcome and restore the minimized perspective stack if goes back to the expected 'standby' state...also works for maximized stacks.
Comment 15 Eric Moffatt CLA 2014-03-04 10:51:26 EST
Verified in 4.4.0.I20140303-2000.
Comment 16 Eric Moffatt CLA 2014-04-30 11:11:27 EDT
This was broken with the last change for bug 426424 which (by leaving the MINIMIZED_BY_ZOOM in place until an unzoom) made the original logic fail.
Comment 17 Eric Moffatt CLA 2014-04-30 11:11:50 EDT
Committed:

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8963e678092712041ab28f96b739ba455b58e3cc

This fixes the logic used to determine whether to auto-unzoom by explicitly seeing if there are any minimized stacks *in the trim*.
Comment 18 Eric Moffatt CLA 2014-05-01 10:01:22 EDT
Verified in 4.4.0.I20140501-0200.