From 0e529be789caf16e73f3e2ee77f52e243841aef4 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Mon, 3 Nov 2025 08:46:29 -0600 Subject: [PATCH] fix: reduce padding to minimize gap below last bead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use asymmetric padding to crop tighter to the active bead region: - Top: 8px (some breathing room above) - Bottom: 2px (minimal gap below last bead) - Sides: 5px This eliminates the visible gap of column post structure below the last active bead while maintaining clean spacing above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/web/scripts/generateDayIcon.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/web/scripts/generateDayIcon.tsx b/apps/web/scripts/generateDayIcon.tsx index bb5d73fe..80a15996 100644 --- a/apps/web/scripts/generateDayIcon.tsx +++ b/apps/web/scripts/generateDayIcon.tsx @@ -128,12 +128,15 @@ svgContent = svgContent.replace(/\s*!important/g, '') // Calculate bounding box including posts, bar, and active beads const bbox = getAbacusBoundingBox(svgContent, 1.8, 2) -// Add padding around active beads (in abacus coordinates) -const padding = 10 -const cropX = bbox.minX - padding -const cropY = bbox.minY - padding -const cropWidth = bbox.maxX - bbox.minX + padding * 2 -const cropHeight = bbox.maxY - bbox.minY + padding * 2 +// Add minimal padding around active beads (in abacus coordinates) +// Less padding below since we want to cut tight to the last bead +const paddingTop = 8 +const paddingBottom = 2 +const paddingSide = 5 +const cropX = bbox.minX - paddingSide +const cropY = bbox.minY - paddingTop +const cropWidth = bbox.maxX - bbox.minX + paddingSide * 2 +const cropHeight = bbox.maxY - bbox.minY + paddingTop + paddingBottom // Calculate scale to fit cropped region into 96x96 (leaving room for border) const targetSize = 96