Move cardToMiddle fix into the family-chart patch (+ document patches) #251

Merged
justin merged 1 commits from family-chart-patch-cardtomiddle into main 2026-06-11 09:21:32 -04:00
Owner

Folds the fly-to vertical-centering fix into our patch-package patch (next to the existing spouse-layout fix) rather than compensating in app code, and reverts the in-app workaround so they don't double-correct.

  • patch: cardToMiddle scales datum.y by the zoom k in both dist builds; verified it applies cleanly (patch-package --error-on-fail).
  • tree/page.tsx: caller passes raw y again (the patched lib scales it now). Math is identical to the prior in-app fix — both center exactly, so no behavior change.
  • CLAUDE.md: documents both family-chart patches, how to regenerate, and the upstreaming TODO. cardToMiddle fix submitted upstream (donatso/family-chart#103, issue #102); spouse-layout fix still to upstream.

Dockerfile already COPY patches before npm ci, so it's in the prod build.

🤖 Generated with Claude Code

Folds the fly-to vertical-centering fix into our `patch-package` patch (next to the existing spouse-layout fix) rather than compensating in app code, and reverts the in-app workaround so they don't double-correct. - **patch**: `cardToMiddle` scales `datum.y` by the zoom `k` in both dist builds; verified it applies cleanly (`patch-package --error-on-fail`). - **tree/page.tsx**: caller passes raw `y` again (the patched lib scales it now). Math is identical to the prior in-app fix — both center exactly, so no behavior change. - **CLAUDE.md**: documents both family-chart patches, how to regenerate, and the upstreaming TODO. cardToMiddle fix submitted upstream (donatso/family-chart#103, issue #102); spouse-layout fix still to upstream. Dockerfile already `COPY patches` before `npm ci`, so it's in the prod build. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
justin added 1 commit 2026-06-11 09:21:31 -04:00
Fold the fly-to vertical-centering fix into our patch-package patch (alongside
the existing spouse-layout fix) instead of compensating in app code, and revert
the in-app workaround so the two don't double-correct.

- patches/family-chart+0.9.0.patch: cardToMiddle now scales datum.y by the zoom
  k in both dist builds (.js + .esm.js), matching datum.x. Verified the patch
  applies cleanly (patch-package --error-on-fail).
- tree/page.tsx: the cardToMiddle caller passes raw y again (the patched library
  does the scaling now); pre-scaling here too would double-correct. Behavior is
  identical to the previous in-app fix — both center the node exactly.
- CLAUDE.md: documents the two family-chart patches, how to regenerate them, and
  that both should be upstreamed. The cardToMiddle fix is submitted upstream
  (donatso/family-chart#103, issue #102); the spouse-layout fix is a TODO.

The frontend Dockerfile already COPYs patches/ before npm ci, so the fix is in
the production build.

Signed-off-by: Justin Paul <justin@jpaul.me>
justin merged commit e745fb5d4d into main 2026-06-11 09:21:32 -04:00
justin deleted branch family-chart-patch-cardtomiddle 2026-06-11 09:21:32 -04:00
Sign in to join this conversation.