Skip to content

Commit ce4627c

Browse files
authored
RI-7589 Update visuals of the browser page when the database is empty (#5025)
- change the image when there are no kays available - change the buttons for importing sample data - change the buttons for the tutorials
1 parent 4e08863 commit ce4627c

File tree

6 files changed

+150
-56
lines changed

6 files changed

+150
-56
lines changed

redisinsight/ui/src/assets/img/no-data.svg

Lines changed: 129 additions & 0 deletions
Loading

redisinsight/ui/src/components/explore-guides/ExploreGuides.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { Spacer } from 'uiSrc/components/base/layout/spacer'
1313
import { Title } from 'uiSrc/components/base/text/Title'
1414
import { Text } from 'uiSrc/components/base/text'
1515
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
16+
import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
17+
import { FlexGroup } from 'uiSrc/components/base/layout/flex'
1618
import styles from './styles.module.scss'
1719

1820
const ExploreGuides = () => {
@@ -50,13 +52,11 @@ const ExploreGuides = () => {
5052
</Text>
5153
<Spacer size="xl" />
5254
{!!data.length && (
53-
<div className={styles.guides}>
55+
<FlexGroup gap="l" wrap justify="center" className={styles.guides}>
5456
{data.map(({ title, tutorialId, icon }) => (
55-
<div
56-
key={title}
57-
role="button"
57+
<SecondaryButton
58+
inverted
5859
tabIndex={0}
59-
onKeyDown={() => {}}
6060
onClick={() => handleLinkClick(tutorialId)}
6161
className={styles.btn}
6262
data-testid={`guide-button-${tutorialId}`}
@@ -69,9 +69,9 @@ const ExploreGuides = () => {
6969
/>
7070
)}
7171
{title}
72-
</div>
72+
</SecondaryButton>
7373
))}
74-
</div>
74+
</FlexGroup>
7575
)}
7676
</div>
7777
)
Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
11
.guides {
2-
display: flex;
3-
flex-wrap: wrap;
4-
justify-content: center;
5-
6-
max-width: 480px;
7-
margin: 0 auto;
8-
}
9-
10-
.btn {
11-
margin: 0 6px 12px;
12-
padding: 4px 16px;
13-
border: 1px solid var(--externalLinkColor);
14-
background-color: var(--buttonGuideBgColor);
15-
16-
border-radius: 24px;
17-
color: var(--externalLinkColor);
18-
19-
font-size: 12px;
20-
21-
display: flex;
22-
align-items: center;
23-
justify-content: center;
24-
25-
.icon {
26-
color: var(--externalLinkColor);
27-
margin-right: 8px;
28-
}
2+
max-width: 414px;
293
}

redisinsight/ui/src/pages/browser/components/load-sample-data/LoadSampleData.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import {
1111
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
1212
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1313
import { Spacer } from 'uiSrc/components/base/layout/spacer'
14-
import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
14+
import {
15+
PrimaryButton,
16+
SecondaryButton,
17+
} from 'uiSrc/components/base/forms/buttons'
1518
import { PlayFilledIcon } from 'uiSrc/components/base/icons'
1619
import { Text } from 'uiSrc/components/base/text'
1720
import { RiPopover } from 'uiSrc/components/base'
@@ -55,24 +58,21 @@ const LoadSampleData = (props: Props) => {
5558
panelPaddingSize="none"
5659
anchorClassName={cx(styles.buttonWrapper, anchorClassName)}
5760
button={
58-
<PrimaryButton
61+
<SecondaryButton
62+
filled
5963
onClick={() => setIsConfirmationOpen(true)}
6064
className={styles.loadDataBtn}
6165
loading={loading}
6266
disabled={loading}
6367
data-testid="load-sample-data-btn"
6468
>
6569
Load sample data
66-
</PrimaryButton>
70+
</SecondaryButton>
6771
}
6872
>
6973
<Row gap="m" responsive={false} style={{ padding: 15 }}>
7074
<FlexItem>
71-
<RiIcon
72-
size="m"
73-
type="ToastDangerIcon"
74-
color="attention500"
75-
/>
75+
<RiIcon size="m" type="ToastDangerIcon" color="attention500" />
7676
</FlexItem>
7777
<FlexItem>
7878
<Text variant="semiBold">Execute commands in bulk</Text>

redisinsight/ui/src/pages/browser/components/no-keys-found/NoKeysFound.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import { useDispatch, useSelector } from 'react-redux'
33
import { useHistory } from 'react-router-dom'
4-
import TelescopeImg from 'uiSrc/assets/img/telescope-dark.svg'
4+
import NoDataImg from 'uiSrc/assets/img/no-data.svg'
55

66
import { findTutorialPath } from 'uiSrc/utils'
77
import {
@@ -22,6 +22,7 @@ import { Spacer } from 'uiSrc/components/base/layout/spacer'
2222
import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
2323
import { Title } from 'uiSrc/components/base/text/Title'
2424
import { RiImage } from 'uiSrc/components/base/display'
25+
import { Row } from 'uiSrc/components/base/layout/flex'
2526
import LoadSampleData from '../load-sample-data'
2627

2728
import styles from './styles.module.scss'
@@ -61,17 +62,13 @@ const NoKeysFound = (props: Props) => {
6162

6263
return (
6364
<div className={styles.container} data-testid="no-result-found-msg">
64-
<RiImage
65-
className={styles.img}
66-
src={TelescopeImg}
67-
alt="no results"
68-
/>
65+
<RiImage className={styles.img} src={NoDataImg} alt="no results" />
6966
<Spacer />
7067
<Title color="primary" className={styles.title} size="S">
7168
Let&apos;s start working
7269
</Title>
7370
<Spacer />
74-
<div className={styles.actions}>
71+
<Row gap="m">
7572
<LoadSampleData onSuccess={onSuccessLoadData} />
7673
<EmptyButton
7774
onClick={() => onAddKeyPanel(true)}
@@ -80,7 +77,7 @@ const NoKeysFound = (props: Props) => {
8077
>
8178
+ Add key manually
8279
</EmptyButton>
83-
</div>
80+
</Row>
8481
</div>
8582
)
8683
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
font-size: 28px !important;
1313
}
1414

15-
.actions {
16-
display: flex;
17-
align-items: center;
18-
justify-content: center;
19-
}
20-
2115
.addKey {
2216
height: 36px !important;
2317
width: auto !important;

0 commit comments

Comments
 (0)