fix: align codegen contract across native and JS (audit PR 4/6)#123
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughChangesThe Android blur pipeline now uses 0–100 radius mapping and five default blur rounds, with switch manager delegation updates. iOS initialization recognizes Regular as the default blur type. TypeScript components gain default exports, corrected documentation, and a default spacing value. Android blur and delegation
iOS blur initialization
TypeScript component API
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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. Comment |
8da9bb5 to
a6ee4e2
Compare
Addresses the PR 4 batch from the July 2026 audit. - AND-03: ReactNativeBlurSwitchManager now implements the generated ReactNativeBlurSwitchManagerInterface and installs the generated delegate via getDelegate(), so props flow through codegen (matching the other two managers) instead of the reflection-based generic delegate. The direct onValueChange event wiring is kept for the interop layer. - AND-04: unify the blurAmount->radius mapping. Per maintainer decision the two blur views keep their current 1:1 (0-100) strength, and BlurSwitch is brought up to match (MAX_BLUR_RADIUS 25 -> 100) so the same blurAmount renders the same strength everywhere. Misleading "0-25" comments/logs removed and the ProgressiveBlur divisor corrected to MAX_BLUR_AMOUNT (numerically identical). - AND-05: set the native DEFAULT_BLUR_ROUNDS to 5 in BlurView and ProgressiveBlurView to match the JS wrapper and codegen default (one source of truth). The wrapper always sends blurRounds, so the previous internal 3 was unreachable; a consumer can still lower it explicitly. - IOS-NEW-4: ProgressiveBlurView compares the initial blurType against its real default (Regular) instead of Xlight before skipping the initial apply. - TS-03: fix the LiquidGlassView ignoreSafeArea JSDoc (@default false -> true, now matching the codegen default and behaviour) and the copy-pasted BlurView ignoreSafeArea @description. - TS-07: give the spacing prop a WithDefault<Double, 0> (the only optional prop that lacked one) and add the missing default exports to VibrancyView and LiquidGlassContainer. Deferred by decision: TS-NEW-1 (ColorValue-typed colour props) to a later PR. Verified: Android and iOS both build; TS typecheck passes; on the Android emulator the BlurSwitch renders and toggles through the new delegate path with no exceptions in logcat.
0064591 to
8e56b17
Compare
Part 4 of 6 in the July 2026 audit remediation. Stacked on
fix/ios-pr3-lifecycle.Codegen contract alignment across native and JS.
blurAmount→radius mapping. Per maintainer decision the two blur views keep their current 1:1 strength and BlurSwitch is brought up to match (no rendering change for the blur views); misleading "0-25" comments removed.blurRoundsdefault set to 5 (single source of truth).ignoreSafeAreaJSDoc/default fixes; TS-07spacingWithDefault + missing default exports; IOS-NEW-4 progressive init compares the correct default.Deferred by decision: TS-NEW-1 (ColorValue-typed colour props).
Verified: Android + iOS build; tsc clean; the switch renders + toggles through the new delegate.
Summary by CodeRabbit
New Features
LiquidGlassContainerandVibrancyView.0for liquid glass containers.Bug Fixes