Skip to content

refactor(transition): remove unused Android snapshot helpers - #11651

Merged
edusperoni merged 1 commit into
mainfrom
refactor/android-remove-snapshot-view-group
Nov 22, 2026
Merged

edusperoni merged 1 commit into
mainfrom
refactor/android-remove-snapshot-view-group

Conversation

@edusperoni

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

ui/transition/page-transition.android.ts defines SnapshotViewGroup, ContentViewSnapshot, loadViewInBackground and renderToImageSource. SnapshotViewGroup is only created by ContentViewSnapshot, which is only used by loadViewInBackground. Neither loadViewInBackground nor renderToImageSource is called anywhere except in a commented-out block.

The Android static binding generator still emits a binding for SnapshotViewGroup (without a location, since terser drops the class as unused).

What is the new behavior?

Removes that chain, the commented-out block, and the imports only it used. No behaviour change.

Split out of #11636.

SnapshotViewGroup was only created by ContentViewSnapshot, which was only used by loadViewInBackground. Neither loadViewInBackground nor renderToImageSource had a caller outside a commented-out block, so the bundle still carried an unused native class that the static binding generator could not place.
@nx-cloud

nx-cloud Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 9943732

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 20s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 With Ultracache enabled, Nx Cloud learns each task's file inputs in CI and uses them on later runs. Turn on Ultracache in workspace settings ↗ · Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-11-20 17:03:50 UTC

@pkg-pr-new

pkg-pr-new Bot commented Nov 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11651
npm i https://pkg.pr.new/@nativescript/vite@11651
npm i https://pkg.pr.new/@nativescript/webpack@11651

commit: 9943732

@NathanWalker NathanWalker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirmed SnapshotViewGroup, ContentViewSnapshot, renderToImageSource, and loadViewInBackground have no remaining references across the workspace, and dropping SnapshotViewGroup avoids emitting an unused static binding on Android. Nice cleanup.

@NathanWalker NathanWalker added this to the 9.2 milestone Nov 21, 2026
@edusperoni
edusperoni merged commit c232328 into main Nov 22, 2026
10 checks passed
@edusperoni
edusperoni deleted the refactor/android-remove-snapshot-view-group branch November 22, 2026 19:16
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.

3 participants