Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/sckan 345 b #377

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions frontend/src/Pages/StatementDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const StatementDetails = () => {

const handleNavigateCancel = () => {
setIsNavigateDialogOpen(false);
scrollToElement(6);
};

const scrollToElement = (index: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const GraphDiagram: React.FC<GraphDiagramProps> = ({
}, []);

return (
<Box>
<Box id='graph-container'>
<NavigationMenu
engine={engine}
statementId={statementId || "-1"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const DestinationNodeWidget: React.FC<DestinationNodeProps> = ({
display: "flex",
width: "7rem",
height: "7rem",
marginTop: "1rem",
marginLeft: "1rem",
padding: "0",
flexDirection: "column",
justifyContent: "center",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const ViaNodeWidget: React.FC<ViaNodeProps> = ({ model, engine }) => {
display: "flex",
width: "6.25rem",
height: "6.25rem",
marginTop: "1.5rem",
marginLeft: "1.5rem",
padding: "1.25rem 0.75rem",
flexDirection: "column",
justifyContent: "center",
Expand Down Expand Up @@ -135,7 +137,7 @@ export const ViaNodeWidget: React.FC<ViaNodeProps> = ({ model, engine }) => {
boxShadow:
"0px 4px 8px -2px rgba(16, 24, 40, 0.10), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)",
position: "absolute",
top: 0,
top: "-1px",
width: "18rem",
zIndex: isActive ? zIndex : "auto",
maxHeight: "36rem",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/ProofingTab/ProofingTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ const ProofingTab = (props: any) => {
paddingBottom: '1.5rem'
}}>
<Typography variant="h5">Statement Display</Typography>
<Button startIcon={<ArrowCircleDownIcon />} variant="text" sx={{
<Button startIcon={<ArrowCircleDownIcon />} variant="text" disabled={true} sx={{
color: theme.palette.primary.dark,
p: 0
}}>Download graph</Button>
</Box>

<StatementChart statement={statement} setStatement={setStatement} />
</Stack>
{hasJourney && (
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useState, useEffect } from "react";
import Box from "@mui/material/Box";
import Drawer from "@mui/material/Drawer";
import Toolbar from "@mui/material/Toolbar";
Expand Down Expand Up @@ -92,6 +92,12 @@ const Sidebar = () => {
dispatch(setPositionChangeOnly(false));
};

useEffect(() => {
document.getElementById("graph-container")?.scrollIntoView();
document.getElementById("graph-container")?.focus();
}
, [isDialogOpen]);

return (
<>
<Drawer variant="permanent" sx={drawerStyle}>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export const CONFIRMATION_DIALOG_CONFIG = {
Icon: LockIcon
},
Navigate: {
title: 'Your changes are not locked.',
confirmationText: 'The connectivity data have been changed. The diagram will reset to match data in the Path Builder.',
title: 'Changes have been made.',
confirmationText: 'The diagram will revert to default routing to match the Path Builder information.',
Icon: WarningIcon
},
Redraw: {
title: 'Are you sure you want to redraw the diagram?',
confirmationText: 'The diagram will be redrawn using default routing. return to default. Are you sure you’d like to proceed?',
confirmationText: 'The diagram will be redrawn using the default routing. Are you sure you’d like to proceed?',
Icon: RestartIcon
},
}
}
Loading