bito-code-review[bot] commented on PR #44601:
URL: https://github.com/apache/superset/pull/44601#issuecomment-5810468859

   <!-- Bito Reply -->
   The flagged issue is correct. The logic error occurs because when `rowLimit` 
is greater than one, the `x` position calculation relies on calendar week 
numbers rather than the index within the block's cell list. This causes cells 
from different months (or years) that happen to share the same week number to 
overlap in the same column.
   
   The fix implemented in the PR correctly updates the `x` position function to 
use the list index `i` instead of the calendar week number, ensuring each cell 
is placed in a unique column within its block. The PR also includes a 
regression test to verify that all cells in a month block have distinct 
positions.
   
   **superset-frontend/plugins/plugin-chart-calendar/src/vendor/cal-heatmap.ts**
   ```
   // Position by index within the block's own cell list rather
                 // than by a week-number difference against the cell's own
                 // month: a month block also renders the tail (or head) of an
                 // adjacent month's week, and that borrowed cell's "own month"
                 // is not the block it is being drawn into.
                 return Math.floor(i / self._domainType.week.row(d));
   ```


-- 
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