feat(inbox): let apps configure visual inbox accessibility labels - #658
Draft
mahmoud-elmorabea wants to merge 2 commits into
Draft
feat(inbox): let apps configure visual inbox accessibility labels#658mahmoud-elmorabea wants to merge 2 commits into
mahmoud-elmorabea wants to merge 2 commits into
Conversation
The native SDKs stopped shipping hardcoded English labels for the visual
notification inbox, so apps now supply their own. Expose that config through
the wrapper: four optional strings on `inApp`, with the unread-count label as
a `{count}` template because the bridge carries data but not callbacks.
iOS needs no native change — the whole config already reaches
MessagingInAppConfigBuilder.build(from:), which parses these keys. Android
builds the labels and converts the template into the closure the SDK expects.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request. Builds are in progress. This comment will be updated when they finish.
|
Review of the wrapper PRs found two ways the example lost the accessibility
labels it exists to demonstrate:
- loadFromStorage merged persisted config over defaults shallowly, so any
device that had ever opened Settings replaced the defaults' `inApp` wholesale
and demonstrated the unlabeled inbox.
- Toggling in-app messaging off clears `inApp`, so re-enabling had nothing to
spread and dropped the labels permanently.
Also corrects the `loadingIndicator` doc, which described Android's behaviour
as if it were cross-platform: on iOS an unset label makes the spinner not an
accessibility element at all, so VoiceOver skips it rather than announcing a
progress role.
Adds a debug log when `bellWithUnreadCount` carries no `{count}` placeholder —
a typo like `{COUNT}` or `%d` is otherwise read aloud verbatim with the count
never announced, and nothing else in the stack can surface that.
Pins Android to 4.21.1, which adds an in-app open-url query fix at no cost, and
narrows the test docstring to what it actually verifies: the JavaScript half,
not the native key names.
Co-Authored-By: Claude Opus 5 <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.
Exposes the visual notification inbox accessibility labels through the React Native config, so host apps supply their own localized strings instead of the SDK shipping English text.
Fixes MBL-2366
Notes
MessagingInAppConfigBuilder.build(from:), which parses these keys.{count}template into the(Int) -> Stringclosure the SDK takes — the bridge carries data, not callbacks.jest.config.jsnow defines__DEV__, which the bare node test environment lacks; without it any test reachingassert.*throws a ReferenceError instead of exercising the validation.Verification
npx jest— 21 passed (4 new)npm run typecheck,eslint,npx api-extractor runall clean./gradlew :customerio-reactnative:compileDebugKotlinagainst Android SDK 4.21.0 — BUILD SUCCESSFUL🤖 Generated with Claude Code