diff --git a/packages/widgets/src/calendar/calender-day.tsx b/packages/widgets/src/calendar/calender-day.tsx index 650356d2c..c53134fee 100644 --- a/packages/widgets/src/calendar/calender-day.tsx +++ b/packages/widgets/src/calendar/calender-day.tsx @@ -22,6 +22,36 @@ export const CalendarDay = ({ date, events, disabled, rootHeight, rootWidth }: C const shouldScaleDown = minAxisSize < 350; const isSmall = rootHeight < 256; + const cell = ( + + + {date.getDate()} + + + + ); + + // Mantine mounts a HoverCard's Popover machinery — Popover, PopoverTarget and PopoverDropdown — + // even when it is disabled. A month grid is around 42 cells, and `disabled` is + // `isEditMode || eventsForDate.length === 0`, so on a typical month most days, and in edit mode + // every day, mounted three components for a card that can never open. Measured on a real board: + // 42 Popovers, 42 PopoverDropdowns and 42 PopoverTargets, 126 of this widget's 171 + // listener-attaching components, in a widget with only 251 DOM nodes. + if (disabled) return cell; + return ( - - - - {date.getDate()} - - - - + {cell}