Community
Participate
Working Groups
Created attachment 210377 [details] Screenshot from Examples Demo Steps to reproduce: 1. Start Examples Demo 2. Go to TreeViewer page 3. Double-click on an item (first column) to activate the cell editor. Cell editor is shifted to the right (5-6px) and the cell content shines below. If you remove the item image cell editor is positioned correctly.
When I investigated this, two questions came to my mind: 1. Why Tree-Cell and Table-Cell spacing and padding differ in the default theme? Nick, is there a reason not to make them equals (like in Table-Cell for example)? 2. There is a comment in Tree#getImageOffset that left padding is ignored for the tree column. Tim, any specific reason for this? Removing the check for isTreeColumn solves the problem.
Created attachment 210854 [details] Tree-Cell spacing fix
Hi Ivan, no actually it was not intended to have different spacing in Tree-Cell and Table-Cell. I have attached a patch that fixes the theme.
(In reply to comment #2) > Created attachment 210854 [details] > Tree-Cell spacing fix Probably you have to fix the theming test (Tree.test.css) as well ;-)
oh...of course :)
Created attachment 210855 [details] Tree-Cell spacing fix including fixed Tree.test.css
Nick, thanks for that patch. As this patch is masking the actual problem (waiting Tim to gives his opinion on comment#1 point 2 - real solution) I will apply it afterwards.
The missing padding was implemented because thats the way the classic tree theming needed it to look right. Classic Theme is no longer supported (?), but the arrow icons used in current theme "include" the padding already, so would need to be adjusted when this behavior is changed.
After discussion with Tim we agreed to keep the ignorance of left padding for tree column in Tree#getImageOffset (used to position the image on the client). To align with it, TreeItem#getImageBounds adjusted to ignore the left padding for tree column too. With this change cell editors are position correctly. Applied Nick's patch too.