From abf0a957dded9bd92df6f8fe65b7d7fbd2130407 Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Thu, 10 Jul 2025 10:26:01 +0200 Subject: [PATCH] Fix "How's the navigation working for you?" shown with each session (#227199) ## Summary fix https://github.com/elastic/kibana/issues/227157 (cherry picked from commit adaac2e07392a88f74f79239ae44aa79149308fc) --- .../navigation/src/ui/components/feedback_btn.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/shared-ux/chrome/navigation/src/ui/components/feedback_btn.tsx b/packages/shared-ux/chrome/navigation/src/ui/components/feedback_btn.tsx index 182838d88b5d6..13839a4be0a30 100644 --- a/packages/shared-ux/chrome/navigation/src/ui/components/feedback_btn.tsx +++ b/packages/shared-ux/chrome/navigation/src/ui/components/feedback_btn.tsx @@ -25,13 +25,15 @@ interface Props { export const FeedbackBtn: FC = ({ solutionId }) => { const { euiTheme } = useEuiTheme(); - const [showCallOut, setShowCallOut] = useState( - sessionStorage.getItem(FEEDBACK_BTN_KEY) !== 'hidden' - ); + const [showCallOut, setShowCallOut] = useState(() => { + const storedValue = + localStorage.getItem(FEEDBACK_BTN_KEY) || sessionStorage.getItem(FEEDBACK_BTN_KEY); + return storedValue !== 'hidden'; + }); const onDismiss = () => { setShowCallOut(false); - sessionStorage.setItem(FEEDBACK_BTN_KEY, 'hidden'); + localStorage.setItem(FEEDBACK_BTN_KEY, 'hidden'); }; const onClick = () => {