Skip to content

Nt 2574 create react web sdk personalization component#167

Merged
Lotfi Anwar L Arif (Lotfi-Arif) merged 12 commits intomainfrom
NT-2574-create-react-web-sdk-personalization-component
Mar 6, 2026
Merged

Nt 2574 create react web sdk personalization component#167
Lotfi Anwar L Arif (Lotfi-Arif) merged 12 commits intomainfrom
NT-2574-create-react-web-sdk-personalization-component

Conversation

@Lotfi-Arif
Copy link
Contributor

  • Implemented Personalization parity in React Web with RN-matching resolution semantics.
  • Added loading API: loadingFallback?: ReactNode | (({ baselineEntry }) => ReactNode).
  • Added loading readiness handling and fallback rendering while unresolved.
  • Preserved baseline/resolved render path when loadingFallback is not provided.
  • Implemented lock/live behavior:
    • default lock-on-first-non-undefined
    • continuous updates when live updates enabled
    • component liveUpdates overrides root/global; default false
  • Added Web SDK tracking attributes on resolved wrapper:
    • data-ctfl-entry-id
    • data-ctfl-personalization-id
    • data-ctfl-sticky
    • data-ctfl-variant-index
    • data-ctfl-duplication-scope (currently supported)
  • Ensured fallback wrapper does not emit resolved-content tracking attributes.
  • Confirmed nested <Personalization /> composition behavior.
  • Exported Personalization, PersonalizationProps, and loading-related public types from package entrypoint.
  • Added/updated docs for standard usage, loading fallback, live updates, nested composition, and Web auto-tracking prerequisites.
  • Added/updated unit tests for loading behavior, lock/live semantics, nested composition, and attribute mapping.
  • Replaced scaffold dev app with a real modular demo in packages/web/frameworks/react-web-sdk/dev.

- Split the React Web SDK dev app into modular sections for controls,
  state inspection, entry loading, and personalization.
- Add hooks, constants, and utility functions to support entry fetching
  and state
  management.
- Update styles for improved dashboard layout.
@wiz-inc-38d59fb8d7
Copy link

wiz-inc-38d59fb8d7 bot commented Mar 5, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 Medium 3 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 Medium 3 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Comment on lines +47 to +50
/**
* Optional legacy test id prop.
*/
testID?: string
Copy link
Collaborator

Choose a reason for hiding this comment

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

This may not actually be necessary... aside from respecting old profile IDs in the local storage, the new SDK doesn't need to handle much legacy stuff.

Comment on lines +36 to +39
/**
* Optional style prop for the wrapper element.
*/
style?: CSSProperties
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll actually need to remove this I think.

@Lotfi-Arif Lotfi Anwar L Arif (Lotfi-Arif) merged commit 1a6db65 into main Mar 6, 2026
30 checks passed
@Lotfi-Arif Lotfi Anwar L Arif (Lotfi-Arif) deleted the NT-2574-create-react-web-sdk-personalization-component branch March 6, 2026 17:02
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.

2 participants