Android view props, the onboarding redesign, and root scripts that cover both packages - #5
Merged
Merged
Conversation
From React Native 0.86 a Nitro Hybrid View on Android received no backgroundColor, no border*, no transform, no opacity, no testID and no accessibility props, while iOS was fine. There is no error to go with it: React Native never sees the prop, so it never warns. On Android those props only reach the view through Props::rawProps, a folly::dynamic that is serialised to Java and handed to ViewManager.updateProperties. The one thing that fills that map is initializeDynamicProps, which React Native calls at the end of ConcreteComponentDescriptor::cloneProps. Nitro overrides cloneProps to use its cached copy constructor and, as shipped in 0.37.1, never makes that call. The map stays empty and every style prop disappears. The patch adds the call back. Filed upstream as margelo/nitro#1656 with the fix in margelo/nitro#1655; drop the patch, the patchedDependencies entry and the tripwire test once a release contains it. The tripwire (NitroViewProps.test.tsx) reads the installed Nitro source and fails if the patch stops being applied - a version bump, a fresh install without patches - and separately if React Native moves the call, in which case the patch needs rewriting rather than reapplying. The example gets a two-box repro screen so the symptom can be seen on a device rather than inferred. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The four keyboard screens exist to compare NitroInput with TextInput through a realistic flow, and they looked like the harness they are: "Step 2 / 4" in grey, every field inside a captioned card, the keyboard timeline taking half the screen, a navigation title competing with the question. Now each step is a progress rail, the question as a headline with one line under it, the field, and one button. The timeline is still there - it is the reason the screens exist - but folded away behind "Show timeline", so the flow reads as the thing it imitates. The three pushed steps share their chrome through one options object: no title, a minimal back chevron, no header hairline. The search sheet hides its header, since the sheet's grabber is the chrome, and its Done button names what was picked. The details form focuses its first field on mount, like the email step already did. Every testID is unchanged, so the recorded flows still run. The native reference apps under native/ (UIKit, SwiftUI, Android views and Compose, the same four screens for comparing keyboard behaviour) and the screen recordings under example/.recordings/ are ignored: reference material, like the *-INTERNALS.md notes, not part of the library. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Every root script routed to packages/react-native-nitro-rolling-number, so `bun run test` at the root never ran the input package's suite, and plain `bun test` at the root ran bun's own runner against jest files and reported failures that were not there. Both packages are live - the example imports both - so the scripts now fan out over packages/* with bun's --filter, and test:cpp joins them since both packages have one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three commits that were sitting uncommitted after the last session.
Android: Hybrid Views were getting none of their base view props. From React Native 0.86, a Nitro Hybrid View on Android received no
backgroundColor,border*,transform,opacity,testIDor accessibility props, silently. Nitro'sViewComponentDescriptor::clonePropsnever callsinitializeDynamicProps, the only writer ofProps::rawProps, which is the map Android serialises to Java. The patch adds the call back. Filed upstream as margelo/nitro#1656, fix in margelo/nitro#1655. A tripwire test reads the installed Nitro source and fails if the patch stops applying or React Native moves the call. The example gets a two-box repro screen (plainViewvs Hybrid View, same style, the rotation is the giveaway).The onboarding flow reads as an onboarding, not as a test harness. Progress rail instead of "Step 2 / 4", the question as a headline, one button per step, the keyboard timeline folded away behind "Show timeline". Shared header chrome for the three pushed steps, header hidden on the sheet. Every testID unchanged. Also ignores
native/(UIKit / SwiftUI / Android reference apps for keyboard comparison) andexample/.recordings/.The root scripts only knew about one of the two packages.
bun run testat the root ran only the rolling-number suite. Nowspecs,build,typecheck,testandtest:cppfan out overpackages/*. Verified: roottestruns both suites (13 + 96 pass), roottypecheckis clean for both.Left out on purpose: a debug edit to
example/src/harness.tsx(red border, green fill, an 8° rotation on the shared field style) that was a hand-check for the view-props bug, not something to land.🤖 Generated with Claude Code