Skip to content

Commit c776b92

Browse files
authored
Merge pull request #32589 from storybookjs/version-patch-from-9.1.9
Release: Patch 9.1.10
2 parents 01867d0 + ad914ce commit c776b92

File tree

11 files changed

+1500
-47
lines changed

11 files changed

+1500
-47
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 9.1.10
2+
3+
- Automigrations: Add automigration for viewport and backgrounds - [#31614](https://github.com/storybookjs/storybook/pull/31614), thanks @valentinpalkovic!
4+
- Telemetry: Log userAgent in onboarding - [#32566](https://github.com/storybookjs/storybook/pull/32566), thanks @shilman!
5+
16
## 9.1.9
27

38
- Angular: Enable experimental zoneless detection on Angular v21 - [#32580](https://github.com/storybookjs/storybook/pull/32580), thanks @yannbf!

code/addons/onboarding/src/Onboarding.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export default function Onboarding({ api }: { api: API }) {
8383
sourceFileName: string;
8484
} | null>();
8585

86+
// eslint-disable-next-line compat/compat
87+
const userAgent = globalThis?.navigator?.userAgent;
88+
8689
const selectStory = useCallback(
8790
(storyId: string) => {
8891
try {
@@ -112,15 +115,17 @@ export default function Onboarding({ api }: { api: API }) {
112115
api.emit(STORYBOOK_ADDON_ONBOARDING_CHANNEL, {
113116
step: '7:FinishedOnboarding' satisfies StepKey,
114117
type: 'telemetry',
118+
userAgent,
115119
});
116120
api.emit(STORYBOOK_ADDON_ONBOARDING_CHANNEL, {
117121
answers,
118122
type: 'survey',
123+
userAgent,
119124
});
120125
selectStory('configure-your-project--docs');
121126
disableOnboarding();
122127
},
123-
[api, selectStory, disableOnboarding]
128+
[api, selectStory, disableOnboarding, userAgent]
124129
);
125130

126131
useEffect(() => {
@@ -178,8 +183,8 @@ export default function Onboarding({ api }: { api: API }) {
178183
}, [api]);
179184

180185
useEffect(
181-
() => api.emit(STORYBOOK_ADDON_ONBOARDING_CHANNEL, { step, type: 'telemetry' }),
182-
[api, step]
186+
() => api.emit(STORYBOOK_ADDON_ONBOARDING_CHANNEL, { step, type: 'telemetry', userAgent }),
187+
[api, step, userAgent]
183188
);
184189

185190
if (!enabled) {

0 commit comments

Comments
 (0)