From aba9e7ccd54ba013e38e826a22c4f8079228a60a Mon Sep 17 00:00:00 2001 From: Li Yi Yu Date: Thu, 26 Oct 2023 12:30:06 -0400 Subject: [PATCH 1/3] update dismiss to dismissed --- frontend/src/lib/taxonomy.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/taxonomy.tsx b/frontend/src/lib/taxonomy.tsx index 7a373e00af326..565787c50e069 100644 --- a/frontend/src/lib/taxonomy.tsx +++ b/frontend/src/lib/taxonomy.tsx @@ -805,8 +805,8 @@ export function getKeyMapping( description: `Whether the user responded to survey with ID: "${surveyId}".`, } } - } else if (value.startsWith('$survey_dismiss/')) { - const surveyId = value.replace(/^\$survey_dismiss\//, '') + } else if (value.startsWith('$survey_dismissed/')) { + const surveyId = value.replace(/^\$survey_dismissed\//, '') if (surveyId) { return { label: `Survey Dismissed: ${surveyId}`, From f58c633834b941a6ab7ccf6a44b042fb68740960 Mon Sep 17 00:00:00 2001 From: Li Yi Yu Date: Thu, 26 Oct 2023 12:30:28 -0400 Subject: [PATCH 2/3] add survey responded user property --- frontend/src/lib/taxonomy.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/lib/taxonomy.tsx b/frontend/src/lib/taxonomy.tsx index 565787c50e069..afa765e238a17 100644 --- a/frontend/src/lib/taxonomy.tsx +++ b/frontend/src/lib/taxonomy.tsx @@ -826,6 +826,14 @@ export function getKeyMapping( description: `The response value for the ${index}${suffix} question in the survey.`, } } + } else if (value.startsWith('$survey_responded/')) { + const surveyId = value.replace(/^\$survey_responded\//, '') + if (surveyId) { + return { + label: `Survey Responded: ${surveyId}`, + description: `Whether the user responded to survey with ID: "${surveyId}".`, + } + } } else if (value.startsWith('$feature/')) { const featureFlagKey = value.replace(/^\$feature\//, '') if (featureFlagKey) { From 67c171327eb01c36fe4fc24ad8c3d2b8f53664d5 Mon Sep 17 00:00:00 2001 From: Li Yi Yu Date: Thu, 26 Oct 2023 12:37:49 -0400 Subject: [PATCH 3/3] survey responded fix --- frontend/src/lib/taxonomy.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/frontend/src/lib/taxonomy.tsx b/frontend/src/lib/taxonomy.tsx index afa765e238a17..b14a3ac55423e 100644 --- a/frontend/src/lib/taxonomy.tsx +++ b/frontend/src/lib/taxonomy.tsx @@ -797,8 +797,8 @@ export function getKeyMapping( data.description = `${data.description} Data from the first time this user was seen.` } return data - } else if (value.startsWith('$survey_response/')) { - const surveyId = value.replace(/^\$survey_response\//, '') + } else if (value.startsWith('$survey_responded/')) { + const surveyId = value.replace(/^\$survey_responded\//, '') if (surveyId) { return { label: `Survey Responded: ${surveyId}`, @@ -826,14 +826,6 @@ export function getKeyMapping( description: `The response value for the ${index}${suffix} question in the survey.`, } } - } else if (value.startsWith('$survey_responded/')) { - const surveyId = value.replace(/^\$survey_responded\//, '') - if (surveyId) { - return { - label: `Survey Responded: ${surveyId}`, - description: `Whether the user responded to survey with ID: "${surveyId}".`, - } - } } else if (value.startsWith('$feature/')) { const featureFlagKey = value.replace(/^\$feature\//, '') if (featureFlagKey) {