Skip to content

Commit

Permalink
refactor: Rename <SettingsRow> to <SettingsSection>
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed Jun 27, 2024
1 parent b350e5d commit dfab82a
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import gql from "graphql-tag";
import { client } from "lib/graphql";
import React, { useState } from "react";
import { Feedback } from "routes/feedback";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";
import ErrorSummary from "ui/shared/ErrorSummary";
import ReactMarkdownOrHtml from "ui/shared/ReactMarkdownOrHtml";

Expand Down Expand Up @@ -156,15 +156,15 @@ export const FeedbackPage: React.FC<Props> = ({ feedback }) => {
return (
<Container maxWidth="contentWrap">
<Box py={4}>
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Feedback log
</Typography>
<Typography variant="body1">
Feedback from users about this service.
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
{feedback.length === 0 ? (
<ErrorSummary
format="info"
Expand Down Expand Up @@ -202,7 +202,7 @@ export const FeedbackPage: React.FC<Props> = ({ feedback }) => {
</Table>
</Feed>
)}
</SettingsRow>
</SettingsSection>
</Box>
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import React from "react";
import { FeaturePlaceholder } from "ui/editor/FeaturePlaceholder";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

const DataManagerSettings: React.FC = () => {
return (
<Box maxWidth="formWrap" mx="auto">
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Data Manager
</Typography>
<Typography variant="body1">
Manage the data that your service uses and makes available via its
API.
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<FeaturePlaceholder title="Feature in development" />
</SettingsRow>
</SettingsSection>
</Box>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TeamTheme } from "@opensystemslab/planx-core/types";
import { FormikConfig } from "formik";
import { useStore } from "pages/FlowEditor/lib/store";
import React, { useEffect, useState } from "react";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

import { ButtonForm } from "./ButtonForm";
import { FaviconForm } from "./FaviconForm";
Expand Down Expand Up @@ -76,14 +76,14 @@ const DesignSettings: React.FC = () => {

return (
<Box maxWidth="formWrap" mx="auto">
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Design
</Typography>
<Typography variant="body1">
How your service appears to public users.
</Typography>
</SettingsRow>
</SettingsSection>
{formikConfig && (
<>
<ThemeAndLogoForm formikConfig={formikConfig} onSuccess={onSuccess} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Snackbar from "@mui/material/Snackbar";
import Typography from "@mui/material/Typography";
import { FormikConfig } from "formik";
import React, { useEffect, useState } from "react";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

import BoundaryForm from "./BoundaryForm";
import ContactForm from "./ContactForm";
Expand Down Expand Up @@ -71,14 +71,14 @@ const GeneralSettings: React.FC = () => {

return (
<Box maxWidth="formWrap" mx="auto">
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
General
</Typography>
<Typography variant="body1">
Important links and settings for how your users connect with you
</Typography>
</SettingsRow>
</SettingsSection>
{formikConfig && (
<>
<ContactForm formikConfig={formikConfig} onSuccess={onSuccess} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import React from "react";
import { FeaturePlaceholder } from "ui/editor/FeaturePlaceholder";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

const ServiceFlags: React.FC = () => {
return (
<Box maxWidth="formWrap" mx="auto">
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Service flags
</Typography>
<Typography variant="body1">
Manage the flag sets that this service uses. Flags at the top of a set
override flags below.
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<FeaturePlaceholder title="Feature in development" />
</SettingsRow>
</SettingsSection>
</Box>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import InputGroup from "ui/editor/InputGroup";
import InputLegend from "ui/editor/InputLegend";
import RichTextInput from "ui/editor/RichTextInput";
import SettingsDescription from "ui/editor/SettingsDescription";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";
import Input, { Props as InputProps } from "ui/shared/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
Expand Down Expand Up @@ -145,15 +145,15 @@ const ServiceSettings: React.FC = () => {
return (
<Box maxWidth="formWrap" mx="auto">
<Box component="form" onSubmit={elementsForm.handleSubmit} mb={2}>
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Elements
</Typography>
<Typography variant="body1">
Manage the features that users will be able to see.
</Typography>
</SettingsRow>
<SettingsRow background>
</SettingsSection>
<SettingsSection background>
<TextInput
title="Legal Disclaimer"
description="Displayed before a user submits their application"
Expand All @@ -173,8 +173,8 @@ const ServiceSettings: React.FC = () => {
onChange: elementsForm.handleChange,
}}
/>
</SettingsRow>
<SettingsRow background>
</SettingsSection>
<SettingsSection background>
<InputGroup flowSpacing>
<InputLegend>Footer Links</InputLegend>
<InputRow>
Expand Down Expand Up @@ -222,8 +222,8 @@ const ServiceSettings: React.FC = () => {
/>
</InputRow>
</InputGroup>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<Button
type="submit"
variant="contained"
Expand All @@ -232,18 +232,18 @@ const ServiceSettings: React.FC = () => {
>
Update elements
</Button>
</SettingsRow>
</SettingsSection>
</Box>
<Box component="form" onSubmit={statusForm.handleSubmit}>
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Status
</Typography>
<Typography variant="body1">
Manage the status of your service.
</Typography>
</SettingsRow>
<SettingsRow background>
</SettingsSection>
<SettingsSection background>
<FormControlLabel
label={statusForm.values.status}
sx={{
Expand Down Expand Up @@ -298,7 +298,7 @@ const ServiceSettings: React.FC = () => {
Reset changes
</Button>
</Box>
</SettingsRow>
</SettingsSection>
</Box>
<Snackbar
open={isAlertOpen}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Box from "@mui/material/Box";
import Container from "@mui/material/Container";
import Typography from "@mui/material/Typography";
import React, { useMemo } from "react";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

import { useStore } from "../../../lib/store";
import EventsLog from "./EventsLog";
Expand Down Expand Up @@ -75,21 +75,21 @@ const Submissions: React.FC = () => {
return (
<Container maxWidth="contentWrap">
<Box>
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Submissions
</Typography>
<Typography variant="body1">
Feed of payment and submission events for this service
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<EventsLog
submissions={submissions}
loading={loading}
error={error}
/>
</SettingsRow>
</SettingsSection>
</Box>
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import React from "react";
import { FeaturePlaceholder } from "ui/editor/FeaturePlaceholder";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

const Team: React.FC = () => {
return (
<Box maxWidth="formWrap" mx="auto">
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Team
</Typography>
<Typography variant="body1">
Manage who has permission to edit this service.
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<FeaturePlaceholder title="Feature in development" />
</SettingsRow>
</SettingsSection>
<hr style={{ margin: "40px 0" }} />
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Sharing
</Typography>
<Typography variant="body1">
Allow other teams on Plan✕ to find and use your service pattern.
</Typography>
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<FeaturePlaceholder title="Feature in development" />
</SettingsRow>
</SettingsSection>
</Box>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from "react";
import InputGroup from "ui/editor/InputGroup";
import InputLegend from "ui/editor/InputLegend";
import SettingsDescription from "ui/editor/SettingsDescription";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";
import ErrorWrapper from "ui/shared/ErrorWrapper";

type SettingsFormProps<TFormikValues> = {
Expand All @@ -25,7 +25,7 @@ export const SettingsForm = <TFormikValues,>({
preview,
}: SettingsFormProps<TFormikValues>) => {
return (
<SettingsRow background>
<SettingsSection background>
<form onSubmit={formik.handleSubmit}>
<InputGroup flowSpacing>
<InputLegend>{legend}</InputLegend>
Expand Down Expand Up @@ -61,6 +61,6 @@ export const SettingsForm = <TFormikValues,>({
</Box>
</ErrorWrapper>
</form>
</SettingsRow>
</SettingsSection>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Typography from "@mui/material/Typography";
import { Role, User } from "@opensystemslab/planx-core/types";
import React from "react";
import { FONT_WEIGHT_SEMI_BOLD } from "theme";
import SettingsRow from "ui/editor/SettingsRow";
import SettingsSection from "ui/editor/SettingsSection";

const StyledAvatar = styled(Avatar)(({ theme }) => ({
background: theme.palette.background.dark,
Expand Down Expand Up @@ -129,26 +129,26 @@ export const TeamMembers: React.FC<Props> = ({ teamMembersByRole }) => {
return (
<Container maxWidth="contentWrap">
<Box py={7}>
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Team editors
</Typography>
<Typography variant="body1">
Editors have access to edit your services.
</Typography>
<MembersTable members={activeMembers} />
</SettingsRow>
<SettingsRow>
</SettingsSection>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Admins
</Typography>
<Typography variant="body1">
Admins have editor access across all teams.
</Typography>
<MembersTable members={platformAdmins} />
</SettingsRow>
</SettingsSection>
{archivedMembers.length > 0 && (
<SettingsRow>
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Archived team editors
</Typography>
Expand All @@ -157,7 +157,7 @@ export const TeamMembers: React.FC<Props> = ({ teamMembersByRole }) => {
be part of the edit history of your services.
</Typography>
<MembersTable members={archivedMembers} />
</SettingsRow>
</SettingsSection>
)}
</Box>
</Container>
Expand Down
Loading

0 comments on commit dfab82a

Please sign in to comment.