From 0b8952773656ba9a10e1d72606bc3d7a084e21d9 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 15 Nov 2024 10:08:51 +0100 Subject: [PATCH] 1-3124: wrap the component in base modal This steals and traps focus --- .../feedbackNew/FeedbackComponent.tsx | 381 +++++++++--------- 1 file changed, 200 insertions(+), 181 deletions(-) diff --git a/frontend/src/component/feedbackNew/FeedbackComponent.tsx b/frontend/src/component/feedbackNew/FeedbackComponent.tsx index 92fc3506c1bf..7ac572776167 100644 --- a/frontend/src/component/feedbackNew/FeedbackComponent.tsx +++ b/frontend/src/component/feedbackNew/FeedbackComponent.tsx @@ -22,6 +22,7 @@ import type { FeedbackData, FeedbackMode } from './FeedbackContext'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; import { useUiFlag } from 'hooks/useUiFlag'; import useUserType from './useUserType'; +import { BaseModal } from 'component/common/SidebarModal/SidebarModal'; export const ParentContainer = styled('div')(({ theme }) => ({ position: 'relative', @@ -281,188 +282,206 @@ export const FeedbackComponent = ({ - closeFeedback()}> - - - - - - - - - Help us improve Unleash - - - - - {feedbackData.title} - - - {[1, 2, 3, 4, 5, 6, 7].map( - (score) => ( - - - {score} - - ), - )} - - - - Very difficult - - - Very easy - - - - - {feedbackComments !== false && - feedbackComments.enabled && - feedbackComments.name === - 'withoutComments' ? ( - <> - - - - - - ) : ( - <> - - - {feedbackData.positiveLabel} - - - - - - { - feedbackData.areasForImprovementsLabel - } - - - - - )} - - - - Send Feedback - - - Don't ask me again - - } + + + closeFeedback()}> + + + + + + + + + Help us improve Unleash + + + + - - - - - - + + {feedbackData.title} + + + + {[1, 2, 3, 4, 5, 6, 7].map( + (score) => ( + + + {score} + + ), + )} + + + + Very difficult + + + Very easy + + + + + {feedbackComments !== false && + feedbackComments.enabled && + feedbackComments.name === + 'withoutComments' ? ( + <> + + + + + + ) : ( + <> + + + { + feedbackData.positiveLabel + } + + + + + + { + feedbackData.areasForImprovementsLabel + } + + + + + )} + + + + Send Feedback + + + Don't ask me again + + } + /> + + + + + + + } /> );