Skip to content

Commit 0d636c0

Browse files
authored
Fe/feature/RI-7284 RI-7285 RI-7286 (#4815)
* RI-7286 - Tips/tutorials/Insights are missing a border on some screens (or the container of the screen is) * RI-7285 - pub/sub screen subscribe input/row has misalignments * RI-7284 - Warning icon on the pub/sub screen is not aligned
1 parent 75b6799 commit 0d636c0

File tree

7 files changed

+45
-33
lines changed

7 files changed

+45
-33
lines changed

redisinsight/ui/src/pages/database-analysis/DatabaseAnalysisPage.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState } from 'react'
22
import { useSelector, useDispatch } from 'react-redux'
33
import { useParams } from 'react-router-dom'
4+
import styled from 'styled-components'
45

56
import {
67
dbAnalysisSelector,
@@ -27,6 +28,15 @@ import Header from './components/header'
2728
import DatabaseAnalysisTabs from './components/data-nav-tabs'
2829
import styles from './styles.module.scss'
2930

31+
// Styled component for the main container with theme border
32+
const MainContainer = styled.div<React.HTMLAttributes<HTMLDivElement>>`
33+
border: 1px solid ${({ theme }) => theme.semantic.color.border.neutral500};
34+
border-radius: ${({ theme }) => theme.components.semanticContainer.sizes.M.borderRadius};
35+
padding: ${({ theme }) => theme.components.semanticContainer.sizes.M.padding};
36+
height: 100%;
37+
overflow: auto;
38+
`
39+
3040
const DatabaseAnalysisPage = () => {
3141
const { viewTab } = useSelector(analyticsSettingsSelector)
3242
const { loading: analysisLoading, data } = useSelector(dbAnalysisSelector)
@@ -91,7 +101,7 @@ const DatabaseAnalysisPage = () => {
91101
}
92102

93103
return (
94-
<div className={styles.main} data-testid="database-analysis-page">
104+
<MainContainer className={styles.main} data-testid="database-analysis-page">
95105
<Header
96106
items={reports}
97107
selectedValue={selectedAnalysis}
@@ -104,7 +114,7 @@ const DatabaseAnalysisPage = () => {
104114
reports={reports}
105115
data={data}
106116
/>
107-
</div>
117+
</MainContainer>
108118
)
109119
}
110120

redisinsight/ui/src/pages/pub-sub/PubSubPage.tsx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState } from 'react'
22
import { useDispatch, useSelector } from 'react-redux'
33
import { useParams } from 'react-router-dom'
4+
import styled from 'styled-components'
45
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
56
import {
67
sendEventTelemetry,
@@ -23,6 +24,21 @@ import {
2324

2425
import styles from './styles.module.scss'
2526

27+
// Styled components
28+
const MainContainer = styled.div<React.HTMLAttributes<HTMLDivElement>>`
29+
border: 1px solid ${({ theme }) => theme.semantic.color.border.neutral500};
30+
border-radius: 8px;
31+
`
32+
33+
const ContentPanel = styled.div`
34+
flex-grow: 1;
35+
`
36+
37+
const FooterPanel = styled.div`
38+
margin-top: 16px;
39+
padding: 10px 18px 28px;
40+
`
41+
2642
const PubSubPage = () => {
2743
const { name: connectedInstanceName, db } = useSelector(
2844
connectedInstanceSelector,
@@ -71,8 +87,8 @@ const PubSubPage = () => {
7187
}
7288

7389
return (
74-
<div className={styles.main} data-testid="pub-sub-page">
75-
<div className={styles.contentPanel}>
90+
<MainContainer className={styles.main} data-testid="pub-sub-page">
91+
<ContentPanel>
7692
<div className={styles.header}>
7793
<Title size="XXL" className={styles.title}>
7894
Pub/Sub
@@ -82,10 +98,10 @@ const PubSubPage = () => {
8298
<div className={styles.tableWrapper}>
8399
<MessagesListWrapper />
84100
</div>
85-
</div>
86-
<div className={styles.footerPanel}>
101+
</ContentPanel>
102+
<FooterPanel>
87103
<PublishMessage />
88-
</div>
104+
</FooterPanel>
89105
<div className={styles.onboardAnchor}>
90106
<OnboardingTour
91107
options={ONBOARDING_FEATURES.FINISH}
@@ -95,7 +111,7 @@ const PubSubPage = () => {
95111
<span />
96112
</OnboardingTour>
97113
</div>
98-
</div>
114+
</MainContainer>
99115
)
100116
}
101117

redisinsight/ui/src/pages/pub-sub/components/messages-list/EmptyMessagesList/EmptyMessagesList.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Text } from 'uiSrc/components/base/text'
66

77
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
88
import styles from './styles.module.scss'
9+
import { Row } from 'uiSrc/components/base/layout/flex'
910

1011
export interface Props {
1112
connectionType?: ConnectionType
@@ -27,10 +28,12 @@ const EmptyMessagesList = ({
2728
Subscribe to the Channel to see all the messages published to your
2829
database
2930
</Text>
30-
<Text className={styles.alert}>
31+
<Row>
3132
<RiIcon type="ToastDangerIcon" className={styles.alertIcon} />
32-
Running in production may decrease performance and memory available
33-
</Text>
33+
<Text className={styles.alert}>
34+
Running in production may decrease performance and memory available
35+
</Text>
36+
</Row>
3437
{connectionType === ConnectionType.Cluster && isSpublishNotSupported && (
3538
<>
3639
<div className={styles.separator} />

redisinsight/ui/src/pages/pub-sub/components/subscription-panel/SubscriptionPanel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ const SubscriptionPanel = () => {
102102
</FlexItem>
103103
<FlexItem>
104104
<Row align="center">
105+
<FlexItem>
106+
<ClickableAppendInfo />
107+
</FlexItem>
105108
<FlexItem className={styles.channels}>
106-
<FormField additionalText={<ClickableAppendInfo />}>
109+
<FormField>
107110
<TextInput
108111
value={channels}
109112
disabled={isSubscribed}

redisinsight/ui/src/pages/pub-sub/components/subscription-panel/components/clickable-append-info/ClickableAppendInfo.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const ClickableAppendInfo = () => {
4545
<br />
4646
Supported glob-style patterns are described&nbsp;
4747
<Link
48+
variant="small-inline"
4849
target="_blank"
4950
href={getUtmExternalLink(EXTERNAL_LINKS.pubSub, {
5051
medium: UTM_MEDIUMS.Main,
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
.infoIcon {
2-
display: flex !important;
3-
align-items: center;
4-
justify-content: center;
52
width: 34px;
6-
color: var(--iconsDefaultColor) !important;
7-
background-color: var(--browserTableRowEven) !important;
83
}
94

105
.popover {
116
max-width: 250px !important;
12-
background-color: var(--euiTooltipBackgroundColor) !important;
13-
color: var(--euiTooltipTitleTextColor) !important;
147
border-radius: 4px;
158
}

redisinsight/ui/src/pages/pub-sub/styles.module.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@
44
display: flex;
55
flex-direction: column;
66

7-
.contentPanel,
8-
.footerPanel {
9-
background-color: var(--euiColorEmptyShade);
10-
}
11-
12-
.contentPanel {
13-
flex-grow: 1;
14-
}
15-
16-
.footerPanel {
17-
margin-top: 16px;
18-
padding: 10px 18px 28px;
19-
}
20-
217
.header {
228
padding: 24px 18px 12px;
239
border-bottom: 1px solid var(--separatorColor);

0 commit comments

Comments
 (0)