Skip to content

Commit 5e9b165

Browse files
author
Artem
committed
Merge branch 'main' into feature/RI-4075_livetime_recommendations
# Conflicts: # redisinsight/ui/src/telemetry/events.ts
2 parents c3e1a70 + 90845b7 commit 5e9b165

File tree

9 files changed

+45
-42
lines changed

9 files changed

+45
-42
lines changed

redisinsight/ui/src/components/navigation-menu/components/help-menu/HelpMenu.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import React, { useState } from 'react'
1515
import { useDispatch, useSelector } from 'react-redux'
1616

1717
import { EXTERNAL_LINKS } from 'uiSrc/constants/links'
18+
import { ReleaseNotesSource } from 'uiSrc/constants/telemetry'
1819
import { appElectronInfoSelector, setReleaseNotesViewed, setShortcutsFlyoutState } from 'uiSrc/slices/app/info'
1920
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
2021
import { setOnboarding } from 'uiSrc/slices/app/features'
@@ -24,6 +25,8 @@ import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
2425
import { ReactComponent as GithubHelpCenterSVG } from 'uiSrc/assets/img/github.svg'
2526
import { ReactComponent as BulbSVG } from 'uiSrc/assets/img/bulb.svg'
2627

28+
import { addMessageNotification } from 'uiSrc/slices/app/notifications'
29+
import successMessages from 'uiSrc/components/notifications/success-messages'
2730
import navStyles from '../../styles.module.scss'
2831
import styles from './styles.module.scss'
2932

@@ -40,6 +43,15 @@ const HelpMenu = () => {
4043
}
4144

4245
const onClickReleaseNotes = async () => {
46+
dispatch(addMessageNotification(
47+
successMessages.INSTALLED_NEW_UPDATE('2.2.1', () => dispatch(setReleaseNotesViewed(true)))
48+
))
49+
sendEventTelemetry({
50+
event: TelemetryEvent.RELEASE_NOTES_LINK_CLICKED,
51+
eventData: {
52+
source: ReleaseNotesSource.helpCenter
53+
}
54+
})
4355
if (isReleaseNotesViewed === false) {
4456
dispatch(setReleaseNotesViewed(true))
4557
}

redisinsight/ui/src/components/notifications/success-messages.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ export default {
163163
<>
164164
Action completed
165165
<br />
166-
<EuiText color="ghost">Data uploaded with file: {formatLongName(fileName, 24, 5)}</EuiText>
166+
<EuiText color="ghost">Commands executed from file:</EuiText>
167+
<EuiText color="ghost">{formatLongName(fileName, 34, 5)}</EuiText>
167168
</>
168169
),
169170
message: (

redisinsight/ui/src/constants/featuresHighlighting.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,5 @@ interface BuildHighlightingFeature {
1010
}
1111

1212
export const BUILD_FEATURES: Record<string, BuildHighlightingFeature> = {
13-
bulkUpload: {
14-
type: 'tooltip',
15-
title: (<span><i>New:</i> Bulk Upload</span>),
16-
content: 'Upload your data in bulk from a file.',
17-
}
13+
1814
} as const
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export enum ReleaseNotesSource {
2+
helpCenter = 'Help Center',
3+
updateNotification = 'Update notification'
4+
}

redisinsight/ui/src/electron/utils/ipcCheckUpdates.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ipcRenderer } from 'electron'
22
import { Dispatch } from 'react'
33
import { omit } from 'lodash'
44
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
5+
import { ReleaseNotesSource } from 'uiSrc/constants/telemetry'
56
import { setElectronInfo, setReleaseNotesViewed } from 'uiSrc/slices/app/info'
67
import { addMessageNotification } from 'uiSrc/slices/app/notifications'
78
import successMessages from 'uiSrc/components/notifications/success-messages'
@@ -23,7 +24,15 @@ export const ipcCheckUpdates = async (serverInfo: GetServerInfoResponse, dispatc
2324
if (isUpdateDownloaded && !isUpdateAvailable) {
2425
if (serverInfo.appVersion === updateDownloadedVersion) {
2526
dispatch(addMessageNotification(
26-
successMessages.INSTALLED_NEW_UPDATE(updateDownloadedVersion, () => dispatch(setReleaseNotesViewed(true)))
27+
successMessages.INSTALLED_NEW_UPDATE(updateDownloadedVersion, () => {
28+
dispatch(setReleaseNotesViewed(true))
29+
sendEventTelemetry({
30+
event: TelemetryEvent.RELEASE_NOTES_LINK_CLICKED,
31+
eventData: {
32+
source: ReleaseNotesSource.updateNotification
33+
}
34+
})
35+
})
2736
))
2837
}
2938

redisinsight/ui/src/pages/browser/components/bulk-actions/BulkUpload/BulkUpload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const BulkUpload = (props: Props) => {
131131
loading={loading}
132132
status={status}
133133
progress={progress}
134-
title="Upload with file"
134+
title="Commands executed from file"
135135
subTitle={(<div className="truncateText" style={{ paddingTop: 6 }}>{fileName}</div>)}
136136
>
137137
<BulkActionSummary

redisinsight/ui/src/pages/browser/components/keys-header/KeysHeader.tsx

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@ import { isRedisearchAvailable } from 'uiSrc/utils'
2424

2525
import { OnboardingStepName, OnboardingSteps } from 'uiSrc/constants/onboarding'
2626
import {
27-
appFeatureHighlightingSelector,
28-
incrementOnboardStepAction,
29-
removeFeatureFromHighlighting
27+
incrementOnboardStepAction
3028
} from 'uiSrc/slices/app/features'
3129
import { OnboardingTour } from 'uiSrc/components'
3230
import { ONBOARDING_FEATURES } from 'uiSrc/components/onboarding-features'
3331
import { setBulkActionType } from 'uiSrc/slices/browser/bulkActions'
34-
import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
35-
import HighlightedFeature from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
36-
import { getHighlightingFeatures } from 'uiSrc/utils/highlighting'
3732
import AutoRefresh from '../auto-refresh'
3833
import FilterKeyType from '../filter-key-type'
3934
import RediSearchIndexesList from '../redisearch-key-list'
@@ -84,8 +79,6 @@ const KeysHeader = (props: Props) => {
8479
const { id: instanceId, modules } = useSelector(connectedInstanceSelector)
8580
const { viewType, searchMode, isFiltered } = useSelector(keysSelector)
8681
const { selectedIndex } = useSelector(redisearchSelector)
87-
const { features } = useSelector(appFeatureHighlightingSelector)
88-
const { bulkUpload: bulkUploadHighlighting } = getHighlightingFeatures(features)
8982

9083
const rootDivRef: Ref<HTMLDivElement> = useRef(null)
9184

@@ -250,7 +243,6 @@ const KeysHeader = (props: Props) => {
250243
const openBulkActions = () => {
251244
dispatch(setBulkActionType(BulkActionsType.Delete))
252245
handleBulkActionsPanel(true)
253-
dispatch(removeFeatureFromHighlighting('bulkUpload'))
254246
}
255247

256248
const handleSwitchView = (type: KeyViewType) => {
@@ -311,27 +303,18 @@ const KeysHeader = (props: Props) => {
311303
)
312304

313305
const BulkActionsBtn = (
314-
<HighlightedFeature
315-
isHighlight={bulkUploadHighlighting}
316-
title={BUILD_FEATURES?.bulkUpload?.title}
317-
content={BUILD_FEATURES?.bulkUpload?.content}
318-
type={BUILD_FEATURES?.bulkUpload?.type}
319-
wrapperClassName={styles.bulkActionsHighlighting}
320-
hideFirstChild
321-
>
322-
<EuiToolTip content="Bulk Actions" position="top">
323-
<EuiButton
324-
fill
325-
size="s"
326-
color="secondary"
327-
onClick={openBulkActions}
328-
className={styles.bulkActions}
329-
data-testid="btn-bulk-actions"
330-
>
331-
<EuiIcon type={BulkActionsIcon} />
332-
</EuiButton>
333-
</EuiToolTip>
334-
</HighlightedFeature>
306+
<EuiToolTip content="Bulk Actions" position="top">
307+
<EuiButton
308+
fill
309+
size="s"
310+
color="secondary"
311+
onClick={openBulkActions}
312+
className={styles.bulkActions}
313+
data-testid="btn-bulk-actions"
314+
>
315+
<EuiIcon type={BulkActionsIcon} />
316+
</EuiButton>
317+
</EuiToolTip>
335318
)
336319

337320
const ViewSwitch = (width: number) => (

redisinsight/ui/src/pages/browser/components/keys-header/styles.module.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
padding: 0 !important;
3030
}
3131
}
32-
33-
.bulkActionsHighlighting {
34-
display: inline-block;
35-
}
3632
}
3733

3834
.top,

redisinsight/ui/src/telemetry/events.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ export enum TelemetryEvent {
224224
ONBOARDING_TOUR_TRIGGERED = 'ONBOARDING_TOUR_TRIGGERED',
225225
ONBOARDING_TOUR_FINISHED = 'ONBOARDING_TOUR_FINISHED',
226226

227+
RELEASE_NOTES_LINK_CLICKED = 'RELEASE_NOTES_LINK_CLICKED',
228+
227229
INSIGHTS_PANEL_OPENED = 'INSIGHTS_PANEL_OPENED',
228230
INSIGHTS_PANEL_CLOSED = 'INSIGHTS_PANEL_CLOSED',
229231
INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED = 'INSIGHTS_RECOMMENDATION_TUTORIAL_CLICKED',

0 commit comments

Comments
 (0)