From 4796600bd383c142a5f23507890fb0553b63b657 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 4 Jul 2024 16:10:24 +0200 Subject: [PATCH 1/2] feat(ui): Update Loader Script UI to accomodate v8 --- .../project/projectKeys/details/loaderSettings.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx b/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx index 0a6f14bb68107b..0e227075e577a5 100644 --- a/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx +++ b/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx @@ -226,8 +226,12 @@ export function LoaderSettings({keyId, orgSlug, project, data, updateData}: Prop ? t('Only available in SDK version 7.x and above') : data.dynamicSdkLoaderOptions.hasReplay ? tct( - 'When using Replay, the loader will load the ES6 bundle instead of the ES5 bundle. The default configurations are [codeReplay:replaysSessionSampleRate: 0.1] and [codeError:replaysOnErrorSampleRate: 1]. [configDocs:Read the docs] to learn how to configure this.', + `[es5Warning]The default configurations are [codeReplay:replaysSessionSampleRate: 0.1] and [codeError:replaysOnErrorSampleRate: 1]. [configDocs:Read the docs] to learn how to configure this.`, { + es5Warning: + data.browserSdkVersion !== '8.x' + ? 'When using Replay, the loader will load the ES6 bundle instead of the ES5 bundle. ' + : '', codeReplay: , codeError: , configDocs: ( @@ -265,5 +269,5 @@ export function LoaderSettings({keyId, orgSlug, project, data, updateData}: Prop } function sdkVersionSupportsPerformanceAndReplay(sdkVersion: string): boolean { - return sdkVersion === 'latest' || sdkVersion === '7.x'; + return sdkVersion === 'latest' || sdkVersion === '7.x' || sdkVersion === '8.x'; } From 3c87a807683bcfe20732f8c3595cc091355347e4 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 8 Jul 2024 15:57:20 +0200 Subject: [PATCH 2/2] small fixes --- .../project/projectKeys/details/loaderSettings.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx b/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx index 0e227075e577a5..64755cf30663ab 100644 --- a/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx +++ b/static/app/views/settings/project/projectKeys/details/loaderSettings.tsx @@ -229,8 +229,12 @@ export function LoaderSettings({keyId, orgSlug, project, data, updateData}: Prop `[es5Warning]The default configurations are [codeReplay:replaysSessionSampleRate: 0.1] and [codeError:replaysOnErrorSampleRate: 1]. [configDocs:Read the docs] to learn how to configure this.`, { es5Warning: - data.browserSdkVersion !== '8.x' - ? 'When using Replay, the loader will load the ES6 bundle instead of the ES5 bundle. ' + // latest is deprecated but resolves to v7 + data.browserSdkVersion === '7.x' || + data.browserSdkVersion === 'latest' + ? t( + 'When using Replay, the loader will load the ES6 bundle instead of the ES5 bundle.' + ) + ' ' : '', codeReplay: , codeError: ,