Inplace editing consolidation A: Bug-fixing
(MGNLUI-259)
|
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | design, tree/list |
| Affects Version/s: | 5.0 |
| Fix Version/s: | 5.0 |
| Type: | Sub-task | Priority: | Major |
| Reporter: | Mikaël Geljić | Assignee: | Mikaël Geljić |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Date of First Response: | |
| Sprint: | Iteration 2013-17, Beta 2 |
| Description |
|
Properties at root level have an offset that makes them look as if they were from the next level (cf. last three properties in attached screenshot) Sidenote to check: does it actually make sense to have properties on root node
|
| Comments |
| Comment by Andreas Weder [ 03/Dec/12 ] |
|
Added component(s) to make it easier to filter issues. |
| Comment by Mikaël Geljić [ 17/Dec/12 ] |
|
low-level cause: depth being incorrectly calculated to 1 for root properties. |
| Comment by Mikaël Geljić [ 17/Dec/12 ] |
|
root cause being server sending incorrect depth as 0 for non-property items under root node. JCR spec states that root node is 0 (which we never display in vaadin), first level is 1 for both subnodes and properties of the root node, and so on. HierarchicalJcrContainer#isRoot(Item item) is obviously wrong, despite I understand that the level should ultimately be lowered by 1 to set correct padding for 1st level nodes. At least the code of this method looks hardly understandable and introduces a difference between property level and node level. Such difference should not exist. public boolean isRoot(Item item) throws RepositoryException { if (!item.isNode()) { return false; } int depthOfRootNodesInTree = getRootNode().getDepth() + 1; return item.getDepth() <= depthOfRootNodesInTree; } |
| Comment by Federico Grilli [ 21/Dec/12 ] |
|
Reopened after review. |
| Comment by Mikaël Geljić [ 21/Dec/12 ] |
|
Fixed test methods case in |