Skip to content

Commit 06f229e

Browse files
Merge pull request #120 from DiamondLightSource/unified-page-skeleton
Add skeleton for unified post-processing page
2 parents 13755a3 + 38e6529 commit 06f229e

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

frontend/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Route, BrowserRouter, Routes } from "react-router-dom";
22
import { default as TomographyApp } from "../tomography/src/App";
33
import { App as I14App } from "../i14/src/App";
44
import { App as EpsicApp } from "../ePSIC/src/App";
5+
import { App as UnifiedApp } from "../unified/src/App";
56
import { default as Dashboard } from "../dashboard/src/App";
67
import { default as Layout } from "./Layout";
78

@@ -14,6 +15,7 @@ const App: React.FC = () => {
1415
<Route path="tomography/*" element={<TomographyApp />} />
1516
<Route path="i14/*" element={<I14App />} />
1617
<Route path="ePSIC/*" element={<EpsicApp />} />
18+
<Route path="unified/*" element={<UnifiedApp />} />
1719
</Route>
1820
</Routes>
1921
</BrowserRouter>

frontend/unified/src/App.tsx

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { Box, Divider, Grid2 as Grid, Stack, Typography } from "@mui/material";
2+
3+
const VERTICAL_SPACING = 2;
4+
const HORIZONTAL_SPACING = 2;
5+
6+
export const App: React.FC = () => {
7+
return (
8+
<>
9+
<Grid container spacing={HORIZONTAL_SPACING} columns={2}>
10+
<Stack spacing={VERTICAL_SPACING}>
11+
<Typography variant="h5">Session</Typography>
12+
<PlaceholderComponent
13+
placeholderText="Session selector component placeholder"
14+
height={100}
15+
width={500}
16+
/>
17+
<Divider sx={{ width: "100%" }} />
18+
<Typography variant="h5">Scan</Typography>
19+
<PlaceholderComponent
20+
placeholderText="Scan selector component placeholder"
21+
height={100}
22+
width={500}
23+
/>
24+
<Divider sx={{ width: "100%" }} />
25+
<Typography variant="h5">App</Typography>
26+
<PlaceholderComponent
27+
placeholderText="App selector component placeholder"
28+
height={100}
29+
width={500}
30+
/>
31+
<Divider sx={{ width: "100%" }} />
32+
<Typography variant="h5">Parameter Configuration</Typography>
33+
<PlaceholderComponent
34+
placeholderText="Parameter configuration component placeholder"
35+
height={200}
36+
width={500}
37+
/>
38+
</Stack>
39+
<Stack spacing={VERTICAL_SPACING}>
40+
<Typography variant="h5">Plot</Typography>
41+
<PlaceholderComponent
42+
placeholderText="Plot component placeholder"
43+
height={200}
44+
width={500}
45+
/>
46+
<Divider sx={{ width: "100%" }} />
47+
<Typography variant="h5">Log</Typography>
48+
<PlaceholderComponent
49+
placeholderText="Log component placeholder"
50+
height={200}
51+
width={500}
52+
/>
53+
<Divider sx={{ width: "100%" }} />
54+
<Typography variant="h5">Jobs</Typography>
55+
<PlaceholderComponent
56+
placeholderText="Jobs component placeholder"
57+
height={200}
58+
width={500}
59+
/>
60+
</Stack>
61+
</Grid>
62+
</>
63+
);
64+
};
65+
66+
type PlaceholderComponentProps = {
67+
placeholderText: string;
68+
height: number;
69+
width: number;
70+
};
71+
72+
const PlaceholderComponent = ({
73+
placeholderText,
74+
height,
75+
width,
76+
}: PlaceholderComponentProps) => {
77+
return (
78+
<Box
79+
sx={{ width: width, height: height, border: "1px dashed grey" }}
80+
alignContent="center"
81+
justifyItems="center"
82+
>
83+
<p>{placeholderText}</p>
84+
</Box>
85+
);
86+
};

0 commit comments

Comments
 (0)