Skip to content

Commit

Permalink
feat: Increase padding of setting pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed Apr 26, 2024
1 parent 6aaa42f commit 26a8058
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions editor.planx.uk/src/routes/flow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { gql } from "@apollo/client";
import Box from "@mui/material/Box";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import natsort from "natsort";
import {
Expand All @@ -12,8 +13,13 @@ import {
withData,
withView,
} from "navi";
import DataManagerSettings from "pages/FlowEditor/components/Settings/DataManagerSettings";
import ServiceFlags from "pages/FlowEditor/components/Settings/ServiceFlags";
import ServiceSettings from "pages/FlowEditor/components/Settings/ServiceSettings";
import Submissions from "pages/FlowEditor/components/Settings/Submissions";
import mapAccum from "ramda/src/mapAccum";
import React from "react";
import { View } from "react-navi";

import { client } from "../lib/graphql";
import FlowEditor from "../pages/FlowEditor";
Expand All @@ -24,12 +30,6 @@ import { useStore } from "../pages/FlowEditor/lib/store";
import type { Flow } from "../types";
import { makeTitle } from "./utils";
import { flowEditorView } from "./views/flowEditor";
import { View } from "react-navi";
import ServiceSettings from "pages/FlowEditor/components/Settings/ServiceSettings";
import Submissions from "pages/FlowEditor/components/Settings/Submissions";
import DataManagerSettings from "pages/FlowEditor/components/Settings/DataManagerSettings";
import ServiceFlags from "pages/FlowEditor/components/Settings/ServiceFlags";
import Box from "@mui/material/Box";

const sorter = natsort({ insensitive: true });
const sortFlows = (a: { text: string }, b: { text: string }) =>
Expand Down Expand Up @@ -177,10 +177,10 @@ const nodeRoutes = mount({
});

const SettingsContainer = () => (
<Box sx={{ width: "100%", p: 2, overflowY: "auto" }}>
<Box sx={{ width: "100%", p: 4, overflowY: "auto" }}>
<View />
</Box>
)
);

const routes = compose(
withData((req) => ({
Expand All @@ -197,9 +197,9 @@ const routes = compose(
const [flow, ...breadcrumbs] = req.params.flow.split(",");
return (
<FlowEditor key={flow} flow={flow} breadcrumbs={breadcrumbs} />
)
}
}
);
},
};
}),

"/nodes": compose(
Expand All @@ -221,38 +221,43 @@ const routes = compose(
withView(SettingsContainer),

route(async (req) => ({
title: makeTitle([req.params.team, req.params.flow, "service"].join("/")),
view: ServiceSettings
title: makeTitle(
[req.params.team, req.params.flow, "service"].join("/"),
),
view: ServiceSettings,
})),
),

"/service-flags": compose(
withView(SettingsContainer),

route(async (req) => ({
title: makeTitle([req.params.team, req.params.flow, "service-flags"].join("/")),
view: ServiceFlags
title: makeTitle(
[req.params.team, req.params.flow, "service-flags"].join("/"),
),
view: ServiceFlags,
})),

),

"/data": compose(
withView(SettingsContainer),

route(async (req) => ({
title: makeTitle([req.params.team, req.params.flow, "data"].join("/")),
view: DataManagerSettings
view: DataManagerSettings,
})),
),

"/submissions-log": compose(
withView(SettingsContainer),

route(async (req) => ({
title: makeTitle([req.params.team, req.params.flow, "submissions-log"].join("/")),
view: Submissions
title: makeTitle(
[req.params.team, req.params.flow, "submissions-log"].join("/"),
),
view: Submissions,
})),
)
),
}),
);

Expand Down

0 comments on commit 26a8058

Please sign in to comment.