Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 29 additions & 16 deletions frontend/unified/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { SESSION_QUERY } from "./graphql/SessionQuery";

const VERTICAL_SPACING = 2;
const HORIZONTAL_SPACING = 2;
const SIDEBAR_WIDTH = 300;

const useFedid = (): string => {
const token = useAuth().getToken();
Expand Down Expand Up @@ -172,28 +173,40 @@ export const App: React.FC = () => {
const beamline = mapStringsToBeamline(session.instrument.name);

return (
<>
<Drawer variant="permanent">
<Box sx={{ display: "flex" }}>
<Drawer
variant="permanent"
sx={{
width: SIDEBAR_WIDTH,
flexShrink: 0,
"& .MuiDrawer-paper": {
width: SIDEBAR_WIDTH,
boxSizing: "border-box",
},
}}
>
<Sidebar
scanIds={selectedScanIds}
updateSelectedScanIds={setSelectedScanIds}
/>
</Drawer>
{/* Wrap the SessionSelector in a <Stack> as it the TextField won't remember
<Box sx={{ flexGrow: 1 }}>
{/* Wrap the SessionSelector in a <Stack> as it the TextField won't remember
the session text otherwise */}
<Stack>
{getSessionSelector(latestSessionAvailable, session, sessionName)}
</Stack>

<ApolloProvider client={apolloClientWorkflows}>
<WorkflowsDataFetcher
visit={selectedVisit}
beamline={beamline}
startTime={session.startTime}
scanIds={selectedScanIds}
/>
</ApolloProvider>
</>
<Stack>
{getSessionSelector(latestSessionAvailable, session, sessionName)}
</Stack>

<ApolloProvider client={apolloClientWorkflows}>
<WorkflowsDataFetcher
visit={selectedVisit}
beamline={beamline}
startTime={session.startTime}
scanIds={selectedScanIds}
/>
</ApolloProvider>
</Box>
</Box>
);
} else {
return (
Expand Down
Loading