From c69036c5a951413388bc4b20c910208e4f533f79 Mon Sep 17 00:00:00 2001
From: Mateusz Kwasniewski
Date: Tue, 27 Aug 2024 15:47:55 +0200
Subject: [PATCH] feat: new in unleash tooltip (#7991)
---
.../FeatureLifecycleTooltip.tsx | 2 +-
.../NewInUnleash/NewInUnleash.tsx | 83 +++++++----
.../NewInUnleash/NewInUnleashItem.tsx | 79 ++++++++---
.../NewInUnleash/NewInUnleashTooltip.tsx | 129 ++++++++++++++++++
4 files changed, 245 insertions(+), 48 deletions(-)
create mode 100644 frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleashTooltip.tsx
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureLifecycle/FeatureLifecycleTooltip.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureLifecycle/FeatureLifecycleTooltip.tsx
index 9f262a51cf..46d597c98d 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureLifecycle/FeatureLifecycleTooltip.tsx
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureLifecycle/FeatureLifecycleTooltip.tsx
@@ -105,7 +105,7 @@ const StageBox = styled(Box, {
const ColorFill = styled(Box)(({ theme }) => ({
backgroundColor: theme.palette.primary.light,
color: theme.palette.primary.contrastText,
- borderRadius: theme.spacing(0, 0, 1, 1), // has to match the parent tooltip container
+ borderRadius: `0 0 ${theme.shape.borderRadiusMedium}px ${theme.shape.borderRadiusMedium}px`, // has to match the parent tooltip container
margin: theme.spacing(-1, -1.5), // has to match the parent tooltip container
padding: theme.spacing(2, 3),
}));
diff --git a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx
index 754b019ed7..f94cb8c028 100644
--- a/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx
+++ b/frontend/src/component/layout/MainLayout/NavigationSidebar/NewInUnleash/NewInUnleash.tsx
@@ -12,7 +12,6 @@ import {
styled,
} from '@mui/material';
import Signals from '@mui/icons-material/Sensors';
-import { useNavigate } from 'react-router-dom';
import type { NavigationMode } from 'component/layout/MainLayout/NavigationSidebar/NavigationMode';
import { NewInUnleashItem } from './NewInUnleashItem';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
@@ -71,7 +70,9 @@ type NewItem = {
label: string;
icon: ReactNode;
link: string;
+ docsLink: string;
show: boolean;
+ longDescription: ReactNode;
};
interface INewInUnleashProps {
@@ -86,7 +87,6 @@ export const NewInUnleash = ({
onMiniModeClick,
}: INewInUnleashProps) => {
const { trackEvent } = usePlausibleTracker();
- const navigate = useNavigate();
const [seenItems, setSeenItems] = useLocalStorageState(
'new-in-unleash-seen:v1',
new Set(),
@@ -99,7 +99,35 @@ export const NewInUnleash = ({
label: 'Signals & Actions',
icon: ,
link: '/integrations/signals',
+ docsLink: 'https://docs.getunleash.io/reference/signals',
show: isEnterprise() && signalsEnabled,
+ longDescription: (
+ <>
+
+ It allows you to respond to events in your real-time
+ monitoring system by automating tasks such as disabling
+ a beta feature in response to an increase in errors or a
+ drop in conversion rates.
+
+
+
+
+
+ Signal endpoints are used to send signals
+ to Unleash. This allows you to integrate Unleash
+ with any external tool.
+
+
+
+ Actions, which are configured inside
+ projects, allow you to react to those signals
+ and enable or disable flags based on certain
+ conditions.
+