Skip to content

Commit 5108b55

Browse files
authored
feat: background to match app, fixed status/edit buttons (#4819)
1 parent 35f390c commit 5108b55

File tree

7 files changed

+84
-75
lines changed

7 files changed

+84
-75
lines changed

src/writeData/subscriptions/components/BrokerDetails.scss

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
.update-broker-form {
33
float: right;
44
width: 75%;
5+
.cf-overlay--body {
6+
padding-top: 50px;
7+
}
58
button {
69
margin-left: 4px;
710
}
@@ -82,12 +85,22 @@
8285
margin-right: 12px;
8386
}
8487

85-
&__broker-buttons {
86-
padding-top: 46px;
87-
padding-right: 19px;
88+
&__fixed {
89+
position: fixed;
90+
background-color: $cf-grey-5;
91+
background-attachment: fixed;
92+
width: 61%;
93+
z-index: 9999;
94+
padding-bottom: 20px;
95+
96+
&__broker-buttons {
97+
padding-top: 46px;
98+
padding-left: 24px;
99+
padding-right: 24px;
88100

89-
button {
90-
margin-left: 8px;
101+
button {
102+
margin-left: 8px;
103+
}
91104
}
92105
}
93106
}

src/writeData/subscriptions/components/CreateSubscriptionPage.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
@import '@influxdata/clockface/dist/variables.scss';
22
.create-subscription-page {
33
display: flex;
4-
background: linear-gradient(
5-
45deg,
6-
rgba(33, 173, 246, 0.13) 0%,
7-
rgba(147, 148, 255, 0.13) 100%
8-
);
4+
background-color: $cf-grey-5;
95
.cf-flex-box.cf-flex-box__stretch-h {
106
padding-top: $cf-space-m;
117
}

src/writeData/subscriptions/components/ParsingDetails.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
.update-parsing-form {
33
float: right;
44
width: 75%;
5+
.cf-form--wrapper {
6+
padding-bottom: 650px;
7+
}
8+
59
.cf-overlay--header {
610
justify-content: unset;
711
}
8-
.cf-form--wrapper {
9-
padding-bottom: 800px;
10-
}
12+
1113
&__text {
1214
color: $cf-grey-95;
1315
margin-left: $cf-space-s;

src/writeData/subscriptions/components/SinglePageBrokerDetails.tsx

Lines changed: 56 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -60,67 +60,77 @@ const SinglePageBrokerDetails: FC<Props> = ({
6060
<div className="update-broker-form" id="broker">
6161
<SpinnerContainer spinnerComponent={<TechnoSpinner />} loading={loading}>
6262
<Form onSubmit={() => {}} testID="update-broker-form-overlay">
63-
<div>
63+
<div className="update-broker-form__fixed">
6464
<FlexBox
65-
className="update-broker-form__broker-buttons"
65+
className="update-broker-form__fixed__broker-buttons"
6666
direction={FlexDirection.Row}
6767
margin={ComponentSize.Medium}
68-
justifyContent={JustifyContent.FlexEnd}
68+
justifyContent={JustifyContent.SpaceBetween}
6969
>
70-
<Button
71-
text="Close"
72-
color={ComponentColor.Tertiary}
73-
onClick={() => {
74-
event('close button clicked', {}, {feature: 'subscriptions'})
75-
history.push(`/orgs/${org.id}/${LOAD_DATA}/${SUBSCRIPTIONS}`)
76-
}}
77-
titleText="Cancel update of Subscription and return to list"
78-
type={ButtonType.Button}
79-
testID="update-broker-form--cancel"
70+
<StatusHeader
71+
currentSubscription={currentSubscription}
72+
setStatus={setStatus}
8073
/>
81-
<Button
82-
text="Edit"
83-
color={edit ? ComponentColor.Success : ComponentColor.Secondary}
84-
onClick={() => {
85-
event('edit button clicked', {}, {feature: 'subscriptions'})
86-
setEdit(!edit)
87-
}}
88-
type={ButtonType.Button}
89-
titleText="Edit"
90-
testID="update-broker-form--edit"
91-
/>
92-
{edit ? (
74+
<div>
9375
<Button
94-
type={ButtonType.Button}
95-
text="Save Changes"
96-
color={ComponentColor.Success}
97-
onClick={() => {
98-
saveForm(currentSubscription)
99-
}}
100-
testID="update-broker-form--submit"
101-
/>
102-
) : (
103-
<Button
104-
text="View Data"
105-
color={ComponentColor.Success}
76+
text="Close"
77+
color={ComponentColor.Tertiary}
10678
onClick={() => {
10779
event(
108-
'view data button clicked',
80+
'close button clicked',
10981
{},
11082
{feature: 'subscriptions'}
11183
)
112-
history.push(`/orgs/${org.id}/notebooks`)
84+
history.push(
85+
`/orgs/${org.id}/${LOAD_DATA}/${SUBSCRIPTIONS}`
86+
)
11387
}}
88+
titleText="Cancel update of Subscription and return to list"
11489
type={ButtonType.Button}
115-
testID="update-broker-form--view-data"
116-
status={ComponentStatus.Default}
90+
testID="update-broker-form--cancel"
11791
/>
118-
)}
92+
<Button
93+
text="Edit"
94+
color={
95+
edit ? ComponentColor.Success : ComponentColor.Secondary
96+
}
97+
onClick={() => {
98+
event('edit button clicked', {}, {feature: 'subscriptions'})
99+
setEdit(!edit)
100+
}}
101+
type={ButtonType.Button}
102+
titleText="Edit"
103+
testID="update-broker-form--edit"
104+
/>
105+
{edit ? (
106+
<Button
107+
type={ButtonType.Button}
108+
text="Save Changes"
109+
color={ComponentColor.Success}
110+
onClick={() => {
111+
saveForm(currentSubscription)
112+
}}
113+
testID="update-broker-form--submit"
114+
/>
115+
) : (
116+
<Button
117+
text="View Data"
118+
color={ComponentColor.Success}
119+
onClick={() => {
120+
event(
121+
'view data button clicked',
122+
{},
123+
{feature: 'subscriptions'}
124+
)
125+
history.push(`/orgs/${org.id}/notebooks`)
126+
}}
127+
type={ButtonType.Button}
128+
testID="update-broker-form--view-data"
129+
status={ComponentStatus.Default}
130+
/>
131+
)}
132+
</div>
119133
</FlexBox>
120-
<StatusHeader
121-
currentSubscription={currentSubscription}
122-
setStatus={setStatus}
123-
/>
124134
</div>
125135
<Overlay.Body>
126136
<Heading

src/writeData/subscriptions/components/SinglePageSubDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const SinglePageSubDetails: FC = () => {
9393
const handleClick = (step: number) => {
9494
document
9595
.getElementById(navigationSteps[step - 1].type)
96-
?.scrollIntoView({behavior: 'smooth', block: 'start'})
96+
?.scrollIntoView({behavior: 'smooth', block: 'center'})
9797
setFormActive(navigationSteps[step - 1].type as Steps)
9898
}
9999

src/writeData/subscriptions/components/StatusHeader.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import React, {FC} from 'react'
44
// Components
55
import {
66
FlexBox,
7-
JustifyContent,
8-
AlignItems,
97
Heading,
108
HeadingElement,
119
FontWeight,
@@ -27,11 +25,7 @@ interface Props {
2725
}
2826

2927
const StatusHeader: FC<Props> = ({currentSubscription, setStatus}) => (
30-
<FlexBox
31-
justifyContent={JustifyContent.SpaceBetween}
32-
alignItems={AlignItems.FlexEnd}
33-
stretchToFitHeight={true}
34-
>
28+
<FlexBox>
3529
<Heading
3630
element={HeadingElement.H3}
3731
weight={FontWeight.Regular}

src/writeData/subscriptions/components/SubscriptionDetailsPage.scss

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
@import '@influxdata/clockface/dist/variables.scss';
22
.subscription-details-page {
3-
display: flex;
4-
background: linear-gradient(
5-
45deg,
6-
rgba(33, 173, 246, 0.13) 0%,
7-
rgba(147, 148, 255, 0.13) 100%
8-
);
3+
background-color: $cf-grey-5;
94
.cf-flex-box.cf-flex-box__stretch-h {
105
padding-top: $cf-space-m;
116
}
@@ -53,8 +48,7 @@
5348
}
5449
}
5550
&__status {
56-
padding-left: 24px;
57-
padding-top: 64px;
51+
margin-right: 20px;
5852
text-transform: uppercase;
5953

6054
&--RUNNING {

0 commit comments

Comments
 (0)