Skip to content

Release for 2.3.0-beta.o#812

Open
lposen wants to merge 76 commits intomasterfrom
release/2.3.0-beta
Open

Release for 2.3.0-beta.o#812
lposen wants to merge 76 commits intomasterfrom
release/2.3.0-beta

Conversation

@lposen
Copy link
Copy Markdown
Contributor

@lposen lposen commented Jan 29, 2026

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

@qltysh
Copy link
Copy Markdown

qltysh Bot commented Jan 29, 2026

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 5.87%.

Modified Files with Diff Coverage (12)

RatingFile% DiffUncovered Line #s
New Coverage rating: A
...edded/components/IterableEmbeddedCard/IterableEmbeddedCard.tsx100.0%
New Coverage rating: A
...bleEmbeddedNotification/IterableEmbeddedNotification.styles.ts100.0%
New Coverage rating: A
src/embedded/hooks/useEmbeddedView/getMedia.ts100.0%
New Coverage rating: A
...components/IterableEmbeddedCard/IterableEmbeddedCard.styles.ts100.0%
New Coverage rating: A
src/embedded/hooks/useEmbeddedView/useEmbeddedView.ts100.0%
New Coverage rating: A
...d/components/IterableEmbeddedBanner/IterableEmbeddedBanner.tsx100.0%
New Coverage rating: A
src/embedded/components/IterableEmbeddedView.tsx100.0%
New Coverage rating: A
src/embedded/utils/normalizeEmbeddedViewConfig.ts94.3%13, 17
New Coverage rating: A
src/embedded/constants/embeddedViewDefaults.ts100.0%
New Coverage rating: A
src/embedded/hooks/useEmbeddedView/getStyles.ts100.0%
New Coverage rating: A
.../IterableEmbeddedNotification/IterableEmbeddedNotification.tsx100.0%
New Coverage rating: A
...onents/IterableEmbeddedBanner/IterableEmbeddedBanner.styles.ts100.0%
Total98.4%
🤖 Increase coverage with AI coding...
In the `release/2.3.0-beta` branch, add test coverage for this new code:

- `src/embedded/utils/normalizeEmbeddedViewConfig.ts` -- Lines 13 and 17

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 29, 2026

Lines Statements Branches Functions
Coverage: 68%
68.83% (519/754) 56.11% (202/360) 64.82% (164/253)

lposen and others added 18 commits February 12, 2026 14:10
…bedded-view-component

[MOB-12270] new-embedded-view-component
… loren/embedded/SDK-248-notification-component
lposen and others added 25 commits March 17, 2026 11:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…omponent-stretch

[SDK-245] banner-component
…tion-buttons-overflow-with-large-text

[SDK-431] notification-buttons-overflow-with-large-text
…ser-crashes-with-incorrect-configs

[SDK-433] JSON parse error when config contains unexpected type
Copilot AI review requested due to automatic review settings April 29, 2026 19:55
key: 'borderWidth' | 'borderCornerRadius',
value: unknown
): number | undefined {
if (value === undefined || value === null) {
@qltysh
Copy link
Copy Markdown

qltysh Bot commented Apr 29, 2026

18 new issues

Tool Category Rule Count
qlty Structure Function with high complexity (count = 9): Embedded 7
qlty Duplication Found 17 lines of similar code in 2 locations (mass = 66) 7
qlty Structure Function with many returns (count = 5): IterableEmbeddedView 2
qlty Structure Function with many parameters (count = 4): getMedia 2

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bumps the SDK to 2.3.0-beta.0 and introduces a new Embedded Messaging UI surface (OOTB Banner/Card/Notification views) with supporting hooks, types, defaults, assets, and example-app integration.

Changes:

  • Version bump + changelog entry for 2.3.0-beta.0.
  • Adds embedded view components (IterableEmbeddedView + Banner/Card/Notification), hook (useEmbeddedView), enums/types/config normalization, and defaults with test coverage.
  • Updates the example app to render embedded messages via IterableEmbeddedView and adds a JSON config editor modal.

Reviewed changes

Copilot reviewed 44 out of 46 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/types/assets.d.ts Adds TS module declaration for importing .png assets.
src/itblBuildInfo.ts Updates build info version to 2.3.0-beta.0.
src/index.tsx Expands embedded exports from the package entrypoint.
src/embedded/utils/normalizeEmbeddedViewConfig.ts Normalizes/coerces numeric config fields from runtime payloads.
src/embedded/utils/normalizeEmbeddedViewConfig.test.ts Tests config normalization behavior and warnings.
src/embedded/types/index.ts Re-exports embedded types, including new component/config types.
src/embedded/types/IterableEmbeddedViewConfig.ts Introduces embedded view styling config interface.
src/embedded/types/IterableEmbeddedComponentProps.ts Adds shared props interface used by embedded components/hooks.
src/embedded/index.ts Barrel export for embedded feature area (classes/components/enums/hooks/types).
src/embedded/hooks/useEmbeddedView/useEmbeddedView.ts Implements hook that derives styles/media and click handlers.
src/embedded/hooks/useEmbeddedView/useEmbeddedView.test.ts Tests hook delegation, callbacks, and click handling.
src/embedded/hooks/useEmbeddedView/index.ts Barrel export (and default export) for useEmbeddedView.
src/embedded/hooks/useEmbeddedView/getStyles.ts Resolves embedded styles from defaults + optional config overrides.
src/embedded/hooks/useEmbeddedView/getStyles.test.ts Tests style resolution across view types and overrides.
src/embedded/hooks/useEmbeddedView/getMedia.ts Extracts media rendering data from message + view type.
src/embedded/hooks/useEmbeddedView/getMedia.test.ts Tests media extraction rules and return shape.
src/embedded/hooks/index.ts Barrel export for embedded hooks.
src/embedded/enums/index.ts Barrel export for embedded enums.
src/embedded/enums/IterableEmbeddedViewType.ts Adds enum for embedded OOTB view selection.
src/embedded/constants/embeddedViewDefaults.ts Adds default colors/sizing for embedded view styling.
src/embedded/components/index.ts Barrel export for embedded components.
src/embedded/components/IterableEmbeddedView.tsx Adds top-level component that selects Banner/Card/Notification renderers.
src/embedded/components/IterableEmbeddedView.test.tsx Tests component selection and prop passing.
src/embedded/components/IterableEmbeddedNotification/index.ts Barrel export for Notification component.
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.tsx Implements Notification embedded view renderer.
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.test.tsx Tests Notification rendering, styles, buttons, click behavior.
src/embedded/components/IterableEmbeddedNotification/IterableEmbeddedNotification.styles.ts Adds Notification styles.
src/embedded/components/IterableEmbeddedCard/index.ts Barrel export for Card component.
src/embedded/components/IterableEmbeddedCard/IterableEmbeddedCard.tsx Implements Card embedded view renderer (incl. placeholder image).
src/embedded/components/IterableEmbeddedCard/IterableEmbeddedCard.test.tsx Tests Card rendering, styles, media placeholder, buttons, click behavior.
src/embedded/components/IterableEmbeddedCard/IterableEmbeddedCard.styles.ts Adds Card styles and image sizing constants.
src/embedded/components/IterableEmbeddedBanner/index.ts Barrel export for Banner component.
src/embedded/components/IterableEmbeddedBanner/IterableEmbeddedBanner.tsx Implements Banner embedded view renderer with optional media image.
src/embedded/components/IterableEmbeddedBanner/IterableEmbeddedBanner.test.tsx Tests Banner rendering, styles, media presence, buttons, click behavior.
src/embedded/components/IterableEmbeddedBanner/IterableEmbeddedBanner.styles.ts Adds Banner styles and platform-based image sizing.
src/core/assets/logo-grey.png Adds placeholder asset used when Card media isn’t present.
src/core/assets/index.ts Exposes IterableLogoGrey from core assets.
package.json Bumps package version to 2.3.0-beta.0.
example/src/constants/styles/modal.ts Adds modal style constants for the example config editor.
example/src/constants/styles/index.ts Re-exports modal style constants.
example/src/components/Embedded/Embedded.tsx Updates example embedded screen to use IterableEmbeddedView and adds JSON config modal UI.
example/src/components/Embedded/Embedded.styles.ts Updates example embedded screen styling for new UI and modal.
example/ios/ReactNativeSdkExample.xcodeproj/xcshareddata/xcschemes/ReactNativeSdkExample.xcscheme Updates Xcode scheme metadata for the example iOS app.
example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj Updates Xcode project settings / CocoaPods integration references.
example/ios/Podfile Adds a workaround targeting the fmt pod C++ standard.
CHANGELOG.md Adds 2.3.0-beta.0 release notes entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fontSize: 12,
lineHeight: 17,
},
container:{
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor formatting: container:{ should be container: { to match the codebase’s formatting conventions (and what Prettier will output).

Suggested change
container:{
container: {

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md
### Updates
- Added embedded messaging functionality. This includes the ability to:
- Manually sync the messages with `Iterable.embeddedManager.syncMessages()`
- Get the messages with `Iterable.embeddedManager .getMessages([PLACEMENT_IDS])`
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this changelog bullet, there’s an extra space between embeddedManager and .getMessages(...), which makes the example invalid when copied. Please remove the space so the example matches the actual API (Iterable.embeddedManager.getMessages(...)).

Suggested change
- Get the messages with `Iterable.embeddedManager .getMessages([PLACEMENT_IDS])`
- Get the messages with `Iterable.embeddedManager.getMessages([PLACEMENT_IDS])`

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md
Comment on lines +10 to +12
`Iterable.embeddedManager.startImpression(MESSAGE_ID, PLACEMENT_ID])`
- Pause an embedded impression with
`Iterable.embeddedManager.pauseImpression(MESSAGE_ID])`
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changelog examples have mismatched closing brackets (]) in the method calls (e.g. startImpression(...]), pauseImpression(...])). This makes the examples syntactically incorrect; please fix the parentheses/brackets so they can be copied as-is.

Suggested change
`Iterable.embeddedManager.startImpression(MESSAGE_ID, PLACEMENT_ID])`
- Pause an embedded impression with
`Iterable.embeddedManager.pauseImpression(MESSAGE_ID])`
`Iterable.embeddedManager.startImpression(MESSAGE_ID, PLACEMENT_ID)`
- Pause an embedded impression with
`Iterable.embeddedManager.pauseImpression(MESSAGE_ID)`

Copilot uses AI. Check for mistakes.
*
* // The config is used to style the component.
* // See `IterableEmbeddedViewConfig` for available config options.
* const config = { backgroundColor: '#FFFFFF', borderRadius: 8 };
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example config uses borderRadius, but IterableEmbeddedViewConfig defines borderCornerRadius. Please update the example to use the correct property name so users don’t pass a no-op config key.

Suggested change
* const config = { backgroundColor: '#FFFFFF', borderRadius: 8 };
* const config = { backgroundColor: '#FFFFFF', borderCornerRadius: 8 };

Copilot uses AI. Check for mistakes.
* };
*
* // `onMessageClick` will be called when the message is clicked anywhere outside of a button.
* // If a default action is set, it will be handled prior to this callback.
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment says the default action is handled prior to onMessageClick, but useEmbeddedView currently calls onMessageClick before Iterable.embeddedManager.handleClick(...). Please update the documentation (or change the call order) so the documented behavior matches the implementation.

Suggested change
* // If a default action is set, it will be handled prior to this callback.
* // If a default action is set, this callback will be invoked before the SDK handles that action.

Copilot uses AI. Check for mistakes.
modalOverlay,
subtitle,
title,
utilityColors
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import block doesn’t match the repo’s Prettier formatting (missing trailing comma and brace alignment). Please run Prettier (or adjust formatting) to keep style consistent and avoid noisy diffs later.

Suggested change
utilityColors
utilityColors,

Copilot uses AI. Check for mistakes.
? styles.mediaImage
: styles.mediaImagePlaceholder
}
alt={media.caption as string}
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

media.caption is typed as string | null, but it’s being force-cast to string for the Image alt prop. This can pass null at runtime and hides type issues. Prefer passing alt={media.caption ?? undefined} (or omitting alt when caption is null).

Suggested change
alt={media.caption as string}
alt={media.caption ?? undefined}

Copilot uses AI. Check for mistakes.
borderColor: parsedStyles.borderColor,
},
]}
alt={media.caption as string}
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

media.caption is string | null, but it’s being force-cast to string for the Image alt prop. This can pass null at runtime and defeats the type-check. Prefer alt={media.caption ?? undefined} (or conditionally omit the prop).

Suggested change
alt={media.caption as string}
alt={media.caption ?? undefined}

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +2
import type { TextStyle, ViewStyle } from "react-native";
import { colors } from "./colors";
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file uses double quotes for imports, but the repo Prettier config (.prettierrc) enforces singleQuote: true. Please reformat to use single quotes so yarn lint/Prettier don’t churn this file.

Suggested change
import type { TextStyle, ViewStyle } from "react-native";
import { colors } from "./colors";
import type { TextStyle, ViewStyle } from 'react-native';
import { colors } from './colors';

Copilot uses AI. Check for mistakes.
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.

4 participants