Skip to content

Commit 05335fc

Browse files
authored
RI-7598 Change visuals of the "Import sample data" popover (#5036)
* fix(ui): remove additional background color overrides changing the styles of the popovers * fix(ui): added spacing between the buttons in the tutorial popovers * refactor(ui): cleanup no longer used styles * fix(ui): added spacing between the buttons in the JSON key override popover * fix(ui): fix the position of info button when removing multiple fields from list key * fix(ui): update popover notifications spacing
1 parent 9956d5b commit 05335fc

File tree

7 files changed

+35
-70
lines changed

7 files changed

+35
-70
lines changed

redisinsight/ui/src/components/markdown/CodeButtonBlock/components/RunConfirmationPopover.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { setDBConfigStorageField } from 'uiSrc/services'
77
import { ConfigDBStorageItem } from 'uiSrc/constants/storage'
88
import { FeatureFlagComponent } from 'uiSrc/components'
99
import { Spacer } from 'uiSrc/components/base/layout/spacer'
10+
import { Row } from 'uiSrc/components/base/layout/flex'
1011
import {
1112
PrimaryButton,
1213
SecondaryButton,
@@ -67,7 +68,7 @@ const RunConfirmationPopover = ({ onApply }: Props) => {
6768
aria-label="checkbox do not show agan"
6869
/>
6970
<div className={styles.popoverFooter}>
70-
<div>
71+
<Row gap="m" justify="end">
7172
<FeatureFlagComponent name={FeatureFlags.envDependent}>
7273
<SecondaryButton
7374
size="s"
@@ -86,7 +87,7 @@ const RunConfirmationPopover = ({ onApply }: Props) => {
8687
>
8788
Run
8889
</PrimaryButton>
89-
</div>
90+
</Row>
9091
</div>
9192
</>
9293
)

redisinsight/ui/src/components/navigation-menu/components/notifications-center/Notification/Notification.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { truncateText } from 'uiSrc/utils'
1010
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1111
import { TitleSize, Title } from 'uiSrc/components/base/text/Title'
1212
import { Text } from 'uiSrc/components/base/text'
13+
import { Spacer } from 'uiSrc/components/base/layout'
1314
import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
1415

1516
import styles from '../styles.module.scss'
@@ -31,10 +32,9 @@ const Notification = (props: Props) => {
3132
>
3233
{notification.title}
3334
</Title>
34-
35+
<Spacer size="s" />
3536
<Text
3637
size="s"
37-
color="subdued"
3838
className={cx('notificationHTMLBody', styles.notificationBody)}
3939
data-testid="notification-body"
4040
>
@@ -43,7 +43,7 @@ const Notification = (props: Props) => {
4343

4444
<Row className={styles.notificationFooter} align="center" justify="start">
4545
<FlexItem>
46-
<Text size="xs" color="subdued" data-testid="notification-date">
46+
<Text size="xs" data-testid="notification-date">
4747
{format(notification.timestamp * 1000, NOTIFICATION_DATE_FORMAT)}
4848
</Text>
4949
</FlexItem>
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
11
.popover {
22
min-width: 380px !important;
33
}
4-
5-
.buttonWrapper {
6-
.loadDataBtn {
7-
height: 36px !important;
8-
9-
:global(.euiButton__text) {
10-
font-size: 14px !important;
11-
font-weight: 400 !important;
12-
}
13-
}
14-
}
15-

redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/remove-list-elements/RemoveListElements.tsx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -261,24 +261,30 @@ const RemoveListElements = (props: Props) => {
261261
/>
262262
</FormField>
263263
</FlexItem>
264-
<FlexItem grow style={{ width: '100%' }}>
265-
<FormField
266-
additionalText={!canRemoveMultiple ? InfoBoxPopover() : <></>}
267-
>
268-
<TextInput
269-
name={config.count.name}
270-
id={config.count.name}
271-
maxLength={200}
272-
placeholder={config.count.placeholder}
273-
value={count}
274-
data-testid="count-input"
275-
autoComplete="off"
276-
onChange={handleCountChange}
277-
ref={countInput}
278-
disabled={!canRemoveMultiple}
279-
/>
280-
</FormField>
281-
</FlexItem>
264+
<Row grow>
265+
<FlexItem grow>
266+
<FormField>
267+
<TextInput
268+
name={config.count.name}
269+
id={config.count.name}
270+
maxLength={200}
271+
placeholder={config.count.placeholder}
272+
value={count}
273+
data-testid="count-input"
274+
autoComplete="off"
275+
onChange={handleCountChange}
276+
ref={countInput}
277+
disabled={!canRemoveMultiple}
278+
/>
279+
</FormField>
280+
</FlexItem>
281+
282+
{!canRemoveMultiple ? (
283+
<FlexItem>{InfoBoxPopover()}</FlexItem>
284+
) : (
285+
<></>
286+
)}
287+
</Row>
282288
</Row>
283289
</FlexItem>
284290
</EntryContent>

redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/add-item/ConfirmOverwrite.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77
} from 'uiSrc/components/base/forms/buttons'
88
import { Text } from 'uiSrc/components/base/text'
99
import { RiPopover } from 'uiSrc/components/base'
10-
import styles from '../../styles.module.scss'
10+
import { Row } from 'uiSrc/components/base/layout/flex'
11+
import { Spacer } from 'uiSrc/components/base/layout'
1112

1213
interface ConfirmOverwriteProps {
1314
isOpen: boolean
@@ -37,8 +38,8 @@ const ConfirmOverwrite = ({
3738
You already have the same JSON key. If you proceed, a value of the
3839
existing JSON key will be overwritten.
3940
</Text>
40-
41-
<div className={styles.confirmDialogActions}>
41+
<Spacer size="l" />
42+
<Row justify="end" gap="m">
4243
<SecondaryButton
4344
aria-label="Cancel"
4445
size="small"
@@ -56,7 +57,7 @@ const ConfirmOverwrite = ({
5657
>
5758
Overwrite
5859
</PrimaryButton>
59-
</div>
60+
</Row>
6061
</RiPopover>
6162
)
6263

redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/styles.module.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,6 @@
269269
max-width: none;
270270
}
271271

272-
.confirmDialogActions {
273-
display: flex;
274-
justify-content: flex-end;
275-
margin-top: 16px;
276-
277-
button {
278-
margin-left: 8px;
279-
280-
&:first-of-type {
281-
margin-left: 0;
282-
}
283-
}
284-
}
285-
286272
.actions {
287273
margin-top: 1em;
288274
display: flex;

redisinsight/ui/src/styles/components/_popover.scss

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,5 @@
3535
}
3636

3737
.popoverLikeTooltip {
38-
border: none;
3938
max-width: 267px !important;
40-
background-color: var(--euiTooltipBackgroundColor) !important;
41-
.euiPopover__panelArrow.euiPopover__panelArrow--bottom:after {
42-
border-bottom-color: var(--euiTooltipBackgroundColor) !important;
43-
}
44-
45-
.euiPopover__panelArrow.euiPopover__panelArrow--right:after {
46-
border-right-color: var(--euiTooltipBackgroundColor) !important;
47-
}
48-
49-
.euiPopover__panelArrow.euiPopover__panelArrow--left:after {
50-
border-left-color: var(--euiTooltipBackgroundColor) !important;
51-
}
52-
53-
.euiPopover__panelArrow.euiPopover__panelArrow--top:after {
54-
border-top-color: var(--euiTooltipBackgroundColor) !important;
55-
}
5639
}

0 commit comments

Comments
 (0)