Bug 487430 - Improve compartment border management
Summary: Improve compartment border management
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.0.0M6   Edit
Assignee: Maxime Porhel CLA
QA Contact: Florian Barbin CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 488575
  Show dependency tree
 
Reported: 2016-02-08 04:37 EST by Axel Guckelsberger CLA
Modified: 2016-06-24 08:01 EDT (History)
3 users (show)

See Also:


Attachments
Margin in sample with ecore. (64.88 KB, image/png)
2016-02-08 08:37 EST, Maxime Porhel CLA
no flags Details
Margin on standard list container (36.11 KB, image/png)
2016-02-08 08:40 EST, Maxime Porhel CLA
no flags Details
Margin issues (129.91 KB, image/png)
2016-02-08 09:06 EST, Maxime Porhel CLA
no flags Details
Base screenshot (125.55 KB, image/png)
2016-02-08 09:06 EST, Maxime Porhel CLA
no flags Details
Margin issues (134.60 KB, image/png)
2016-02-26 05:25 EST, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Guckelsberger CLA 2016-02-08 04:37:07 EST
If a VStack container A contains a list container B the border of B is not considered properly. Thus list entries start directly at the border of A without any spacing.

Current workaround is introducing a Free form container X containing A. This leads to other problems though, as the alignment and width of B is not done automatically anymore.

So it would be great if the border handling of containers inside compartments could be considered.
Comment 1 Maxime Porhel CLA 2016-02-08 08:37:15 EST
Created attachment 259631 [details]
Margin in sample with ecore.

The issue can easily be reproduced with any existing diagram containing list compartments:
. get the compartiment test case /org.eclipse.sirius.tests.junit/data/unit/compartments
. Simply select a diagram element
. Select the "Style" property tab
. Set the label alignment to Left
. Set the Show icon property to false
> There is no margin between the text and the border in case of compartiments.

Compare the result with the Class list in EcoreTools.

The rendering is nearly ok with an ecore model as semantic model because ecore icons have a "margin", but the issue is visible as soon as you hide the icon. 

I think Axel had "full" icon with non transparent pixel anywhere in the 16x16 icon files. So he directly see the issue.
Comment 2 Axel Guckelsberger CLA 2016-02-08 08:39:08 EST
Also if the icons have some transparent margin the issue becomes visible if you want a wider margin (in my case 12-15 pixels).
Comment 3 Maxime Porhel CLA 2016-02-08 08:40:20 EST
Created attachment 259632 [details]
Margin on standard list container

I have attached an image taken from EcoreTools + left alignment and show icon set to false. 

It shows that the list items have a margin. 
But we might improve the list label rendering with a small margin between the label and the border.
Comment 4 Maxime Porhel CLA 2016-02-08 08:48:30 EST
Thanks for your detailed bug report.
We have reproduced this issue and we consider it as valid.
Nevertheless, we have currently not planned to work on it in the following releases.
Comment 5 Maxime Porhel CLA 2016-02-08 09:05:32 EST
It seems we should add some margin/insets between the border and the label of DNodeList/DNodeContainer. Same idea for list items in compartiments.
Comment 6 Maxime Porhel CLA 2016-02-08 09:06:19 EST
Created attachment 259633 [details]
Margin issues
Comment 7 Maxime Porhel CLA 2016-02-08 09:06:45 EST
Created attachment 259634 [details]
Base screenshot
Comment 8 Maxime Porhel CLA 2016-02-16 04:55:16 EST
(In reply to Maxime Porhel from comment #5)
> It seems we should add some margin/insets between the border and the label
> of DNodeList/DNodeContainer. Same idea for list items in compartiments.

There is two different issues: 
 . margin for label of DNodeContainer/DNodeList (as container, list or region): this en improvement as the label margin has always be like this, see Bug
 . margin for list items in regions/compartiments, it seems that the border of the list region viewport is not well configured compared to standard lists (see attachments).


This issue will now deals only with the list items margin.
The container/list/region label will be treated in Bug 487858.
Comment 9 Maxime Porhel CLA 2016-02-26 05:25:56 EST
Created attachment 259952 [details]
Margin issues
Comment 10 Eclipse Genie CLA 2016-02-29 06:01:58 EST
New Gerrit change created: https://git.eclipse.org/r/67530
Comment 13 Maxime Porhel CLA 2016-03-01 10:48:59 EST
List items now have the same margin whether they are contained in simple list or in a compartmentalized list.
Comment 14 Florian Barbin CLA 2016-05-24 05:57:05 EDT
Verified on Sirius 4.0.0.RC1
Comment 15 Pierre-Charles David CLA 2016-06-24 08:01:18 EDT
Available in Sirius 4.0.0.