| Summary: | Move away from using hints (part 1) | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Konstantin Komissarchik <konstantin> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | shenxue.zhou |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Implemented. Verified the new properties using the purchase order sample. Used sdef editor. Closing. |
Using a generic bag of hints in sdef language to control important aspects of presentation hurts usability. It would be desirable to move away from using hints in favor of explicit properties. This is part 1 of that work. Also included here is general cleanup of API inconsistency issues. Covered hints: show.label show.label.above width height margin.left =================== The original "show.label = false" semantic was both to remove the label and cause the property editor body to stretch across both columns. In the new syntax, those two aspects are handled by separate switches. As such the following are equivalent: <hint> <name>show.label</name> <value>false</value> </hint> <show-label>false</show-label> <span>true</span> The new span property has the semantics of forcing the label above the property editor body, so a separate property for the old show.label.above hint is not required. The following are equivalent: <hint> <name>show.label.above</name> <value>true</value> </hint> <span>true</span> =================== The width and height hints are used for both property editors and composites, but with different units. In particular, the height hint in the context of a property editor was interpreted as 1 = 15 pixels. This inconsistency should be resolved by making all usage (regardless of context) be pixel based. For instance, the following are equivalent: <hint> <name>height</name> <value>5</value> </hint> <height>75</height> // 5 * 15 (only for property editor) =================== The margin.left hint used unit suffixes "px" (for pixel) and "u" (for unit - 20 pixels). This system should be dropped in favor of a basic number of pixels used elsewhere. The following are equivalent: <hint> <name>margin.left</name> <value>1u</value> </hint> <margin-left>20</margin-left> ===================