Keep rotated PPTX shapes inside their group's bbox#259
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When PowerPoint / Google Slides emit a `<p:grpSp>` containing a shape with its own `<a:xfrm rot>`, the group's `<a:chExt>` is sized for the **rotated visual** bbox of the children, not the unrotated `<a:ext>` of each child. The previous importer applied the group's per-axis scale directly to the child's unrotated `w`/`h` and ignored `frame.rotation`, which works for 0°/180° rotations but visually misshapes 90°/270° (and any non-axis-aligned) children — they end up scaled along the wrong axes and overflow the group. On slide 7 of a real deck, a 90°-rotated `rightArrowCallout` ended up ~503 px tall in a ~295 px slot, breaching the rectangle above it. `applyGroupTransform` now solves a 2×2 linear system to find new `(w', h')` such that the rotated rectangle's visual bbox matches the pre-import visual bbox scaled per-axis. Uniform-scale / zero-rotation cases short-circuit to the prior `w*scaleX`, `h*scaleY` and preserve existing numerical behaviour. Singular determinants (45° + k·90°) and the negative-w'/h' regime (off-axis with sufficiently mismatched scale) fall back to per-axis scaling — no rotated rectangle can satisfy both visual extents in those cases. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fbb787a to
3c7b73d
Compare
Verification: verify:selfResult: ✅ PASS in 211.8s
Verification: verify:integrationResult: ✅ PASS |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
These seven slides + PPTX tasks shipped (PRs #238, #240, #241, #255, #259, #260, #261) but their checklist boxes were never ticked during execution, so the archive script left them in active/. Sweep the checkboxes to reflect what actually landed, add lessons files for the two that were missing (keyboard-shortcuts, presentation-mode), and convert the keyboard-shortcuts onLinkRequest popover bullet from a checkbox to a "Deferred (follow-up)" note so the gate stops blocking on work that is intentionally out of scope. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary
applyGroupTransformpreviously scaled a child's unrotatedw/hby the group's per-axis scales and ignoredframe.rotation. For shapes with their own rotation living inside a<p:grpSp>whosechExtis sized for the rotated visual bbox (the standard PowerPoint / Google Slides emission), this produced shapes that overflowed their group. On slide 7 of a real customer deck, a 90°-rotatedrightArrowCalloutrendered ~503 px tall in a ~295 px slot and breached the rectangle above it.(w', h')such that the rotated rectangle's visual bbox matches the pre-import visual bbox scaled per-axis. Uniform-scale and zero-rotation cases short-circuit to the priorw*scaleX,h*scaleY(preserves all prior numerical behaviour). Singular determinants (45° + k·90°) and the negative-w'/h' regime (off-axis with sufficiently mismatched scale) fall back to per-axis scaling.See
docs/tasks/active/20260517-pptx-rotated-child-group-scale-todo.mdand…-lessons.mdfor the full root-cause derivation and review-pass takeaways.Test plan
pnpm verify:fastgreen (frontend 1268, slides 1006, backend 191, docs 792 tests).Yorkie, 캐즘 뛰어넘기.pptx, verify slide 7 arrow now fits inside its enclosing group. (Strong analytical evidence already in the 90° unit test, which uses the exact EMU values from slide 7.)🤖 Generated with Claude Code