Skip to content

Commit b91a9b2

Browse files
committed
add comming soon banners
1 parent bf77216 commit b91a9b2

File tree

4 files changed

+99
-25
lines changed

4 files changed

+99
-25
lines changed

src/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ declare global {
4545
title: string
4646
description: string,
4747
path: string
48+
component: React.ReactNode | null
4849
}[]
4950
}
5051

src/renderer/components/sidebar.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@ const TopMenu = [
77
path: "/",
88
},
99
];
10-
const ProductsMenu = [
11-
{
12-
title: "Automate",
13-
path: "/automate",
14-
},
15-
{
16-
title: "App Automate",
17-
path: "/app-automate",
18-
},
19-
{
20-
title: "Percy",
21-
path: "/percy",
22-
},
23-
{
24-
title: "Accessibility",
25-
path: "/accessibility",
26-
},
27-
];
2810

2911
export default function Sidebar() {
3012
const location = useLocation();

src/renderer/products.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,77 @@ const Products = [
3030
}
3131
],
3232
},
33+
{
34+
name: "App Automate",
35+
path: "/app-automate",
36+
page: AutomatePage,
37+
tools: [
38+
{
39+
title: "Replay Toolkit",
40+
description: "Replays the sessions on BrowserStack by parsing Raw Logs",
41+
path: "/automate/replay-toolkit",
42+
component: null,
43+
},
44+
{
45+
title: "Latency Analyser",
46+
description:
47+
"Analyses time spend on different actions. Helpful to identify inside/outside time for a customer session.",
48+
path: "/automate/latency-analyser",
49+
component: null,
50+
},
51+
{
52+
title: "Session Comparison",
53+
description: "Compares logs across sessions and highlights differences",
54+
path: '/automate/session-comparison',
55+
component: null
56+
}
57+
],
58+
},
59+
{
60+
name: "Percy",
61+
path: "/percy",
62+
page: AutomatePage,
63+
tools: [
64+
{
65+
title: "Snapshot Replay",
66+
description: "Replay snapshots",
67+
path: "/percy/snapshot-replay",
68+
component: null,
69+
},
70+
{
71+
title: "CLI Logs Downloader",
72+
description: "Download CLI logs using hash ID displayed in Customer's console",
73+
path: "/percy/cli-log-downloader",
74+
component: null,
75+
},
76+
],
77+
},
78+
{
79+
name: "Test Report & Analytics",
80+
path: "/tra",
81+
page: AutomatePage,
82+
tools: [
83+
{
84+
title: "SDK Logs Downloader",
85+
description: "Download SDK logs from Backend",
86+
path: "/tra/download-logs",
87+
component: null,
88+
},
89+
],
90+
},
91+
{
92+
name: "Web Accessibility",
93+
path: "/web-accessibility",
94+
page: AutomatePage,
95+
tools: [
96+
{
97+
title: "Automate Session Finder",
98+
description: "Find associated automate session for accessibility scanner run",
99+
path: "/web-a11y/session-finder",
100+
component: null,
101+
},
102+
],
103+
},
33104
];
34105

35106
export default Products;

src/renderer/routes/automate/index.tsx

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,42 @@ import { NavLink } from "react-router-dom"
22

33
export default function AutomatePage(props: ProductPageProps) {
44
const { tools } = props
5+
56
return (
67
<div className="p-5">
78
<div className="grid grid-col-3 lg:grid-cols-4 gap-4">
89
{tools.map((tool) => {
9-
return (
10-
<NavLink key={tool.path} to={tool.path} >
11-
<div className="card bg-base-100 w-full h-full shadow-sm border">
12-
<div className="card-body">
13-
<h2 className="card-title">{tool.title}</h2>
14-
<p>{tool.description}</p>
10+
const isComingSoon = tool.component === null
11+
12+
const Card = (
13+
<div className="card bg-base-100 w-full h-full shadow-sm border">
14+
<div className="card-body">
15+
<h2 className="card-title flex items-center gap-2">
16+
{tool.title}
17+
</h2>
18+
<p>{tool.description}</p>
19+
<div>
20+
{isComingSoon && (
21+
<span className="badge badge-warning badge-sm">
22+
Coming soon
23+
</span>
24+
)}
1525
</div>
1626
</div>
27+
</div>
28+
)
29+
30+
return isComingSoon ? (
31+
<div key={tool.path} className="cursor-not-allowed opacity-60">
32+
{Card}
33+
</div>
34+
) : (
35+
<NavLink key={tool.path} to={tool.path}>
36+
{Card}
1737
</NavLink>
1838
)
1939
})}
2040
</div>
2141
</div>
2242
)
23-
}
43+
}

0 commit comments

Comments
 (0)