Skip to content

fix(react): keep selection handles aligned during transforms - #199

Draft
Sudhansh6 wants to merge 1 commit into
ChristopherVR:mainfrom
Sudhansh6:fix/core-create-missing-transform
Draft

fix(react): keep selection handles aligned during transforms#199
Sudhansh6 wants to merge 1 commit into
ChristopherVR:mainfrom
Sudhansh6:fix/core-create-missing-transform

Conversation

@Sudhansh6

@Sudhansh6 Sudhansh6 commented Sep 2, 2026

Copy link
Copy Markdown

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, and transform values to the matching data-pptx-handle-for host. The normal React state commit remains authoritative after pointer-up. Connector handles are unchanged because they remain nested in the element.

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Docs / tooling / CI only

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

  • Added drag and resize preview regressions that assert the element and detached overlay receive identical geometry.
  • Added a live rotation regression that asserts the element and detached overlay rotate together before pointer-up.
  • Focused React regressions: 4 files and 36 tests passed.
  • Full packages/react suite: 370 files and 6,629 tests passed.
  • React package typecheck passed.
  • Targeted oxfmt and oxlint checks passed.

Checks run locally

  • oxfmt --check on changed files
  • oxlint --deny-warnings on changed files
  • Focused React Vitest regressions
  • Full packages/react Vitest suite
  • packages/react typecheck

@github-actions github-actions Bot added the core Parsing, serialization, geometry (pptx-viewer-core) label Sep 2, 2026
@Sudhansh6
Sudhansh6 force-pushed the fix/core-create-missing-transform branch 3 times, most recently from 937b538 to ff8b796 Compare September 2, 2026 06:35
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>
@Sudhansh6
Sudhansh6 force-pushed the fix/core-create-missing-transform branch from ff8b796 to 4c48d96 Compare September 2, 2026 07:02
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Cross-binding parity check

This 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.

Binding This PR
React changed
Vue not changed
Angular not changed
Svelte not changed
Vanilla not changed

UI source changed in 1 of 5 bindings

Changed: 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 spec

Specs in e2e/ run against all five demos, so they are what stops a binding quietly falling behind. New UI features should add or extend one. Fixes covered by unit tests can skip this.


See the parity rule for what is expected. Missing: Vue, Angular, Svelte, Vanilla.

@github-actions github-actions Bot added react React binding (pptx-react-viewer) and removed core Parsing, serialization, geometry (pptx-viewer-core) labels Sep 2, 2026
@Sudhansh6 Sudhansh6 changed the title fix(core): create missing shape transforms fix(react): keep selection handles aligned during transforms Sep 2, 2026
@Sudhansh6

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

react React binding (pptx-react-viewer)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant