Skip to content

Name the no-tag sentinel and use it for the hardcoded -1 tags - #58531

Open
janicduplessis wants to merge 1 commit into
react:mainfrom
janicduplessis:safe-area/0-no-tag-sentinel
Open

janicduplessis wants to merge 1 commit into
react:mainfrom
janicduplessis:safe-area/0-no-tag-sentinel

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary:

React tags are positive; -1 marks the absence of one in several places with a bare literal. This names the convention — kNoTag in ReactPrimitives.h, next to the Tag alias and mirroring ViewUtil.NO_SURFACE_ID on the Android side — and replaces the literals across the renderer: ShadowViewMutation's parentTag default, factories and comparison, the stub view tree (folding its duplicate NO_VIEW_TAG constant into kNoTag), the CppMountItem mirrors on Android, UIManagerViewTransitionDelegate's nativeTag and the view transition fallback that feeds it, and the pointer-events no-override comparisons.

Split out of the safe area insets stack: #58530 threads a Tag with no-tag semantics through experimental_flushSync and wants the named sentinel, but the cleanup stands on its own and can land regardless of that PR's fate.

Changelog:

[INTERNAL] - Name the no-tag sentinel (kNoTag) and use it for the hardcoded -1 tags

Test Plan:

Compiles via the Fantom tester build; yarn fantom mounting-heavy suite passes 224/224 (exercises the StubViewTree asserts). C++ API snapshots regenerated — the only delta is the new kNoTag constant.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 15, 2026
@facebook-github-tools facebook-github-tools Bot added the Contributor A React Native contributor. label Sep 15, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 15, 2026
React tags are positive; -1 marks the absence of one in several places
with a bare literal. kNoTag in ReactPrimitives.h gives the convention a
name — mirroring NO_SURFACE_ID on the Android side — and replaces the
literals across the renderer: ShadowViewMutation's parentTag default,
factories and comparison, the stub view tree (folding its duplicate
NO_VIEW_TAG constant into kNoTag), the CppMountItem mirrors on Android,
UIManagerViewTransitionDelegate's nativeTag and the view transition
fallback that feeds it, and the pointer-events no-override comparisons.
@janicduplessis
janicduplessis force-pushed the safe-area/0-no-tag-sentinel branch from e0a9f6e to dc454c0 Compare September 15, 2026 15:12
@janicduplessis

Copy link
Copy Markdown
Contributor Author

@Abbondanzo This is ready for review, first PR of the safe area insets stack.

@meta-codesync

meta-codesync Bot commented Sep 15, 2026

Copy link
Copy Markdown

@Abbondanzo has imported this pull request. If you are a Meta employee, you can view this in D120199347.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant