Skip to content

Restore Show Animation in instance details - #35

Merged
ralphhanna merged 1 commit into
mainfrom
fix/instance-animation-20260927
Sep 27, 2026
Merged

ralphhanna merged 1 commit into
mainfrom
fix/instance-animation-20260927

Conversation

@ralphhanna

@ralphhanna ralphhanna commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Restore instance replay by loading GSAP and MotionPathPlugin once from a local dependency, creating a fresh paused timeline for each click, targeting the actual first BPMN element, and guarding missing diagram items.

Verification before merge: npm run build, 27 client tests, 13 unit tests, and git diff --check passed. Deployment needs npm ci for the new GSAP dependency.

Browser tests were added separately in follow-up PR #36 after this PR merged.

@ralphhanna
ralphhanna merged commit fc3d619 into main Sep 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f201310634

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +149 to +150
if (tl) tl.kill();
document.querySelectorAll('[data-moving-dot]').forEach(dot => dot.remove());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Revert active effects before restarting the replay

When Show Animation is clicked again before the previous effects have settled, tl.kill() only cancels animations and callbacks owned by this timeline. The callbacks in animateFlow, activateTask, and endAnimation launch independent gsap.to tweens, including a 10-second fill tween, and killing a partially progressed first-element tween does not restore its original transform. Those effects can therefore continue modifying the diagram during the new replay or leave the first node enlarged; track these tweens in the timeline/a GSAP context and revert or kill them before resetting the state.

Useful? React with 👍 / 👎.

Comment on lines +13 to 15
script(src="/vendor/gsap/gsap.min.js")
script(src="/vendor/gsap/MotionPathPlugin.min.js")
script(src="/javascripts/SVGHelper.js")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Version the changed SVGHelper asset

On deployments that replace an existing release, returning browsers can continue using the old /javascripts/SVGHelper.js: the public static mount in src/app.ts assigns a one-year max-age, while this head still references the helper through the same unversioned URL. Such clients load the new local GSAP files but retain the pre-fix helper, so the animation restoration may not reach them until cache expiry or a hard refresh; fingerprint or version the helper URL when shipping these changes.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant