fix(react): keep selection handles aligned during transforms - #199
fix(react): keep selection handles aligned during transforms#199Sudhansh6 wants to merge 1 commit into
Conversation
937b538 to
ff8b796
Compare
Mirror imperative drag, resize, and rotate previews onto the stage-level selection-handle overlay. React state remains authoritative after pointer-up. Co-Authored-By: Codex <noreply@openai.com>
ff8b796 to
4c48d96
Compare
Cross-binding parity checkThis is advisory only and does not block the PR. It looks at changed file paths, so it cannot tell a genuinely framework-specific change from a parity gap. If it is wrong here, just say so in a comment.
UI source changed in 1 of 5 bindingsChanged: React. Not changed: Vue, Angular, Svelte, Vanilla. If this is a new UI feature, it needs to land in all five. If it is a fix, please confirm in the PR description whether the other bindings have the same defect, and fix the ones that do. If the change really is framework-specific, say so and this note can be ignored. Binding UI changed with no framework-neutral e2e specSpecs in See the parity rule for what is expected. Missing: Vue, Angular, Svelte, Vanilla. |
|
Confirmed this is React-specific. React renders selection handles in a detached stage-level overlay while drag, resize, and rotate previews imperatively update the element DOM until pointer-up; this PR mirrors those temporary geometry and transform values to that overlay. Vue, Angular, Svelte, and Vanilla instead patch their model or store on every preview frame and derive their overlay geometry reactively, so they do not share this defect. The fix is covered by focused React unit tests, so no cross-binding UI or framework-neutral e2e change is needed for this regression. |
What does this change?
React renders resize, rotate, and adjustment handles in a stage-level overlay so shape clip paths do not block their hit targets. Drag, resize, and rotate previews update the element DOM directly until pointer-up, but the sibling overlay kept its previous geometry. The shape therefore moved while its blue handles stayed behind, then the handles snapped into place on release.
This change mirrors the temporary
left,top,width,height, andtransformvalues to the matchingdata-pptx-handle-forhost. The normal React state commit remains authoritative after pointer-up. Connector handles are unchanged because they remain nested in the element.Type of change
Cross-binding parity
This is React-specific because the regression comes from the React binding moving selection handles into a detached stage-level overlay. Other bindings own their handle positioning independently.
Testing
packages/reactsuite: 370 files and 6,629 tests passed.Checks run locally
oxfmt --checkon changed filesoxlint --deny-warningson changed filespackages/reactVitest suitepackages/reacttypecheck