8000 perf!: run the generated entrance on the compositor by morellodev · Pull Request #316 · awesome-reveal/awesome-reveal · GitHub
[go: up one dir, main page]

Skip to content

perf!: run the generated entrance on the compositor - #316

Merged
morellodev merged 2 commits into
nextfrom
perf/composited-entrance
Oct 15, 2026
Merged

morellodev merged 2 commits into
nextfrom
perf/composited-entrance

Conversation

@morellodev
@morellodev morellodev commented Oct 15, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

The default from entrance stuttered when the main thread was busy. A Chromium trace showed the cause. Every generated keyframe used composite: "add", and Chromium does not composite an effect that has an additive keyframe (kEffectHasNonReplaceCompositeMode). The fade and the move both ran on the main thread.

The generated entrance now uses only replace keyframes, with explicit neutral end values. It still has no implicit keyframes.

Keyframes (Chromium trace) Compositor
Earlier default (additive translate and opacity end) No: compositeFailed: 16
Replace translate, additive opacity end No: 16
All replace Yes
All replace, element has its own transform Yes
Replace scale and rotate Yes
Replace blur No: 4096 (kFilterRelatedPropertyMayMovePixels)

Trade-off:

  • The element's own transform still applies.
  • While the element waits and during the entrance, the element's own values of the properties that the start state sets do not apply. These properties are translate, scale, rotate, filter and opacity.
  • A fade ends at opacity 1, then the element's own opacity applies.
  • Core does not read the element's own values with getComputedStyle. reveal.css forces opacity: 0, and a read forces a style recalculation for each target.

Doc changes:

  • The core README, the four adding-reveal-animations skills and the core rule describe the new behavior and the blur cost.
  • The core browser minimum goes down to Chrome 104, Edge 104, Firefox 74 and Safari 14.1 (iOS 14.5). The generated entrance no longer uses composite, which set Firefox 80 and Safari 16. The individual transform properties now set the Chrome and Safari minimums. Optional chaining in the esnext output sets the Firefox minimum. The versions come from BCD and web-features, not from a test run. A native keyframe with composite still needs Firefox 80 or Safari 16, and the README says so.

Checklist

  • The PR targets the next branch.
  • The PR title follows Conventional Commits. A breaking change has ! and a BREAKING CHANGE: footer.
  • Tests cover the change.
  • A change to an option, a default or an export also updates the READMEs, the consumer skills and the examples. (The examples need no change: the tilted card animates only translate and opacity, so it keeps its own rotate.)

BREAKING CHANGE: the generated entrance replaces the element's own values of the properties that the start state sets (translate, scale, rotate, filter, opacity) while the element waits and during the entrance, and ends at their neutral values, so a fade now ends at opacity 1. The element's own transform still applies. To keep one of these values during the entrance, put it on an inner element or use native keyframes.

BREAKING CHANGE: the generated entrance replaces the element's own values of the properties that the start state sets (translate, scale, rotate, filter, opacity) while the element waits and during the entrance, and ends at their neutral values, so a fade now ends at opacity 1. The element's own transform still applies. To keep one of these values during the entrance, put it on an inner element or use native keyframes.
@morellodev
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Oct 15, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T11:17:13.860385Z 0ca8c7b Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 0ca8c7b47b

ℹ️ 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 thread packages/core/src/animation.ts Resolved
@morellodev
morellodev merged commit 2264119 into next Oct 15, 2026
18 checks passed
@morellodev
morellodev deleted the perf/composited-entrance branch October 15, 2026 11:26
@morellodev morellodev mentioned this pull request Oct 15, 2026
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

0