From 5912f450ced5e10f346a2acc13305e74691dd1a5 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Thu, 29 Feb 2024 13:52:35 +0100 Subject: [PATCH] feat: ask for feedback just before simulation explanation we want to get more feedback from user, so we ask for feedback just after the simulation bloc --- site/source/components/Feedback/Feedback.tsx | 35 ++++++++++---------- site/source/components/Simulation/index.tsx | 18 +++++++++- 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/site/source/components/Feedback/Feedback.tsx b/site/source/components/Feedback/Feedback.tsx index 578dba6ad..7adb90cd9 100644 --- a/site/source/components/Feedback/Feedback.tsx +++ b/site/source/components/Feedback/Feedback.tsx @@ -9,13 +9,11 @@ import { Emoji } from '@/design-system/emoji' import { Spacing } from '@/design-system/layout' import { Strong } from '@/design-system/typography' import { H4 } from '@/design-system/typography/heading' -import { StyledLink } from '@/design-system/typography/link' -import { Body, SmallBody } from '@/design-system/typography/paragraphs' +import { Body } from '@/design-system/typography/paragraphs' import { useSitePaths } from '@/sitePaths' import * as safeLocalStorage from '../../storage/safeLocalStorage' import { JeDonneMonAvis } from '../JeDonneMonAvis' -import { INSCRIPTION_LINK } from '../layout/Footer/InscriptionBetaTesteur' import FeedbackForm from './FeedbackForm' import FeedbackRating, { FeedbackT } from './FeedbackRating' import { useFeedback } from './useFeedback' @@ -29,7 +27,7 @@ const setFeedbackGivenForUrl = (url: string) => { } // Ask for feedback again after 4 months -const getShouldAskFeedback = (url: string) => { +export const getShouldAskFeedback = (url: string) => { const previousFeedbackDate = safeLocalStorage.getItem(localStorageKey(url)) if (!previousFeedbackDate) { return true @@ -96,6 +94,7 @@ export function Feedback({ + {/* TODO : reactivate when we need new beta-testeurs Pour continuer à donner votre avis et accéder aux nouveautés en @@ -107,7 +106,7 @@ export function Feedback({ inscrivez-vous sur la liste des beta-testeur - + */} ) : ( <> @@ -122,18 +121,20 @@ export function Feedback({ {isSimulateurSalaire ? ( ) : ( - +
+ +
)} {isShowingSuggestionForm && ( + {firstStepCompleted && !hideDetails && shouldShowFeedback && ( + theme.colors.bases.primary[700]} + forceTheme="dark" + style={{ + textAlign: 'center', + padding: '1rem', + paddingBottom: '2rem', + }} + > + + + )} {firstStepCompleted && !hideDetails && explanations} )