Skip to content

Commit 3a415ee

Browse files
Merge pull request #2940 from RedisInsight/fe/feature/RI-5256_rename-recommendations
#RI-5256 - rename recommendations to tips
2 parents dbbe0e6 + 88b8f91 commit 3a415ee

File tree

37 files changed

+176
-167
lines changed

37 files changed

+176
-167
lines changed

redisinsight/ui/src/components/database-side-panels/DatabaseSidePanels.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('DatabaseSidePanels', () => {
112112

113113
(insightsPanelSelector as jest.Mock).mockReturnValue({
114114
isOpen: true,
115-
tabSelected: 'recommendations'
115+
tabSelected: 'tips'
116116
})
117117

118118
render(<DatabaseSidePanels />)
@@ -138,7 +138,7 @@ describe('DatabaseSidePanels', () => {
138138
it('should render recommendations count with totalUnread > 0', () => {
139139
(insightsPanelSelector as jest.Mock).mockReturnValue({
140140
isOpen: true,
141-
tabSelected: 'recommendations'
141+
tabSelected: 'tips'
142142
});
143143

144144
(recommendationsSelector as jest.Mock).mockImplementationOnce(() => ({
@@ -161,7 +161,7 @@ describe('DatabaseSidePanels', () => {
161161

162162
(insightsPanelSelector as jest.Mock).mockReturnValue({
163163
isOpen: true,
164-
tabSelected: 'recommendations'
164+
tabSelected: 'tips'
165165
})
166166

167167
render(<DatabaseSidePanels />)
@@ -174,7 +174,7 @@ describe('DatabaseSidePanels', () => {
174174
databaseId: 'instanceId',
175175
provider: 'RE_CLOUD',
176176
page: '/triggered-functions/libraries',
177-
tab: 'recommendations'
177+
tab: 'tips'
178178
},
179179
});
180180

@@ -189,7 +189,7 @@ describe('DatabaseSidePanels', () => {
189189

190190
(insightsPanelSelector as jest.Mock).mockReturnValue({
191191
isOpen: true,
192-
tabSelected: 'recommendations'
192+
tabSelected: 'tips'
193193
})
194194

195195
render(<DatabaseSidePanels />)
@@ -200,7 +200,7 @@ describe('DatabaseSidePanels', () => {
200200
event: TelemetryEvent.INSIGHTS_PANEL_TAB_CHANGED,
201201
eventData: {
202202
databaseId: 'instanceId',
203-
prevTab: 'recommendations',
203+
prevTab: 'tips',
204204
currentTab: 'explore',
205205
},
206206
});

redisinsight/ui/src/components/database-side-panels/DatabaseSidePanels.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const DatabaseSidePanels = (props: Props) => {
143143
anchorWrapperClassName={styles.onboardingAnchorWrapper}
144144
fullSize
145145
>
146-
<span className={styles.tabName}>Explore Redis</span>
146+
<span className={styles.tabName}>Explore</span>
147147
</OnboardingTour>
148148
</EuiTab>
149149
<EuiTab
@@ -153,7 +153,7 @@ const DatabaseSidePanels = (props: Props) => {
153153
data-testid="recommendations-tab"
154154
>
155155
<>
156-
<span className={styles.tabName}>Redis Tips</span>
156+
<span className={styles.tabName}>Tips</span>
157157
{!!totalUnread && (
158158
<div
159159
className={styles.tabTotalUnread}

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/LiveTimeRecommendations.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe('LiveTimeRecommendations', () => {
127127

128128
expect(pushMock).toHaveBeenCalledWith(Pages.databaseAnalysis('instanceId'))
129129
expect(sendEventTelemetry).toBeCalledWith({
130-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_DATABASE_ANALYSIS_CLICKED,
130+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
131131
eventData: {
132132
databaseId: 'instanceId',
133133
total: 1,
@@ -151,7 +151,7 @@ describe('LiveTimeRecommendations', () => {
151151
fireEvent.click(queryByTestId('checkbox-show-hidden')!)
152152

153153
expect(sendEventTelemetry).toBeCalledWith({
154-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_SHOW_HIDDEN,
154+
event: TelemetryEvent.INSIGHTS_TIPS_SHOW_HIDDEN,
155155
eventData: {
156156
databaseId: 'instanceId',
157157
list: RECOMMENDATIONS_DATA_MOCK.recommendations?.map(({ name }) =>

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/LiveTimeRecommendations.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const LiveTimeRecommendations = () => {
6969
dispatch(createNewAnalysis(instanceId, delimiter))
7070
history.push(Pages.databaseAnalysis(instanceId))
7171
sendEventTelemetry({
72-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_DATABASE_ANALYSIS_CLICKED,
72+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
7373
eventData: {
7474
databaseId: instanceId,
7575
total: recommendations?.length,
@@ -83,7 +83,7 @@ const LiveTimeRecommendations = () => {
8383
dispatch(setRecommendationsShowHidden(value))
8484

8585
sendEventTelemetry({
86-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_SHOW_HIDDEN,
86+
event: TelemetryEvent.INSIGHTS_TIPS_SHOW_HIDDEN,
8787
eventData: {
8888
action: !value ? 'hide' : 'show',
8989
...getTelemetryData(recommendations)
@@ -129,19 +129,19 @@ const LiveTimeRecommendations = () => {
129129
{!!recommendations.length && (
130130
<div className={styles.actions}>
131131
<div>
132-
<EuiTextColor className={styles.boldText}>Our Recommendations</EuiTextColor>
132+
<EuiTextColor className={styles.boldText}>Our Tips</EuiTextColor>
133133
<EuiToolTip
134134
position="bottom"
135135
anchorClassName={styles.tooltipAnchor}
136136
className={styles.tooltip}
137137
content={(
138138
<>
139-
Recommendations will help you improve your database.
139+
Tips will help you improve your database.
140140
<br />
141-
New recommendations appear while you work with your database,
141+
New tips appear while you work with your database,
142142
including how to improve performance and optimize memory usage.
143143
<br />
144-
Eager for more recommendations? Run Database Analysis to get started.
144+
Eager for more tips? Run Database Analysis to get started.
145145
</>
146146
)}
147147
>
@@ -220,7 +220,7 @@ const LiveTimeRecommendations = () => {
220220
Database Analysis
221221
</EuiLink>
222222
</PopoverRunAnalyze>
223-
{' to get more recommendations'}
223+
{' to get more tips'}
224224
</EuiText>
225225
</div>
226226
</div>

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('Recommendation', () => {
7777

7878
expect(pushMock).toHaveBeenCalledWith({ search: 'guidePath=' })
7979
expect(sendEventTelemetry).toBeCalledWith({
80-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED,
80+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
8181
eventData: {
8282
databaseId: INSTANCE_ID_MOCK,
8383
name: 'searchJSON',
@@ -110,7 +110,7 @@ describe('Recommendation', () => {
110110
search: 'guidePath=quick-guides/working-with-hash.html'
111111
})
112112
expect(sendEventTelemetry).toBeCalledWith({
113-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED,
113+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
114114
eventData: {
115115
databaseId: INSTANCE_ID_MOCK,
116116
name: 'searchJSON',
@@ -144,7 +144,7 @@ describe('Recommendation', () => {
144144
search: 'guidePath=/redis_stack/working_with_json.md'
145145
})
146146
expect(sendEventTelemetry).toBeCalledWith({
147-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED,
147+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
148148
eventData: {
149149
databaseId: INSTANCE_ID_MOCK,
150150
name: 'searchJSON',

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/recommendation/Recommendation.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const Recommendation = ({
7070

7171
const handleRedirect = () => {
7272
sendEventTelemetry({
73-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED,
73+
event: TelemetryEvent.INSIGHTS_TIPS_TUTORIAL_CLICKED,
7474
eventData: {
7575
databaseId: instanceId,
7676
name: recommendationsContent[name].telemetryEvent || name,
@@ -89,7 +89,7 @@ const Recommendation = ({
8989
id,
9090
{ hide: !hide },
9191
({ hide, name }) => sendEventTelemetry({
92-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_HIDE,
92+
event: TelemetryEvent.INSIGHTS_TIPS_HIDE,
9393
eventData: {
9494
databaseId: instanceId,
9595
action: hide ? 'hide' : 'show',
@@ -114,7 +114,7 @@ const Recommendation = ({
114114

115115
const onSuccessActionDelete = () => {
116116
sendEventTelemetry({
117-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_SNOOZED,
117+
event: TelemetryEvent.INSIGHTS_TIPS_SNOOZED,
118118
eventData: {
119119
databaseId: instanceId,
120120
name: recommendationsContent[name]?.telemetryEvent ?? name,
@@ -125,7 +125,7 @@ const Recommendation = ({
125125

126126
const onRecommendationLinkClick = () => {
127127
sendEventTelemetry({
128-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_LINK_CLICKED,
128+
event: TelemetryEvent.INSIGHTS_TIPS_LINK_CLICKED,
129129
eventData: {
130130
databaseId: instanceId,
131131
name: recommendationsContent[name]?.telemetryEvent ?? name,
@@ -210,8 +210,8 @@ const Recommendation = ({
210210
</EuiFlexItem>
211211
<EuiFlexItem grow={false}>
212212
<EuiToolTip
213-
title="Snooze recommendation"
214-
content="This recommendation will be removed from the list and displayed again when relevant."
213+
title="Snooze tip"
214+
content="This tip will be removed from the list and displayed again when relevant."
215215
position="top"
216216
display="inlineBlock"
217217
anchorClassName="flex-row"
@@ -221,17 +221,17 @@ const Recommendation = ({
221221
iconType={SnoozeIcon}
222222
className={styles.snoozeBtn}
223223
onClick={handleDelete}
224-
aria-label="snooze recommendation"
224+
aria-label="snooze tip"
225225
data-testid={`${name}-delete-btn`}
226226
/>
227227
</EuiToolTip>
228228
</EuiFlexItem>
229229
<EuiFlexItem grow={false}>
230230
<EuiToolTip
231-
title={`${hide ? 'Show' : 'Hide'} recommendation`}
231+
title={`${hide ? 'Show' : 'Hide'} tip`}
232232
content={`${hide
233-
? 'This recommendation will be shown in the list.'
234-
: 'This recommendation will be removed from the list and not displayed again.'
233+
? 'This tip will be shown in the list.'
234+
: 'This tip will be removed from the list and not displayed again.'
235235
}`}
236236
position="top"
237237
display="inlineBlock"
@@ -242,7 +242,7 @@ const Recommendation = ({
242242
iconType={hide ? 'eyeClosed' : 'eye'}
243243
className={styles.hideBtn}
244244
onClick={toggleHide}
245-
aria-label="hide/unhide recommendation"
245+
aria-label="hide/unhide tip"
246246
data-testid={`toggle-hide-${name}-btn`}
247247
/>
248248
</EuiToolTip>

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describe('WelcomeScreen', () => {
9292
fireEvent.click(screen.getByTestId('approve-insights-db-analysis-btn'))
9393

9494
expect(sendEventTelemetry).toBeCalledWith({
95-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_DATABASE_ANALYSIS_CLICKED,
95+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
9696
eventData: {
9797
databaseId: 'instanceId',
9898
total: 1,

redisinsight/ui/src/components/database-side-panels/panels/live-time-recommendations/components/welcome-screen/WelcomeScreen.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const NoRecommendationsScreen = () => {
3131
dispatch(createNewAnalysis(instanceId, delimiter))
3232
history.push(Pages.databaseAnalysis(instanceId))
3333
sendEventTelemetry({
34-
event: TelemetryEvent.INSIGHTS_RECOMMENDATION_DATABASE_ANALYSIS_CLICKED,
34+
event: TelemetryEvent.INSIGHTS_TIPS_DATABASE_ANALYSIS_CLICKED,
3535
eventData: {
3636
databaseId: instanceId,
3737
total: recommendations?.length,
@@ -44,15 +44,15 @@ const NoRecommendationsScreen = () => {
4444
return (
4545
<div className={styles.container} data-testid="no-recommendations-screen">
4646
<EuiText className={styles.bigText}>Welcome to</EuiText>
47-
<EuiText className={styles.hugeText}>Recommendations!</EuiText>
47+
<EuiText className={styles.hugeText}>Tips!</EuiText>
4848
<EuiText className={styles.mediumText}>Where we help improve your database.</EuiText>
4949
<EuiText className={cx(styles.text, styles.bigMargin)}>
50-
New recommendations appear while you work with your database,
50+
New tips appear while you work with your database,
5151
including how to improve performance and optimize memory usage.
5252
</EuiText>
5353
<WelcomeIcon className={styles.icon} />
5454
<EuiText className={styles.text}>
55-
Eager for more recommendations? Run Database Analysis to get started.
55+
Eager for more tips? Run Database Analysis to get started.
5656
</EuiText>
5757

5858
<PopoverRunAnalyze

redisinsight/ui/src/components/insights-trigger/InsightsTrigger.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ describe('InsightsTrigger', () => {
8787
provider: 'RE_CLOUD',
8888
source: 'overview',
8989
page: '/browser',
90-
tab: 'recommendations'
90+
tab: 'tips'
9191
},
92-
})
92+
});
9393

94-
sendEventTelemetry.mockRestore()
94+
(sendEventTelemetry as jest.Mock).mockRestore()
9595
})
9696
})

redisinsight/ui/src/components/insights-trigger/InsightsTrigger.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const InsightsTrigger = () => {
6363
<EuiToolTip
6464
title={isHighlighted ? undefined : 'Insights'}
6565
content={isHighlighted
66-
? 'New recommendations are available'
67-
: 'Open interactive tutorials to learn more about Redis or Redis Stack capabilities, or use recommendations to improve your database.'}
66+
? 'New tips are available'
67+
: 'Open interactive tutorials to learn more about Redis or Redis Stack capabilities, or use tips to improve your database.'}
6868
>
6969
<EuiButton
7070
fill

0 commit comments

Comments
 (0)