Bug 197056 - [Schema][Editors] Move attribute "use" field "deprecated" field
Summary: [Schema][Editors] Move attribute "use" field "deprecated" field
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-07-18 19:28 EDT by Mike Pawlowski CLA
Modified: 2007-07-22 18:30 EDT (History)
1 user (show)

See Also:
mike.pawlowski: review? (mike.pawlowski)


Attachments
set uniform size for elements and attributes only (11.11 KB, patch)
2007-07-19 20:55 EDT, Adam Archer CLA
no flags Details | Diff
set uniform size for all detail pages (13.52 KB, patch)
2007-07-19 20:57 EDT, Adam Archer CLA
no flags Details | Diff
set uniform size only for attribute detail pages (7.96 KB, patch)
2007-07-19 20:58 EDT, Adam Archer CLA
no flags Details | Diff
move the field but do not use the hack (6.86 KB, patch)
2007-07-19 20:59 EDT, Adam Archer CLA
no flags Details | Diff
does not put the default field beside the use field (1.50 KB, patch)
2007-07-19 21:00 EDT, Adam Archer CLA
no flags Details | Diff
modified version of comment 2 patch (11.11 KB, patch)
2007-07-19 21:51 EDT, Adam Archer CLA
no flags Details | Diff
secret weapon #2 (13.55 KB, patch)
2007-07-19 22:56 EDT, Adam Archer CLA
no flags Details | Diff
secret weapon #2.1 (13.58 KB, patch)
2007-07-19 23:00 EDT, Adam Archer CLA
no flags Details | Diff
secret weapon #2.2 (13.61 KB, patch)
2007-07-19 23:15 EDT, Adam Archer CLA
no flags Details | Diff
final version (13.62 KB, patch)
2007-07-19 23:25 EDT, Adam Archer CLA
no flags Details | Diff
synchronized patch (13.72 KB, patch)
2007-07-22 18:07 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pawlowski CLA 2007-07-18 19:28:20 EDT
If you create attributes of different types and navigate between them in the tree viewer, the "use" field floats up and down.  I recommend moving the "use" field under the "deprecated" field so it never moves (regardless of attribute type).
Comment 1 Adam Archer CLA 2007-07-19 20:52:19 EDT
I have taken some artistic license with this bug and moved the default field up beside the use ComboBox.

Removing the "Default Value:" label exposed a layout issue with the details pages. The size of the label column on the GridLayout for each page depends on the size of the largest label. This means that the alignment of the fields jumps all over the place as you select different attribute types or different schema object types. The problem is already visible between SchemaElementDetails and SchemaRootElementDetails without any changes.

I came up with a way to make the alignment uniform, but it is not the prettiest code in the world. The fix is a bit of a hack. I think there are a number of different ways to go on this and I'm going to upload several alternative patches now.
Comment 2 Adam Archer CLA 2007-07-19 20:55:47 EDT
Created attachment 74203 [details]
set uniform size for elements and attributes only

Does not set the size of compositor and reference detail label widths as these pages are significantly different.
Comment 3 Adam Archer CLA 2007-07-19 20:57:28 EDT
Created attachment 74204 [details]
set uniform size for all detail pages

This one has a minor bug in which the compositor and reference labels are narrower than the rest for some reason (even though it's whole purpose was to set their size also). The patch should give a rough idea though.
Comment 4 Adam Archer CLA 2007-07-19 20:58:19 EDT
Created attachment 74205 [details]
set uniform size only for attribute detail pages

This localizes the messy fix to one file and makes the problem as subtle as it was before.
Comment 5 Adam Archer CLA 2007-07-19 20:59:13 EDT
Created attachment 74206 [details]
move the field but do not use the hack

This moves the default field beside the use field as with all the others but lets the details pages have whatever label size is calculated for them. The problem is most evident with this patch.
Comment 6 Adam Archer CLA 2007-07-19 21:00:16 EDT
Created attachment 74207 [details]
does not put the default field beside the use field

This is the bare minimum to resolve this bug. Just moves the use and default fields above type as requested.
Comment 7 Adam Archer CLA 2007-07-19 21:01:37 EDT
My favourites are the patch from comment 2 and from comment 4 in that order.   ;)
Comment 8 Wassim Melhem CLA 2007-07-19 21:35:00 EDT
I like the patch in comment 6.

Putting the default text field without a label next to the combo box is too busy and a bit confusing on what the field is supposed to represent.
Comment 9 Adam Archer CLA 2007-07-19 21:51:51 EDT
Created attachment 74213 [details]
modified version of comment 2 patch

I have one last secret weapon to not have my efforts be in vain. What do you think?
Comment 10 Wassim Melhem CLA 2007-07-19 22:09:15 EDT
I had thought about that, but since 'default' is the least common option, most of the time we end up with a combo box that is inexplicably smaller than the one under it.
Comment 11 Adam Archer CLA 2007-07-19 22:56:11 EDT
Created attachment 74215 [details]
secret weapon #2

How about now?
Comment 12 Adam Archer CLA 2007-07-19 23:00:42 EDT
Created attachment 74216 [details]
secret weapon #2.1

Fixes a focus problem.
Comment 13 Adam Archer CLA 2007-07-19 23:15:44 EDT
Created attachment 74217 [details]
secret weapon #2.2

Fixes one edge case where the default value field is not shown even when default is selected.
Comment 14 Wassim Melhem CLA 2007-07-19 23:20:53 EDT
I like it.  I like it a lot.

Can we replace the "(default)" text with "Enter default value"?
Comment 15 Adam Archer CLA 2007-07-19 23:25:34 EDT
Created attachment 74220 [details]
final version

Changes the default text to "Enter default value".
Comment 16 Wassim Melhem CLA 2007-07-22 01:32:57 EDT
After applying the patch for bug 196882, this patch does not apply cleanly any more.  
Comment 17 Adam Archer CLA 2007-07-22 18:07:58 EDT
Created attachment 74315 [details]
synchronized patch
Comment 18 Wassim Melhem CLA 2007-07-22 18:30:39 EDT
Released patch.  Thanks Adam.