Skip to content

Commit bb64696

Browse files
authored
feat: conversations widget (#2700)
* feat: conversations widget * add versioning * add tests * fix lint error * fix test * fix terser * add session id for security reasons * new messages * fix * fix ets * lazy load more * another approach * fix refs and add ignore for them * fix test * fix terser * optimisation * a bit more cleaning * a bit more * changeset * domains * reuse persistence * pass posthog as param * terser * lazy load reset * remove something that's most likely loaded * return as it fail everything * new structure * remove enum * fix * fix terser * fix snapshot
1 parent e43e53b commit bb64696

26 files changed

+3822
-4
lines changed

.changeset/sharp-beans-nail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'posthog-js': minor
3+
---
4+
5+
conversations widget

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ lib
22

33
packages/react-native/src/version.ts
44
packages/core/src/vendor/*
5+
6+
# Generated API reference files - should not be formatted
7+
**/references/*.json

packages/browser/playwright/mocked/utils/posthog-playwright-test-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const lazyLoadedJSFiles = [
88
'recorder',
99
'posthog-recorder',
1010
'lazy-recorder',
11+
'conversations',
1112
'surveys',
1213
'exception-autocapture',
1314
'tracing-headers',

packages/browser/rollup.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ const plugins = (es5, noExternal) => [
151151
// we don't mangle _surveyManager as it's used by external surveys to paint them on the dom directly
152152
'_surveyManager',
153153

154+
// used in conversations - external bundle needs to access these on the posthog instance
155+
'_conversationsManager',
156+
'_conversations',
157+
'_send_request', // called by conversations external bundle
158+
154159
// part of setup/teardown code, preserve these out of caution
155160
'_init',
156161
'_dom_loaded',

packages/browser/src/__tests__/__snapshots__/config-snapshot.test.ts.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ exports[`config snapshot for PostHogConfig 1`] = `
182182
]
183183
}
184184
],
185+
"disable_conversations": [
186+
"false",
187+
"true"
188+
],
185189
"disable_web_experiments": [
186190
"false",
187191
"true"

0 commit comments

Comments
 (0)