| Summary: | The "Initial Column Header Width" properties is not taken into account and does not allow hiding the header column | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Nathalie Lepine <nathalie.lepine> | ||||||||
| Component: | Table | Assignee: | Jessy Mallet <jessy.mallet> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | julien.dupont, pierre-charles.david | ||||||||
| Version: | unspecified | Keywords: | triaged | ||||||||
| Target Milestone: | 6.1.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| See Also: |
https://git.eclipse.org/r/85430 https://git.eclipse.org/r/128708 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=317db527f7ea3bb2d9067518848c7ad4adbc3873 https://git.eclipse.org/r/129415 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ce314a05de094bd73d714a3be11ec91636815647 |
||||||||||
| Whiteboard: | backport | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Nathalie Lepine
Created attachment 265493 [details]
Sample project to reproduce the bug
Steps to reproduce:
1. Import the attached project. It defines a simple table with InitialHeaderColumnWidth set to 500.
2. Open the session and create a table on the top-level package.
The table's header column has a small width, wich corresponds to auto-sizing according to the labels' sizes.
Note that even if we take the width into account, the current code which uses it on the UI side considers that a width of "0" means "auto-size", *not* "hide the header". We'll need to allow for negative sides (for example) to explicitly request hiding the header (which is the original request afaict). I have a small patch which needs some cleanup before posting. It seems to work at first glance, but more work is needed to ensure it does not cause any regression. New Gerrit change created: https://git.eclipse.org/r/85430 Created attachment 265494 [details] Table header with various initial widths The attached screenshot shows the initial state of newly created table with 3 different settings for the initialHeaderColumnWidth property, using the first draft of the patch (https://git.eclipse.org/r/85430): * width=500: any strictly positive number is interpreted as an explicit size to set, in pixels; * width=0: interpreted as "auto-size", the size is computed to fit all the labels (it seems this is buggy, at least under Linux; it looks like the width computation does not take the label's icon into account); * width=-1: this was not possible to set before, but with the patch it can be set. Interpreted as "hide the header column". I'm putting this in 4.1.2, but with relatively low priority. It may slip to a later version if we don't have enough time to review and test the initial patch in time. While the initial patch *seems* to work when testing manually for a few seconds, we won't have time to actually make sure it works in all cases, does not cause any regression, document it, etc. in the timeframe for 4.1.2. Moving to 5.0, with the "backport" keyword. Depending on when it is fixed in the 5.0, we may include it in a later 4.1.x maintenance version. New Gerrit change created: https://git.eclipse.org/r/128708 Gerrit change https://git.eclipse.org/r/128708 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=317db527f7ea3bb2d9067518848c7ad4adbc3873 Fixed by 317db527f7ea3bb2d9067518848c7ad4adbc3873 New Gerrit change created: https://git.eclipse.org/r/129415 Gerrit change https://git.eclipse.org/r/129415 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ce314a05de094bd73d714a3be11ec91636815647 To validate : 1. Import the attached project call validateHeader. It defines a simple edition table and cross Table with InitialHeaderColumnWidth set to 200. 2. Open the session and create both table on the top-level package. --> Check header column is the same on both tables and are bigger than its content. 3. Open VSM called tables.odesign. 4- From VSM, on testEditionTable representation and "Advanced" tab, change initial column width from 200 to 50. Redo for testCrossTable representation. --> Check header column is the same on both tables and smaller than previously (all column content is not displayed because of small size of column) 5- From VSM, on testEditionTable representation and "Advanced"tab, change initial column width from 50 to 0. Redo for testCrossTable representation. --> Check header column is auto-size with the column content. 6- From VSM, on testEditionTable representation and "Advanced"tab, change initial column width from 0 to -1. Redo for testCrossTable representation. --> check header column disappear on Edition Table whereas it is still auto-size for crossTable. Check also on Edition Table that you resize manually (cursor juste before "Name") the header column to make it visible. Created attachment 275848 [details]
Sample to validate.
Available in Sirius 6.1.0, see https://wiki.eclipse.org/Sirius/6.1.0 |