Copilot commented on code in PR #43732:
URL: https://github.com/apache/superset/pull/43732#discussion_r3906602552


##########
superset-frontend/plugins/plugin-chart-partition/src/Partition.ts:
##########
@@ -73,18 +73,24 @@ interface IcicleProps {
 function init(root: PartitionNode): PartitionNode[] {
   const flat: PartitionNode[] = [];
   const dy = 1 / (root.height + 1);
-  let prev: PartitionNode | null = null;
+  // Tracks, per parent, how much of its [x, x+dx] band has already been
+  // claimed by earlier siblings -- so each child is always positioned

Review Comment:
   This change fixes a subtle layout bug; please add a Jest regression test 
that exercises the uneven-branching repro from #43727 and asserts each node’s 
[x, x + dx] stays within its parent’s band. The plugin already has Jest tests 
(e.g. transformProps.test.ts), but this layout logic isn’t currently covered, 
so it’s easy to reintroduce.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to