Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359839 - Empty palette compartment is shown when a node becomes invisible
Summary: Empty palette compartment is shown when a node becomes invisible
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Shenxue Zhou CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 10:07 EDT by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:22 EST (History)
0 users

See Also:


Attachments
With node/connection compartments (35.98 KB, image/png)
2012-05-17 16:52 EDT, Konstantin Komissarchik CLA
no flags Details
Without node/connection compartments (32.36 KB, image/png)
2012-05-17 16:54 EDT, Konstantin Komissarchik CLA
no flags Details
Palette with connection and node group collapsed (28.43 KB, image/png)
2012-05-18 13:07 EDT, Shenxue Zhou CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-10-04 10:07:02 EDT
When using visible-when facility on diagram nodes, there will be cases where all nodes/connections in a palette compartment are hidden. The compartment currently remains present. Would be better if an empty compartment was never shown. That is, show/hide the compartments as necessary.

Same repro steps Bug 354523.
Comment 1 Konstantin Komissarchik CLA 2011-11-02 22:10:08 EDT
Bulk deferral of diagram-related items to the 0.5 release.
Comment 2 Shenxue Zhou CLA 2012-05-17 16:40:27 EDT
If no node is visible, we'll not create the connection compartment either.
Comment 3 Konstantin Komissarchik CLA 2012-05-17 16:51:12 EDT
There is a presentation problem when no node/connection compartments are shown. Will attach screenshots.
Comment 4 Konstantin Komissarchik CLA 2012-05-17 16:52:46 EDT
Created attachment 215817 [details]
With node/connection compartments
Comment 5 Konstantin Komissarchik CLA 2012-05-17 16:54:27 EDT
Created attachment 215818 [details]
Without node/connection compartments

I expect to not see the gray in the palette like that. Does the palette need to be reflowed or something when this change happens?
Comment 6 Shenxue Zhou CLA 2012-05-18 13:07:29 EDT
Created attachment 215866 [details]
Palette with connection and node group collapsed
Comment 7 Shenxue Zhou CLA 2012-05-18 13:14:05 EDT
(In reply to comment #5)
> Created attachment 215818 [details]
> Without node/connection compartments
> 
> I expect to not see the gray in the palette like that. Does the palette need to
> be reflowed or something when this change happens?

I just attached an image showing the palette with both Connections and Objects group collapsed. You'll see the gray there. This seems to be how GEF renders its palette.

I could not find a way to access the parent composite of the palette. So no way to call its "layout()".

Maybe we should render the palette with both the connections and objects group collapsed when no node is visible just like the screen capture?
Comment 8 Konstantin Komissarchik CLA 2012-05-18 13:15:42 EDT
> Maybe we should render the palette with both the connections and objects group
> collapsed when no node is visible just like the screen capture?

How is that different from where we started?
Comment 9 Shenxue Zhou CLA 2012-05-18 13:18:50 EDT
(In reply to comment #8)
> > Maybe we should render the palette with both the connections and objects group
> > collapsed when no node is visible just like the screen capture?
> 
> How is that different from where we started?

Our starting point was both groups are open but the Objects group is empty and the Connections group has an item which is not usable.

What I'm proposing here is to have two empty groups in collapsed state.
Comment 10 Konstantin Komissarchik CLA 2012-05-18 13:31:36 EDT
Do you have a screen shot of this?

Showing empty/unnecessary compartments is far from ideal. It is just noise. Let's spend some more time trying to fix this properly.
Comment 11 Konstantin Komissarchik CLA 2012-05-18 13:36:47 EDT
Just noticed that collapsing all compartments shows gray at the bottom. So this isn't a layout issue. It is ugly, but appears to be how the palette is designed to work. 

Accepting the current state as the resolution of this bug.

Please file a bug on GEF requesting white background instead of gray when compartments are collapsed.
Comment 12 Shenxue Zhou CLA 2012-05-18 13:48:37 EDT
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380007 tracks the GEF palette issue.