diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx index e8f58d5be0..d9a899dfb0 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx @@ -1,6 +1,7 @@ import { type ReactNode, type VFC, useState } from 'react'; import { Box, + Button, IconButton, Tooltip, useMediaQuery, @@ -22,6 +23,8 @@ import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions'; import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog'; import type { FeatureSchema } from 'openapi'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; +import ReviewsOutlined from '@mui/icons-material/ReviewsOutlined'; +import { useFeedback } from '../../../../feedbackNew/useFeedback'; interface IProjectFeatureTogglesHeaderProps { isLoading?: boolean; @@ -56,6 +59,10 @@ export const ProjectFeatureTogglesHeader: VFC< const [showExportDialog, setShowExportDialog] = useState(false); const navigate = useNavigate(); const { trackEvent } = usePlausibleTracker(); + const projectOverviewRefactorFeedback = useUiFlag( + 'projectOverviewRefactorFeedback', + ); + const { openFeedback } = useFeedback('newProjectOverview', 'automatic'); const handleSearch = (query: string) => { onChangeSearchQuery?.(query); trackEvent('search-bar', { @@ -66,6 +73,16 @@ export const ProjectFeatureTogglesHeader: VFC< }); }; + const createFeedbackContext = () => { + openFeedback({ + title: 'How easy was it to work with the project overview in Unleash?', + positiveLabel: + 'What do you like most about the updated project overview?', + areasForImprovementsLabel: + 'What improvements are needed in the project overview?', + }); + }; + return ( } /> + } + onClick={createFeedbackContext} + variant='outlined' + data-loading + > + Provide feedback + + } + /> navigate(getCreateTogglePath(projectId))