Skip to content

feat: Expose Rokt launcher config options#30

Merged
alexs-mparticle merged 8 commits into
developmentfrom
feat/SQDSDKS-7319-launcher-config
May 30, 2025
Merged

feat: Expose Rokt launcher config options#30
alexs-mparticle merged 8 commits into
developmentfrom
feat/SQDSDKS-7319-launcher-config

Conversation

@alexs-mparticle

Copy link
Copy Markdown
Collaborator

Summary

Exposes Rokt integration launcher config options. This will act as a pass-through for the Core SDK to use to allow users to pass configuration options for the Rokt Web SDK.

Requires mParticle/mparticle-web-sdk#1033 to be merged in

Testing Plan

  • Using a sample app, pass in various rokt configuration options to window.mParticle.config and verify that they appear in the Rokt Web SDK selectPlacements call.

@alexs-mparticle alexs-mparticle requested a review from Copilot May 20, 2025 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR exposes Rokt launcher configuration options by transitioning from using custom flags to directly utilizing a launcherOptions property.

  • Updated tests to verify launcherOptions functionality instead of customFlags
  • Modified Rokt-Kit to initialize and use launcherOptions when generating integration names and attaching the launcher

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/src/tests.js Updated tests to use launcherOptions and clean up test state
src/Rokt-Kit.js Introduced launcherOptions and refactored integration name generation

@alexs-mparticle alexs-mparticle marked this pull request as ready for review May 21, 2025 17:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR exposes new Rokt integration launcher configuration options via window.mParticle.Rokt.launcherOptions and updates related tests.

  • Introduce launcherOptions in the Rokt-Kit constructor and pass them through to attachLauncher
  • Remove old customFlags logic and update method signature variables
  • Rename and adjust tests to reference launcherOptions instead of customFlags

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/src/tests.js Updated test names and teardown to use launcherOptions
src/Rokt-Kit.js Removed legacy flag parsing and read launcher options globally
Comments suppressed due to low confidence (2)

src/Rokt-Kit.js:55

  • The parameter _customFlags is no longer used inside this function. Removing unused parameters will improve readability and prevent confusion.
function (settings, testMode, _trackerId, filteredUserAttributes, _filteredUserIdentities, _appVersion, _appName, _customFlags) {

test/src/tests.js:142

  • This test sets noFunctional and noTargeting in launcherOptions but does not assert that these options are passed to window.Rokt.createLauncher. Add assertions on the call parameters to ensure those flags propagate correctly.
it('should set optional settings from launcherOptions', async () => {

Comment thread test/src/tests.js
Comment thread src/Rokt-Kit.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@rmi22186 rmi22186 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pending approval of mParticle/mparticle-web-sdk#1033

@alexs-mparticle alexs-mparticle requested a review from Copilot May 29, 2025 21:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR exposes additional configuration options for the Rokt Web SDK by allowing users to pass launcher configuration through mParticle. Key changes include:

  • Adding a new sandbox flag via window.mParticle.Rokt.managerOptions.
  • Refactoring the extraction of launcher options from customFlags to launcherOptions.
  • Updating tests to verify the new configuration options.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/src/tests.js Updated tests to validate the new sandbox and launcherOptions flags.
src/Rokt-Kit.js Refactored configuration extraction and updated attachLauncher API to include sandbox.
Comments suppressed due to low confidence (1)

test/src/tests.js:100

  • Consider adding tests to verify the default behavior when neither managerOptions nor launcherOptions are provided, ensuring that integrationName and sandbox default correctly.
afterEach(() => {

Comment thread src/Rokt-Kit.js Outdated
@alexs-mparticle alexs-mparticle requested a review from Copilot May 29, 2025 21:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR exposes Rokt launcher configuration options to allow the Core SDK to pass configuration options to the Rokt Web SDK. Key changes include:

  • Adding sandbox handling via managerOptions in both the kit and test files.
  • Removing usage of customFlags in favor of launcherOptions and managerOptions.
  • Updating test cases to validate the new configuration options for the Rokt launcher.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/src/tests.js Updated tests to check sandbox behavior and proper application of launcherOptions.
src/Rokt-Kit.js Refactored configuration handling by replacing customFlags with managerOptions and launcherOptions; updated attachLauncher signature accordingly.

@alexs-mparticle alexs-mparticle merged commit 32118d5 into development May 30, 2025
4 checks passed
github-actions Bot pushed a commit that referenced this pull request Jun 2, 2025
# [1.4.0](v1.3.2...v1.4.0) (2025-06-02)

### Features

* Expose Rokt launcher config options ([#30](#30)) ([6cf2344](6cf2344))
@alexs-mparticle alexs-mparticle deleted the feat/SQDSDKS-7319-launcher-config branch March 25, 2026 15:15
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.

3 participants