Skip to content

feat(inbox): let apps configure visual inbox accessibility labels - #658

Draft
mahmoud-elmorabea wants to merge 2 commits into
mainfrom
mbl-2366-inbox-a11y-labels
Draft

feat(inbox): let apps configure visual inbox accessibility labels#658
mahmoud-elmorabea wants to merge 2 commits into
mainfrom
mbl-2366-inbox-a11y-labels

Conversation

@mahmoud-elmorabea

Copy link
Copy Markdown
Contributor

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

  • iOS needs no native change: the whole config object already reaches MessagingInAppConfigBuilder.build(from:), which parses these keys.
  • Android builds the labels and converts the {count} template into the (Int) -> String closure the SDK takes — the bridge carries data, not callbacks.
  • Pins bumped to the native releases that added this config: iOS 4.8.0, Android 4.21.0.
  • jest.config.js now defines __DEV__, which the bare node test environment lacks; without it any test reaching assert.* throws a ReferenceError instead of exercising the validation.

Verification

  • npx jest — 21 passed (4 new)
  • npm run typecheck, eslint, npx api-extractor run all clean
  • ./gradlew :customerio-reactnative:compileDebugKotlin against Android SDK 4.21.0 — BUILD SUCCESSFUL

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
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.

  • Android APN: 658.2.0 (29819386)
  • iOS APN: 658.2.0 (29819386)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant