From ba7a40af12fd1d9694e62b4fab3a4e60a0f379d8 Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Tue, 9 Apr 2024 15:15:37 +0300 Subject: [PATCH 01/15] feat: new pr template --- .github/PULL_REQUEST_TEMPLATE.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 85904f46bdf..1e49d6b44de 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,24 @@ -### What change does this PR introduce? +## Summary - + -### Why was this change needed? +## Changes Made - + -### Other information (Screenshots) +## Screenshots + - - +
+Expand for optional sections + +## Related enterprise PR + + +## Special notes for your reviewer + + +
From c31a071d0335ee8254fd2a12d3ea5b8a6cdad7d7 Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Tue, 9 Apr 2024 15:21:24 +0300 Subject: [PATCH 02/15] feat: size of titles --- .github/PULL_REQUEST_TEMPLATE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1e49d6b44de..b8854e3b123 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,24 +1,24 @@ -## Summary +### Summary -## Changes Made +### Changes Made -## Screenshots +### Screenshots
Expand for optional sections -## Related enterprise PR +### Related enterprise PR -## Special notes for your reviewer +### Special notes for your reviewer
From d860ff670c1b303aab3c6b0d3616114ec5c2a9fd Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Thu, 11 Apr 2024 12:46:37 +0300 Subject: [PATCH 03/15] refactor: remove redundant step for uploading a new translation file --- .source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.source b/.source index 1bc46c93374..b6ab9bdab2f 160000 --- a/.source +++ b/.source @@ -1 +1 @@ -Subproject commit 1bc46c933740c90ee7b0c12ad767a3671913e08e +Subproject commit b6ab9bdab2f8092d6a8e7d43719b37828d2d8bd1 From 1a279aabc6021065f4eb3afd307417bd87af9759 Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Thu, 11 Apr 2024 13:22:01 +0300 Subject: [PATCH 04/15] feat: use screencasts phrase --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b8854e3b123..a5e8503056d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,7 +10,7 @@ or design documents. --> and any notable implementation details. --> ### Screenshots - +
Expand for optional sections From 0da951bd1056cea0ca8029dd8004b4d7787ee858 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Thu, 11 Apr 2024 15:53:46 +0530 Subject: [PATCH 05/15] feat: add modal on get started page for onboarding experiment v2 --- .../auth/components/QuestionnaireForm.tsx | 2 +- .../components/OnboadingExperimentModal.tsx | 123 ++++++++++++++++++ .../pages/quick-start/steps/GetStarted.tsx | 4 +- 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx diff --git a/apps/web/src/pages/auth/components/QuestionnaireForm.tsx b/apps/web/src/pages/auth/components/QuestionnaireForm.tsx index 1b9f2404cb7..a43b972a548 100644 --- a/apps/web/src/pages/auth/components/QuestionnaireForm.tsx +++ b/apps/web/src/pages/auth/components/QuestionnaireForm.tsx @@ -66,7 +66,7 @@ export function QuestionnaireForm() { const createDto: ICreateOrganizationDto = { ...rest, name: organizationName }; const organization = await createOrganizationMutation(createDto); const organizationResponseToken = await api.post(`/v1/auth/organizations/${organization._id}/switch`, {}); - + localStorage.setItem('onboarding_modal', 'true'); setToken(organizationResponseToken); } diff --git a/apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx b/apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx new file mode 100644 index 00000000000..b7adfd69c70 --- /dev/null +++ b/apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx @@ -0,0 +1,123 @@ +import { useState } from 'react'; +import { Modal, useMantineTheme, Grid } from '@mantine/core'; + +import styled from '@emotion/styled'; +import { colors, shadows, Title, Button } from '@novu/design-system'; +import { useAuthContext, useSegment } from '@novu/shared-web'; +import { useCreateOnboardingExperimentWorkflow } from '../../../api/hooks/notification-templates/useCreateOnboardingExperimentWorkflow'; + +export function OnboardingExperimentModal() { + const [opened, setOpened] = useState(true); + const theme = useMantineTheme(); + const segment = useSegment(); + const { currentOrganization } = useAuthContext(); + const { + createOnboardingExperimentWorkflow, + isLoading: IsCreateOnboardingExpWorkflowLoading, + isDisabled: isIsCreateOnboardingExpWorkflowDisabled, + } = useCreateOnboardingExperimentWorkflow(); + const handleOnClose = () => { + setOpened(true); + }; + + return ( + What would you like to do first?} + sx={{ backdropFilter: 'blur(10px)' }} + shadow={theme.colorScheme === 'dark' ? shadows.dark : shadows.medium} + radius="md" + size="lg" + onClose={handleOnClose} + centered + withCloseButton={false} + > + + + + {'Send test notification'} + {'Learn how to setup a workflow and send your first email notification.'} + { + segment.track('Buton Clicked - [Onboarding]', { + action: 'Modal - Send test notification', + experiment_id: '2024-w15-onb', + _organization: currentOrganization?._id, + }); + localStorage.removeItem('onboarding_modal'); + createOnboardingExperimentWorkflow(); + }} + > + {'Send test notification now'} + + + + + + {'Look around'} + {'Start exploring the Novu app on your own terms'} + { + segment.track('Buton Clicked - [Onboarding]', { + action: 'Modal - Get started', + experiment_id: '2024-w15-onb', + _organization: currentOrganization?._id, + }); + localStorage.removeItem('onboarding_modal'); + setOpened(false); + }} + > + {'Get started'} + + + + + + ); +} + +const ChannelCard = styled.div` + display: flex; + justify-content: space-between; + flex-direction: column; + max-width: 230px; +`; + +const TitleRow = styled.div` + display: flex; + align-items: center; + font-size: 20px; + line-height: 32px; + margin-bottom: 8px; +`; + +const Description = styled.div` + flex: auto; + font-size: 16px; + line-height: 20px; + margin-bottom: 20px; + color: ${colors.B60}; + height: 60px; +`; + +const StyledButton = styled(Button)` + width: fit-content; + outline: none; +`; diff --git a/apps/web/src/pages/quick-start/steps/GetStarted.tsx b/apps/web/src/pages/quick-start/steps/GetStarted.tsx index 74618334d5c..263db0c3d73 100644 --- a/apps/web/src/pages/quick-start/steps/GetStarted.tsx +++ b/apps/web/src/pages/quick-start/steps/GetStarted.tsx @@ -9,6 +9,7 @@ import { ChannelsConfiguration } from '../components/ChannelsConfiguration'; import { GetStartedLayout } from '../components/layout/GetStartedLayout'; import { NavButton } from '../components/NavButton'; import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts'; +import { OnboardingExperimentModal } from '../components/OnboadingExperimentModal'; const ChannelsConfigurationHolder = styled.div` display: flex; @@ -29,7 +30,7 @@ export function GetStarted() { open: boolean; channelType?: ChannelTypeEnum; }>({ open: false }); - + const isOnboardingModalEnabled = localStorage.getItem('onboarding_modal') === 'true'; const onIntegrationModalClose = () => setClickedChannel({ open: false }); useEffect(() => { @@ -60,6 +61,7 @@ export function GetStarted() { /> + {isOnboardingModalEnabled && } ); } From 73740fc13ef0a6e2846fb9ba7d3015a7a897330c Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Thu, 11 Apr 2024 16:14:29 +0530 Subject: [PATCH 06/15] fix: add segment event for modal open --- apps/web/package.json | 2 +- .../src/pages/quick-start/steps/GetStarted.tsx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 84356a43fd5..99a040fd04e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -3,7 +3,7 @@ "version": "0.24.1", "private": true, "scripts": { - "start": "pnpm panda --watch & cross-env PORT=4200 react-app-rewired start", + "start": "pnpm panda --watch & cross-env NODE_OPTIONS=--max_old_space_size=8192 PORT=4200 react-app-rewired start", "prebuild": "rimraf build", "build": "pnpm panda && cross-env NODE_OPTIONS=--max_old_space_size=4096 GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=4096 build", "precommit": "lint-staged", diff --git a/apps/web/src/pages/quick-start/steps/GetStarted.tsx b/apps/web/src/pages/quick-start/steps/GetStarted.tsx index 263db0c3d73..e7993505f8a 100644 --- a/apps/web/src/pages/quick-start/steps/GetStarted.tsx +++ b/apps/web/src/pages/quick-start/steps/GetStarted.tsx @@ -10,6 +10,7 @@ import { GetStartedLayout } from '../components/layout/GetStartedLayout'; import { NavButton } from '../components/NavButton'; import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts'; import { OnboardingExperimentModal } from '../components/OnboadingExperimentModal'; +import { ENV, IS_DOCKER_HOSTED, useAuthContext } from '@novu/shared-web'; const ChannelsConfigurationHolder = styled.div` display: flex; @@ -26,16 +27,27 @@ const ChannelsConfigurationHolder = styled.div` export function GetStarted() { const segment = useSegment(); + const { currentOrganization } = useAuthContext(); const [clickedChannel, setClickedChannel] = useState<{ open: boolean; channelType?: ChannelTypeEnum; }>({ open: false }); - const isOnboardingModalEnabled = localStorage.getItem('onboarding_modal') === 'true'; + + const isNovuProd = !IS_DOCKER_HOSTED && ENV === 'production'; + // open modal only for prod users + const isOnboardingModalEnabled = isNovuProd && localStorage.getItem('onboarding_modal') === 'true'; + const onIntegrationModalClose = () => setClickedChannel({ open: false }); useEffect(() => { segment.track(OnBoardingAnalyticsEnum.CONFIGURE_PROVIDER_VISIT); - }, [segment]); + if (isOnboardingModalEnabled) { + segment.track('Welcome modal open - [Onboarding]', { + experiment_id: '2024-w15-onb', + _organization: currentOrganization?._id, + }); + } + }, [currentOrganization?._id, isOnboardingModalEnabled, segment]); function handleOnClick() { segment.track(OnBoardingAnalyticsEnum.CONFIGURE_PROVIDER_NAVIGATION_NEXT_PAGE_CLICK); From 5bb71259492cbb747f065e95dea5890e0443207d Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Thu, 11 Apr 2024 16:39:44 +0530 Subject: [PATCH 07/15] fix: cspell check error --- ...boadingExperimentModal.tsx => OnboardingExperimentModal.tsx} | 2 +- apps/web/src/pages/quick-start/steps/GetStarted.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename apps/web/src/pages/quick-start/components/{OnboadingExperimentModal.tsx => OnboardingExperimentModal.tsx} (98%) diff --git a/apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx similarity index 98% rename from apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx rename to apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx index b7adfd69c70..d1b7a47ac74 100644 --- a/apps/web/src/pages/quick-start/components/OnboadingExperimentModal.tsx +++ b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx @@ -55,7 +55,7 @@ export function OnboardingExperimentModal() { pulse={true} variant={'gradient'} onClick={async () => { - segment.track('Buton Clicked - [Onboarding]', { + segment.track('Button Clicked - [Onboarding]', { action: 'Modal - Send test notification', experiment_id: '2024-w15-onb', _organization: currentOrganization?._id, diff --git a/apps/web/src/pages/quick-start/steps/GetStarted.tsx b/apps/web/src/pages/quick-start/steps/GetStarted.tsx index e7993505f8a..2fb0e14b6a4 100644 --- a/apps/web/src/pages/quick-start/steps/GetStarted.tsx +++ b/apps/web/src/pages/quick-start/steps/GetStarted.tsx @@ -9,7 +9,7 @@ import { ChannelsConfiguration } from '../components/ChannelsConfiguration'; import { GetStartedLayout } from '../components/layout/GetStartedLayout'; import { NavButton } from '../components/NavButton'; import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts'; -import { OnboardingExperimentModal } from '../components/OnboadingExperimentModal'; +import { OnboardingExperimentModal } from '../components/OnboardingExperimentModal'; import { ENV, IS_DOCKER_HOSTED, useAuthContext } from '@novu/shared-web'; const ChannelsConfigurationHolder = styled.div` From 52cf53cde77e1ee7190efb602373e02dbfa8a1f5 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Thu, 11 Apr 2024 17:02:33 +0530 Subject: [PATCH 08/15] feat: change button text --- apps/web/src/pages/templates/workflow/WorkflowEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx b/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx index fcd04da28a3..fcbb4ae8234 100644 --- a/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx +++ b/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx @@ -293,7 +293,7 @@ const WorkflowEditor = () => { }} data-test-id="get-snippet-btn" > - {tagsIncludesOnboarding ? 'Test Notification Now' : 'Get Snippet'} + {tagsIncludesOnboarding ? 'Trigger Notification' : 'Get Snippet'} From 96b9dcafccc2080418038c84de3ae20236b3140d Mon Sep 17 00:00:00 2001 From: ainouzgali Date: Thu, 11 Apr 2024 14:55:21 +0300 Subject: [PATCH 09/15] feat: ask for why the change is needed --- .github/PULL_REQUEST_TEMPLATE.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a5e8503056d..2cf10e5d3e3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,5 @@ -### Summary - - - -### Changes Made - - +### What changed? Why was the change needed? + ### Screenshots @@ -19,6 +11,6 @@ and any notable implementation details. --> ### Special notes for your reviewer - +
From e4172c77b1cf07454ca833b551dee0d7e52bd27f Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Thu, 11 Apr 2024 17:37:45 +0530 Subject: [PATCH 10/15] fix: spell check error --- .../pages/quick-start/components/OnboardingExperimentModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx index d1b7a47ac74..8301c06ef53 100644 --- a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx +++ b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx @@ -75,7 +75,7 @@ export function OnboardingExperimentModal() { { - segment.track('Buton Clicked - [Onboarding]', { + segment.track('Button Clicked - [Onboarding]', { action: 'Modal - Get started', experiment_id: '2024-w15-onb', _organization: currentOrganization?._id, From d1c7fc8a96ef67eaf560726d550e131c49713596 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Fri, 12 Apr 2024 17:11:54 +0530 Subject: [PATCH 11/15] fix: add const for local storage key --- apps/web/package.json | 2 +- .../web/src/constants/experimentsConstants.ts | 1 + .../auth/components/QuestionnaireForm.tsx | 3 +- .../components/OnboardingExperimentModal.tsx | 26 +++++++++-------- .../pages/quick-start/steps/GetStarted.tsx | 3 +- .../components/TriggerSnippetTabs.tsx | 29 +++++++++---------- .../templates/workflow/WorkflowEditor.tsx | 2 +- 7 files changed, 35 insertions(+), 31 deletions(-) create mode 100644 apps/web/src/constants/experimentsConstants.ts diff --git a/apps/web/package.json b/apps/web/package.json index 99a040fd04e..84356a43fd5 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -3,7 +3,7 @@ "version": "0.24.1", "private": true, "scripts": { - "start": "pnpm panda --watch & cross-env NODE_OPTIONS=--max_old_space_size=8192 PORT=4200 react-app-rewired start", + "start": "pnpm panda --watch & cross-env PORT=4200 react-app-rewired start", "prebuild": "rimraf build", "build": "pnpm panda && cross-env NODE_OPTIONS=--max_old_space_size=4096 GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=4096 build", "precommit": "lint-staged", diff --git a/apps/web/src/constants/experimentsConstants.ts b/apps/web/src/constants/experimentsConstants.ts new file mode 100644 index 00000000000..2720076d019 --- /dev/null +++ b/apps/web/src/constants/experimentsConstants.ts @@ -0,0 +1 @@ +export const OnboardingExperimentV2ModalKey = 'nv_onboarding_modal'; diff --git a/apps/web/src/pages/auth/components/QuestionnaireForm.tsx b/apps/web/src/pages/auth/components/QuestionnaireForm.tsx index a43b972a548..d698ba91821 100644 --- a/apps/web/src/pages/auth/components/QuestionnaireForm.tsx +++ b/apps/web/src/pages/auth/components/QuestionnaireForm.tsx @@ -26,6 +26,7 @@ import { useVercelIntegration, useVercelParams } from '../../../hooks'; import { ROUTES } from '../../../constants/routes.enum'; import { DynamicCheckBox } from './dynamic-checkbox/DynamicCheckBox'; import styled from '@emotion/styled/macro'; +import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants'; export function QuestionnaireForm() { const [loading, setLoading] = useState(); @@ -66,7 +67,7 @@ export function QuestionnaireForm() { const createDto: ICreateOrganizationDto = { ...rest, name: organizationName }; const organization = await createOrganizationMutation(createDto); const organizationResponseToken = await api.post(`/v1/auth/organizations/${organization._id}/switch`, {}); - localStorage.setItem('onboarding_modal', 'true'); + localStorage.setItem(OnboardingExperimentV2ModalKey, 'true'); setToken(organizationResponseToken); } diff --git a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx index 8301c06ef53..4aaf6e36e00 100644 --- a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx +++ b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx @@ -5,6 +5,8 @@ import styled from '@emotion/styled'; import { colors, shadows, Title, Button } from '@novu/design-system'; import { useAuthContext, useSegment } from '@novu/shared-web'; import { useCreateOnboardingExperimentWorkflow } from '../../../api/hooks/notification-templates/useCreateOnboardingExperimentWorkflow'; +import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants'; +import { OnBoardingAnalyticsEnum } from '../consts'; export function OnboardingExperimentModal() { const [opened, setOpened] = useState(true); @@ -47,44 +49,44 @@ export function OnboardingExperimentModal() { - {'Send test notification'} - {'Learn how to setup a workflow and send your first email notification.'} + Send test notification + Learn how to setup a workflow and send your first email notification. { - segment.track('Button Clicked - [Onboarding]', { + segment.track(OnBoardingAnalyticsEnum.ONBOARDING_EXPERIMENT_TEST_NOTIFICATION, { action: 'Modal - Send test notification', experiment_id: '2024-w15-onb', _organization: currentOrganization?._id, }); - localStorage.removeItem('onboarding_modal'); + localStorage.removeItem(OnboardingExperimentV2ModalKey); createOnboardingExperimentWorkflow(); }} > - {'Send test notification now'} + Send test notification now - {'Look around'} - {'Start exploring the Novu app on your own terms'} + Look around + Start exploring the Novu app on your own terms { - segment.track('Button Clicked - [Onboarding]', { + segment.track(OnBoardingAnalyticsEnum.ONBOARDING_EXPERIMENT_TEST_NOTIFICATION, { action: 'Modal - Get started', experiment_id: '2024-w15-onb', _organization: currentOrganization?._id, }); - localStorage.removeItem('onboarding_modal'); + localStorage.removeItem(OnboardingExperimentV2ModalKey); setOpened(false); }} > - {'Get started'} + Get started diff --git a/apps/web/src/pages/quick-start/steps/GetStarted.tsx b/apps/web/src/pages/quick-start/steps/GetStarted.tsx index 2fb0e14b6a4..78cffc5ae91 100644 --- a/apps/web/src/pages/quick-start/steps/GetStarted.tsx +++ b/apps/web/src/pages/quick-start/steps/GetStarted.tsx @@ -11,6 +11,7 @@ import { NavButton } from '../components/NavButton'; import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts'; import { OnboardingExperimentModal } from '../components/OnboardingExperimentModal'; import { ENV, IS_DOCKER_HOSTED, useAuthContext } from '@novu/shared-web'; +import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants'; const ChannelsConfigurationHolder = styled.div` display: flex; @@ -35,7 +36,7 @@ export function GetStarted() { const isNovuProd = !IS_DOCKER_HOSTED && ENV === 'production'; // open modal only for prod users - const isOnboardingModalEnabled = isNovuProd && localStorage.getItem('onboarding_modal') === 'true'; + const isOnboardingModalEnabled = isNovuProd && localStorage.getItem(OnboardingExperimentV2ModalKey) === 'true'; const onIntegrationModalClose = () => setClickedChannel({ open: false }); diff --git a/apps/web/src/pages/templates/components/TriggerSnippetTabs.tsx b/apps/web/src/pages/templates/components/TriggerSnippetTabs.tsx index 19c7e846d5a..e7d31ec13f7 100644 --- a/apps/web/src/pages/templates/components/TriggerSnippetTabs.tsx +++ b/apps/web/src/pages/templates/components/TriggerSnippetTabs.tsx @@ -66,8 +66,7 @@ novu.trigger('${identifier}', ${JSON.stringify( 2 ) .replace(/"([^"]+)":/g, '$1:') - .replace(/"/g, "'") - .replaceAll('\n', '\n ')}); + .replace(/"/g, "'")}); `; return ( @@ -85,19 +84,19 @@ export const getCurlTriggerSnippet = ( snippet?: Record ) => { const curlSnippet = `curl --location --request POST '${API_ROOT}/v1/events/trigger' \\ - --header 'Authorization: ApiKey ' \\ - --header 'Content-Type: application/json' \\ - --data-raw '${JSON.stringify( - { - name: identifier, - to, - payload, - overrides, - ...snippet, - }, - null, - 2 - ).replaceAll('\n', '\n ')}' +--header 'Authorization: ApiKey ' \\ +--header 'Content-Type: application/json' \\ +--data-raw '${JSON.stringify( + { + name: identifier, + to, + payload, + overrides, + ...snippet, + }, + null, + 2 + )}' `; return ( diff --git a/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx b/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx index fcbb4ae8234..61b3ac9c551 100644 --- a/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx +++ b/apps/web/src/pages/templates/workflow/WorkflowEditor.tsx @@ -293,7 +293,7 @@ const WorkflowEditor = () => { }} data-test-id="get-snippet-btn" > - {tagsIncludesOnboarding ? 'Trigger Notification' : 'Get Snippet'} + Trigger Notification From 59b4243c78f8728117cf75f7123ed4278c3eb0bd Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Fri, 12 Apr 2024 15:44:47 +0300 Subject: [PATCH 12/15] chore(repo): Stream logs in local dev Teach learn to stream logs when local development starts via pnpm start:dev. This eases the local development lifecycle. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2add5564652..e246828dc2b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "generate:provider": "npx hygen provider new --version 0.24.0", "lint": "nx run-many --target=lint --all", "test": "cross-env CI=true lerna run test:watch --parallel", - "start:dev": "cross-env TZ=UTC lerna run start:dev --parallel --concurrency=20 --scope=@novu/{api,worker,web,widget,ws,notification-center}", + "start:dev": "cross-env TZ=UTC lerna run start:dev --stream --parallel --concurrency=20 --scope=@novu/{api,worker,web,widget,ws,notification-center}", "start:web": "cross-env nx run @novu/web:start", "start:ws": "cross-env nx run @novu/ws:start", "start:webhook": "cross-env nx run @novu/webhook:start", From d0de31ed10634b7a191ffee284307345951a2002 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Fri, 12 Apr 2024 19:26:03 +0530 Subject: [PATCH 13/15] fix: remove prod only condition --- apps/web/src/pages/quick-start/steps/GetStarted.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/pages/quick-start/steps/GetStarted.tsx b/apps/web/src/pages/quick-start/steps/GetStarted.tsx index 78cffc5ae91..4a01f78f9b0 100644 --- a/apps/web/src/pages/quick-start/steps/GetStarted.tsx +++ b/apps/web/src/pages/quick-start/steps/GetStarted.tsx @@ -10,7 +10,7 @@ import { GetStartedLayout } from '../components/layout/GetStartedLayout'; import { NavButton } from '../components/NavButton'; import { getStartedSteps, OnBoardingAnalyticsEnum } from '../consts'; import { OnboardingExperimentModal } from '../components/OnboardingExperimentModal'; -import { ENV, IS_DOCKER_HOSTED, useAuthContext } from '@novu/shared-web'; +import { useAuthContext } from '@novu/shared-web'; import { OnboardingExperimentV2ModalKey } from '../../../constants/experimentsConstants'; const ChannelsConfigurationHolder = styled.div` @@ -34,9 +34,7 @@ export function GetStarted() { channelType?: ChannelTypeEnum; }>({ open: false }); - const isNovuProd = !IS_DOCKER_HOSTED && ENV === 'production'; - // open modal only for prod users - const isOnboardingModalEnabled = isNovuProd && localStorage.getItem(OnboardingExperimentV2ModalKey) === 'true'; + const isOnboardingModalEnabled = localStorage.getItem(OnboardingExperimentV2ModalKey) === 'true'; const onIntegrationModalClose = () => setClickedChannel({ open: false }); From 85219d8b41100c4412a7f3df83d0e1b4c5b4f944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Fri, 12 Apr 2024 17:09:19 +0200 Subject: [PATCH 14/15] chore(web): fixed description in the onboarding experiment modal --- .../quick-start/components/OnboardingExperimentModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx index 4aaf6e36e00..e02139bcea6 100644 --- a/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx +++ b/apps/web/src/pages/quick-start/components/OnboardingExperimentModal.tsx @@ -49,8 +49,8 @@ export function OnboardingExperimentModal() { - Send test notification - Learn how to setup a workflow and send your first email notification. + Send test notification + Learn how to set up a workflow and send your first email notification. Date: Sun, 14 Apr 2024 12:33:43 +0300 Subject: [PATCH 15/15] feat: update source --- .source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.source b/.source index b6ab9bdab2f..c7398957a7a 160000 --- a/.source +++ b/.source @@ -1 +1 @@ -Subproject commit b6ab9bdab2f8092d6a8e7d43719b37828d2d8bd1 +Subproject commit c7398957a7aabb717dab081d59b1da1750f4b7de