Skip to content

Commit 6b8135b

Browse files
authored
Perf improvements cleanup (#4191)
1 parent 48bcc90 commit 6b8135b

File tree

7 files changed

+431
-292
lines changed

7 files changed

+431
-292
lines changed

dashboard/src/assets/placeholder.svg

Lines changed: 194 additions & 0 deletions
Loading

dashboard/src/components/porter/DashboardPlaceholder.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import styled from "styled-components";
33

4-
import placeholder from "assets/placeholder.png";
4+
import placeholder from "assets/placeholder.svg";
55

66
type Props = {
77
children: React.ReactNode;
@@ -42,4 +42,13 @@ const StyledDashboardPlaceholder = styled.div<{
4242
border-radius: 10px;
4343
position: relative;
4444
overflow: hidden;
45+
animation: fadeIn 0.5s;
46+
@keyframes fadeIn {
47+
from {
48+
opacity: 0;
49+
}
50+
to {
51+
opacity: 1;
52+
}
53+
}
4554
`;

dashboard/src/components/porter/Toggle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const Item = styled.div<{ active: boolean; activeColor?: string; inactiveColor?:
5353
cursor: pointer;
5454
justify-content: center;
5555
padding: 10px;
56+
opacity: ${(props) => props.active ? "1" : "0.4"};
5657
background: ${(props) =>
5758
props.active ? props.activeColor ?? "#ffffff11" : props.inactiveColor ?? "transparent"};
5859
`;

dashboard/src/main/home/app-dashboard/apps/Apps.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ const Apps: React.FC = () => {
273273
setSort("letter");
274274
}
275275
}}
276-
inactiveColor={"#ffffff11"}
277-
activeColor={"transparent"}
278276
/>
279277
<Spacer inline x={1} />
280278
<Toggle
@@ -290,8 +288,6 @@ const Apps: React.FC = () => {
290288
setView("list");
291289
}
292290
}}
293-
inactiveColor={"#ffffff11"}
294-
activeColor={"transparent"}
295291
/>
296292
<Spacer inline x={2} />
297293
{currentDeploymentTarget?.is_preview ? (

dashboard/src/main/home/app-dashboard/new-app-flow/GithubActionModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ const GithubActionModal: React.FC<Props> = ({
157157
<Select
158158
options={[
159159
{
160-
label:
161-
"I authorize Porter to open a PR on my behalf (recommended)",
160+
label: "I authorize Porter to open a PR on my behalf (recommended)",
162161
value: "open_pr",
163162
},
164163
{
165164
label: "I will copy the file into my repository myself",
166165
value: "copy",
167166
},
168167
]}
168+
value={choice}
169169
setValue={(x: string) => {
170170
setChoice(x as Choice);
171171
}}

0 commit comments

Comments
 (0)