@@ -12,10 +12,6 @@ import { recommendationsSelector, resetRecommendationsHighlighting } from 'uiSrc
1212import { InsightsPanelTabs } from 'uiSrc/slices/interfaces/insights'
1313import { sendEventTelemetry , TELEMETRY_EMPTY_VALUE , TelemetryEvent } from 'uiSrc/telemetry'
1414import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
15- import HighlightedFeature from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
16- import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
17- import { appFeatureHighlightingSelector , removeFeatureFromHighlighting } from 'uiSrc/slices/app/features'
18- import { getHighlightingFeatures } from 'uiSrc/utils/highlighting'
1915
2016import styles from './styles.module.scss'
2117
@@ -29,9 +25,6 @@ const InsightsTrigger = (props: Props) => {
2925 const { isHighlighted, } = useSelector ( recommendationsSelector )
3026 const { provider } = useSelector ( connectedInstanceSelector )
3127
32- const { features } = useSelector ( appFeatureHighlightingSelector )
33- const { insights : insightsHighlighting } = getHighlightingFeatures ( features )
34-
3528 const dispatch = useDispatch ( )
3629 const { pathname, search } = useLocation ( )
3730 const { instanceId } = useParams < { instanceId : string } > ( )
@@ -67,45 +60,37 @@ const InsightsTrigger = (props: Props) => {
6760 tab : isHighlighted ? InsightsPanelTabs . Recommendations : tabSelected ,
6861 } ,
6962 } )
70-
71- dispatch ( removeFeatureFromHighlighting ( 'insights' ) )
7263 }
7364
7465 return (
7566 < div
7667 className = { cx ( styles . container , { [ styles . isOpen ] : isInsightsOpen } ) }
7768 >
78- < HighlightedFeature
79- isHighlight = { insightsHighlighting && ! isHighlighted }
80- hideFirstChild = { ! isHighlighted }
81- { ...( BUILD_FEATURES . insights || { } ) }
69+ < EuiToolTip
70+ title = { isHighlighted && instanceId ? undefined : 'Insights' }
71+ content = { isHighlighted && instanceId
72+ ? 'New tips are available'
73+ : 'Open interactive tutorials to learn more about Redis or Redis Stack capabilities, or use tips to improve your database.' }
8274 >
83- < EuiToolTip
84- title = { isHighlighted && instanceId ? undefined : 'Insights' }
85- content = { isHighlighted && instanceId
86- ? 'New tips are available'
87- : 'Open interactive tutorials to learn more about Redis or Redis Stack capabilities, or use tips to improve your database.' }
75+ < EuiButton
76+ fill
77+ size = "s"
78+ color = "secondary"
79+ className = { styles . btn }
80+ role = "button"
81+ iconType = { TriggerIcon }
82+ onClick = { handleClickTrigger }
83+ data-testid = "insights-trigger"
8884 >
89- < EuiButton
90- fill
91- size = "s"
92- color = "secondary"
93- className = { styles . btn }
94- role = "button"
95- iconType = { TriggerIcon }
96- onClick = { handleClickTrigger }
97- data-testid = "insights-trigger"
85+ < EuiText className = { cx (
86+ styles . triggerText ,
87+ ) }
9888 >
99- < EuiText className = { cx (
100- styles . triggerText ,
101- ) }
102- >
103- Insights
104- </ EuiText >
105- { ( isHighlighted && instanceId ) && ( < span className = { styles . highlighting } /> ) }
106- </ EuiButton >
107- </ EuiToolTip >
108- </ HighlightedFeature >
89+ Insights
90+ </ EuiText >
91+ { ( isHighlighted && instanceId ) && ( < span className = { styles . highlighting } /> ) }
92+ </ EuiButton >
93+ </ EuiToolTip >
10994 </ div >
11095 )
11196}
0 commit comments