Add Custom View Provider toggle to Settings feature flags#34
Open
asikora-sf wants to merge 10 commits intosalesforce:devfrom
Open
Add Custom View Provider toggle to Settings feature flags#34asikora-sf wants to merge 10 commits intosalesforce:devfrom
asikora-sf wants to merge 10 commits intosalesforce:devfrom
Conversation
4 tasks
Replace componentTypes[] + reactComponentName with a componentMap Record<string, string> so each SDK component type maps to its own React Native component name.
Bridges the native SDK view customization to React Native via RCTRootView. - BridgeViewProvider: canHandle() checks pre-registered types, view() renders RCTRootView in SwiftUI - registerViewProvider/clearViewProvider native methods exposed to JS - ViewProvider passed to AgentforceClient init when registered
Replace Set<String> + single reactComponentName with a [String: String] dictionary mapping each component definition to its own React component. canHandle() checks map keys, view() looks up the component name per type.
bda532f to
845ac30
Compare
RCTRootView embedded in UIViewRepresentable was getting zero size because SwiftUI had no sizing information. Set sizeFlexibility and implement sizeThatFits so the React content measures correctly.
Bridges the native SDK view customization to React Native via ReactRootView. - BridgeViewProvider: canHandle() checks pre-registered types, GetView() renders ReactRootView in Compose - registerViewProvider/clearViewProvider React methods exposed to JS - ViewProvider passed to AgentforceConfiguration builder when registered
Change BridgeViewProvider from N:1 (multiple types → one component) to 1:1 mapping (each type → its own React component name). The register() method now accepts a Map<String, String> and GetView() looks up the per-type component name from the map. Also update registerViewProvider in AgentforceModule to read componentMap from the ReadableMap instead of componentTypes array + reactComponentName.
…ceService Exposes view provider registration to JS consumers: - setViewProviderDelegate() registers component types + React component name with native - clearViewProviderDelegate() removes registration - Cleanup in destroy()
Pass componentMap (Record<string, string>) to native registerViewProvider instead of componentTypes array + reactComponentName, matching the 1:1 design change in the native layers.
…istence - Adds Custom View Provider toggle to Feature Flags tab in Settings - Persists flag via UserDefaults (iOS) and SharedPreferences (Android) - Reads/writes in getFeatureFlags, setFeatureFlags, and configure paths
845ac30 to
c1d3382
Compare
CCX-Wu
approved these changes
Mar 7, 2026
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.
Summary
enableCustomViewProvidertoggle to the Feature Flags tab in SettingsgetFeatureFlags,setFeatureFlags, andconfigurepaths on both platformsStack
PR 5/6 in the
viewproviderstack. Depends on PRs #30-#33.Test plan