Skip to content

fix(figma): don't take a motion key from the tail of a longer name - #6810

Open
MoonPointer-Byte wants to merge 1 commit into
heygen-com:mainfrom
MoonPointer-Byte:fix/motion-key-word-boundary
Open

MoonPointer-Byte wants to merge 1 commit into
heygen-com:mainfrom
MoonPointer-Byte:fix/motion-key-word-boundary

Conversation

@MoonPointer-Byte

Copy link
Copy Markdown

Summary

  • y was matching the last letter of opacity, so a layer that fades and moves copied the opacity values and timing onto the y track.
  • Key lookup now requires the character before the name to not be part of an identifier. The same guard is on the array, scalar, and {...} lookups.
  • Added a test where opacity and y are animated together.

Fixes #6756

Test plan

  • pnpm exec vitest run packages/core/src/figma/motionContextToDocs.test.ts

Looking up y matched the y in opacity, so a fade and a rise copied the opacity track onto y.

Fixes heygen-com#6756

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 82696b7c37e5c2bc87b6c918ea94b3dcd70c7752.

Thanks, this fixes the same suffix-key collision as #6800. I reviewed both and prefer #6800's shared key matcher because it also handles whitespace around the property-object colon. I have approved that implementation. I'd merge one and then close the other as duplicate, rather than land two overlapping fixes. Your focused suite passed 8 tests; no live Figma import was run.

Need: yes · Size: ok · Reuse: existing shared implementation · Simpler: avoid parallel paths · Structure: fine
Risk: low - overlapping parser fixes.

Verdict: COMMENT
Reasoning: The next action above remains before a new approval.

Reasoning: Thanks, this fixes the same suffix-key collision as #6800. I reviewed both and prefer #6800's shared key matcher because it also handles whitespace around the property-object colon. I have approved that implementation. I'd merge one and then close the other as duplicate, rather than land two overlapping fixes. Your focused suite passed 8 tests; no live Figma import was run.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has had no activity for 14 days, so it is marked stale and will close in 7 days. Push a commit or leave a comment to keep it open. A maintainer can add keep-open to exempt it.

@github-actions github-actions Bot added the stale label Nov 14, 2026

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

motionContextToDocs: y track copies opacity when a node animates both (key lookup has no word boundary)

2 participants