Visitar URL original
fix(octane): skip undefined prop writes and advertise visibility capability by aleclarson · Pull Request #14 · nativescript-community/octane · GitHub
Skip to content

fix(octane): skip undefined prop writes and advertise visibility capability - #14

Open
aleclarson wants to merge 1 commit into
nativescript-community:mainfrom
aleclarson:fix/setprop-undefined-visibility
Open

aleclarson wants to merge 1 commit into
nativescript-community:mainfrom
aleclarson:fix/setprop-undefined-visibility

Conversation

@aleclarson

Copy link
Copy Markdown
Contributor

Problem

setProp forwards undefined straight to the NativeScript view setter. Native setters coerce it — e.g. editable = undefined becomes ios.userInteractionEnabled = NO — leaving dead UI that still has its JS listeners attached. undefined should mean "prop not supplied".

Separately, the driver already implements visibility commands (mapping hidden to NativeScript's collapse) but doesn't advertise the capability, so core never uses it — committed suspense bodies can't be retained while pending.

Fix

  • setProp returns early when value === undefined (before the <name>Change echo suppression).
  • capabilities now includes visibility: true, matching the visibility op handler the driver already has.
  • The intrinsic Ref type is aligned with Octane's ref contract: callback refs may return a cleanup function, and refs may be nested arrays with optional entries (the array variant moved into Ref itself, so OctaneAttributes.ref stays a single entry).

…bility

setProp forwarded `undefined` to NativeScript native setters, which coerce
it (e.g. `editable = undefined` becomes `ios.userInteractionEnabled = NO`),
leaving dead UI that still has its JS listeners attached. `undefined` now
means "prop not supplied" and the write is skipped.

The driver already handles `visibility` commands (mapping hidden to
NativeScript's `collapse`), so advertise the capability — this lets core
retain committed suspense bodies while they are pending instead of
discarding them.

Also align the intrinsic ref types with Octane's ref contract: callback
refs may return a cleanup function, and refs may be nested arrays with
optional entries.
aleclarson added a commit to octane-xplat/octane-xplat that referenced this pull request Oct 8, 2026
Filed upstream PRs for the five patch-audit fixes and recorded them via a
new upstreamPR field on the manifest entries:

- nativescript-community/octane#14 — setProp undefined-skip, visibility
  capability, intrinsic ref types
- nativescript-community/octane#15 — vite-octane .tsrx HMR matching and
  recipients counting
- nativescript-community/ui-image#69 — iOS prefetch cacheType + headers
- nfrasser/linkifyjs#572 — ICU-free \p{} regex construction
- facebook/lexical#9334 — @lexical/link URL_REGEX via new RegExp
- NativeScript/NativeScript#11514 — font-weight → wght axis mapping on
  Android (issue #11513)

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant