-
Notifications
You must be signed in to change notification settings - Fork 16
Release: 2.26.2 #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release: 2.26.2 #205
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,6 +289,8 @@ extension CustomizationColor { | |
| "toggleDisabledBackground" : self.toggleDisabledBackground as Any, | ||
| "toggleDisabledIcon" : self.toggleDisabledIcon as Any, | ||
| "secondLayerTab" : self.secondLayerTab as Any, | ||
| "moreBtnBackground" : self.moreBtnBackground as Any, | ||
| "moreBtnText" : self.moreBtnText as Any, | ||
|
Comment on lines
+292
to
+293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Ios/android color fields diverge iOS now includes moreBtnBackground/moreBtnText in CustomizationColor.toDictionary(), but Android’s CustomizationColor.serialize() still omits them, so the JS payload differs by platform and “More” button colors will be unavailable on Android. Agent Prompt
Comment on lines
+292
to
+293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check field parity for CustomizationColor across Swift/TS/Kotlin surfaces
rg -n --type=swift --type=ts --type=kt \
'moreBtnBackground|moreBtnText|tabsBorderColor|ccpaButtonColor|ccpaButtonTextColor'Repository: Usercentrics/react-native-sdk Length of output: 99 🏁 Script executed: #!/bin/bash
# Search for CustomizationColor field definitions and usage
# Fix: use proper file type flags and broader search
# First, check rg supported types
echo "=== Checking available Kotlin patterns ==="
rg -n 'moreBtnBackground|moreBtnText|tabsBorderColor|ccpaButtonColor|ccpaButtonTextColor' --max-count=30
echo ""
echo "=== Locate CustomizationColor definition ==="
rg -n 'class CustomizationColor|interface CustomizationColor' --type=swift --type=tsRepository: Usercentrics/react-native-sdk Length of output: 903 🏁 Script executed: #!/bin/bash
# Check the referenced mock file location and content
echo "=== Verify mock file reference ==="
find . -name "CMPData+Mock.swift" -type f
echo ""
echo "=== Read referenced lines 509-511 from mock file ==="
if [ -f "sample/ios/sampleTests/Mock/CMPData+Mock.swift" ]; then
sed -n '500,520p' "sample/ios/sampleTests/Mock/CMPData+Mock.swift"
fiRepository: Usercentrics/react-native-sdk Length of output: 1145 🏁 Script executed: #!/bin/bash
# Search for where these color fields are defined/used in native bridge
echo "=== Find all color field definitions across Swift and TypeScript ==="
rg -n -A3 -B3 'ccpaButtonColor|tabsBorderColor' --type=swift --type=ts | head -100Repository: Usercentrics/react-native-sdk Length of output: 999 🏁 Script executed: #!/bin/bash
# Read the complete UsercentricsCMPData+Dict.swift file to see the full toDictionary method
wc -l ios/Extensions/UsercentricsCMPData+Dict.swiftRepository: Usercentrics/react-native-sdk Length of output: 122 🏁 Script executed: #!/bin/bash
# Search for CustomizationColor extension in the target file
rg -n -B5 -A30 'extension CustomizationColor' ios/Extensions/UsercentricsCMPData+Dict.swift | head -150Repository: Usercentrics/react-native-sdk Length of output: 1614 🏁 Script executed: #!/bin/bash
# Get broader context around lines 292-293 to see the method structure
sed -n '250,310p' ios/Extensions/UsercentricsCMPData+Dict.swiftRepository: Usercentrics/react-native-sdk Length of output: 2073 🏁 Script executed: #!/bin/bash
# Find CustomizationColor class definition
rg -n -B2 -A50 'class CustomizationColor' --type=swift | head -100Repository: Usercentrics/react-native-sdk Length of output: 55 🏁 Script executed: #!/bin/bash
# Search for CustomizationColor definition without restricting to "class"
rg -n 'CustomizationColor' --type=swift | grep -E '(struct|class|var|let|func).*CustomizationColor' | head -20Repository: Usercentrics/react-native-sdk Length of output: 168 🏁 Script executed: #!/bin/bash
# Find where CustomizationColor is first declared/defined
rg -n '^(struct|class|protocol|typealias)\s+CustomizationColor' --type=swiftRepository: Usercentrics/react-native-sdk Length of output: 55 🏁 Script executed: #!/bin/bash
# List files in ios directory that might contain model definitions
find ios -name "*.swift" -type f | head -30Repository: Usercentrics/react-native-sdk Length of output: 1037 🏁 Script executed: #!/bin/bash
# Search entire repo for CustomizationColor definition
rg -n '(struct|class|interface|type)\s+CustomizationColor' | head -20Repository: Usercentrics/react-native-sdk Length of output: 55 🏁 Script executed: #!/bin/bash
# Also check if it's a TypeScript/JavaScript type
rg -n 'CustomizationColor\s*[:=]' --type=ts --type=js | head -20Repository: Usercentrics/react-native-sdk Length of output: 55 🏁 Script executed: #!/bin/bash
# Look for import statements for CustomizationColor in the extension file
grep -n 'import\|CustomizationColor' ios/Extensions/UsercentricsCMPData+Dict.swift | head -10Repository: Usercentrics/react-native-sdk Length of output: 149 Add missing color fields to Lines 292–293 correctly add 🤖 Prompt for AI Agents
Comment on lines
+292
to
+293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Architect Review — HIGH The new "More" button color fields ( Suggestion: Update the Android Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** ios/Extensions/UsercentricsCMPData+Dict.swift
**Line:** 292:293
**Comment:**
*HIGH: The new "More" button color fields (`moreBtnBackground`, `moreBtnText`) are only exposed in the iOS CMP data serialization, while the Android serializer (`CustomizationColor.serialize` in UsercentricsCMPDataExtensions.kt) still stops at `secondLayerTab`, breaking the otherwise platform-symmetric `getCMPData` contract for custom UI colors.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise. |
||
| ] | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The new customization color mapping is incomplete:
ccpaButtonTextColoris now part ofCustomizationColor(also added in the updated mock), but it is not serialized in this dictionary. This causes a schema mismatch where React Native receives an incomplete color payload and cannot access that field on iOS. [logic error]Severity Level: Major⚠️
Steps of Reproduction ✅
Prompt for AI Agent 🤖