Skip to content

Commit 32d9c4b

Browse files
author
KIvanow
committed
RI-7286 - Tips/tutorials/Insights are missing a border on some screens (or the container of the screen is)
1 parent 75b6799 commit 32d9c4b

File tree

3 files changed

+34
-22
lines changed

3 files changed

+34
-22
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/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)