Skip to content

fix(compiler-vapor): propagate component root through Transition - #15275

Merged
edison1105 merged 1 commit into
minorfrom
edison/issue-15274
Aug 12, 2026
Merged

edison1105 merged 1 commit into
minorfrom
edison/issue-15274

Conversation

@edison1105

@edison1105 edison1105 commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Close #15274

Treat a root Transition as transparent when determining its single-root child so fallthrough class and style bindings use root merging.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed class merging for components whose root content is wrapped in a transition.
    • Preserved static classes while correctly applying initial and reactive external and internal class updates.
  • Tests

    • Added regression coverage for transition-wrapped child roots and dynamic class updates.

Treat a root Transition as transparent when determining its single-root
child so fallthrough class and style bindings use root merging.
@edison1105 edison1105 added the scope: vapor related to vapor mode label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03858e44-9ef7-43d3-8722-2d24ceb3fb43

📥 Commits

Reviewing files that changed from the base of the PR and between 75a5f74 and 3996115.

⛔ Files ignored due to path filters (1)
  • packages/compiler-vapor/__tests__/transforms/__snapshots__/TransformTransition.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • packages/compiler-vapor/src/transform.ts
  • packages/runtime-vapor/__tests__/components/Transition.spec.ts

📝 Walkthrough

Walkthrough

Vapor single-root detection now treats transition nodes like template elements. A regression test verifies that transition-wrapped roots preserve static and internal classes while merging parent fallthrough classes during initial and reactive updates.

Changes

Vapor Transition Class Handling

Layer / File(s) Summary
Recognize transition nodes as single roots
packages/compiler-vapor/src/transform.ts
The compiler imports isTransitionNode and includes transition nodes in single-root child detection.
Validate transition root class merging
packages/runtime-vapor/__tests__/components/Transition.spec.ts
The regression test checks initial and reactive merging of external and internal classes while retaining the static root class.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • vuejs/core#14606: Updates Vapor Transition single-child and template handling.

Suggested labels: scope: transition

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the compiler fix for propagating a component root through Transition.
Linked Issues check ✅ Passed The compiler change and regression test address issue #15274 by preserving and merging external and internal classes through Transition.
Out of Scope Changes check ✅ Passed All reviewed changes support the Transition root handling fix and its regression coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edison/issue-15274

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15275
npm i https://pkg.pr.new/@vue/compiler-core@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15275
npm i https://pkg.pr.new/@vue/compiler-dom@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15275
npm i https://pkg.pr.new/@vue/compiler-sfc@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15275
npm i https://pkg.pr.new/@vue/compiler-ssr@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15275
npm i https://pkg.pr.new/@vue/compiler-vapor@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15275
npm i https://pkg.pr.new/@vue/reactivity@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15275
npm i https://pkg.pr.new/@vue/runtime-core@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15275
npm i https://pkg.pr.new/@vue/runtime-dom@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15275
npm i https://pkg.pr.new/@vue/runtime-vapor@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15275
npm i https://pkg.pr.new/@vue/server-renderer@15275
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15275
npm i https://pkg.pr.new/@vue/shared@15275
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15275
npm i https://pkg.pr.new/vue@15275
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15275
npm i https://pkg.pr.new/@vue/compat@15275
yarn add https://pkg.pr.new/@vue/[email protected]

commit: 3996115

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.4 kB 30.6 kB 27 kB
runtime-dom.global.prod.js 116 kB 43.5 kB 39 kB
vue.global.prod.js 176 kB 63.6 kB 56.7 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 52.6 kB 20.5 kB 18.7 kB
createApp 61.7 kB 23.8 kB 21.7 kB
createApp + vaporInteropPlugin 115 kB 41.5 kB 37.2 kB
createVaporApp 29.2 kB 11.4 kB 10.5 kB
createSSRApp 66.7 kB 25.9 kB 23.4 kB
createVaporSSRApp 34.5 kB 13.2 kB 12.1 kB
defineCustomElement 68.4 kB 25.9 kB 23.5 kB
defineVaporCustomElement 45.1 kB 16.5 kB 15.1 kB
overall 77 kB 29.3 kB 26.5 kB

@edison1105
edison1105 merged commit 0a65e60 into minor Aug 12, 2026
14 checks passed
@edison1105
edison1105 deleted the edison/issue-15274 branch August 12, 2026 01:28
Mini-Sylar added a commit to Mini-Sylar/vael-ui that referenced this pull request Aug 16, 2026
Also bumps motion-v, shiki, vue-tsc/vue-component-type-helpers/
vue-component-meta, and commitlint/oxlint/typescript-eslint patch
releases. Updates the vapor class-merge regression test now that
vuejs/core#15275 (fixed upstream in rc.4) resolves the Transition-wrapped
external-class bug the workaround pattern was covering for.
zhiyuanzmj added a commit to vuejs/vue-jsx-vapor that referenced this pull request Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vapor: <Transition> overwrites a wrapped component's own class instead of merging fallthrough

1 participant