@@ -12,10 +12,6 @@ import { recommendationsSelector, resetRecommendationsHighlighting } from 'uiSrc
12
12
import { InsightsPanelTabs } from 'uiSrc/slices/interfaces/insights'
13
13
import { sendEventTelemetry , TELEMETRY_EMPTY_VALUE , TelemetryEvent } from 'uiSrc/telemetry'
14
14
import { 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'
19
15
20
16
import styles from './styles.module.scss'
21
17
@@ -29,9 +25,6 @@ const InsightsTrigger = (props: Props) => {
29
25
const { isHighlighted, } = useSelector ( recommendationsSelector )
30
26
const { provider } = useSelector ( connectedInstanceSelector )
31
27
32
- const { features } = useSelector ( appFeatureHighlightingSelector )
33
- const { insights : insightsHighlighting } = getHighlightingFeatures ( features )
34
-
35
28
const dispatch = useDispatch ( )
36
29
const { pathname, search } = useLocation ( )
37
30
const { instanceId } = useParams < { instanceId : string } > ( )
@@ -67,45 +60,37 @@ const InsightsTrigger = (props: Props) => {
67
60
tab : isHighlighted ? InsightsPanelTabs . Recommendations : tabSelected ,
68
61
} ,
69
62
} )
70
-
71
- dispatch ( removeFeatureFromHighlighting ( 'insights' ) )
72
63
}
73
64
74
65
return (
75
66
< div
76
67
className = { cx ( styles . container , { [ styles . isOpen ] : isInsightsOpen } ) }
77
68
>
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.' }
82
74
>
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"
88
84
>
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
+ ) }
98
88
>
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 >
109
94
</ div >
110
95
)
111
96
}
0 commit comments