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

Remove obsolete UI elements #178

Merged
merged 9 commits into from
Aug 14, 2023
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
14 changes: 6 additions & 8 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Toaster } from "react-hot-toast";
import { RouteWithLayout } from "./components/layout/Layout";
import { routes } from "./constants/routes";
import { UiStateContextProvider } from "./contexts/ui-state.context";
import { useSearch } from "./hooks/use-search";
import "./App.scss";
import { toastOptions } from "./config/toast";

Expand All @@ -25,28 +24,27 @@ import Events from "./pages/events/Events";
import { ProjectProvider } from "./contexts/project.context";
import { ConfirmDialogProvider } from "./contexts/confirm-dialog.context";
import { QueryClientProvider } from "react-query";
import { Project } from "./pages/project/Project";
import { ProjectRequirements } from "./components/requirements/ProjectRequirements";
import { TimeoutPollingProvider } from "./contexts/timeout-polling.context";
import {
PlatformAdapterProvider,
PlatformAdapterState,
} from "./contexts/platform-adapter.context";
import { queryClient } from "./config/react-query";
import { ConsentDialog } from "./components/consent-dialog/ConsentDialog";
import { ConsentDialog } from "./components/dialogs/consent/ConsentDialog";
import { useAnalyticsConsent } from "./hooks/use-analytics-consent";
import { ServiceRegistry } from "./services/service-registry";
import { AnalyticEvent } from "./services/analytics.service";
import { InteractionsPage } from "./pages/interactions/InteractionsPage";
import { InteractionRegistryProvider } from "pages/interactions/contexts/interaction-registry.context";
import { Configuration } from "./pages/start/configuration/Configuration";

const BrowserRouterEvents = withRouter(
({
children,
history,
location,
}: RouteComponentProps & { children: ReactElement[] }) => {
const { setSearchTerm } = useSearch();
const { analyticsService } = ServiceRegistry.getInstance();

useEffect(() => {
Expand All @@ -55,9 +53,6 @@ const BrowserRouterEvents = withRouter(
location,
action,
});
if (action === "PUSH") {
setSearchTerm("");
}
});
}, []);

Expand Down Expand Up @@ -116,7 +111,10 @@ export const FlowserRoutes = (): ReactElement => {
path={routes.interactions}
component={InteractionsPage}
/>
<RouteWithLayout path={routes.project} component={Project} />
<RouteWithLayout
path={routes.configureCurrent}
component={Configuration}
/>
<Redirect from="*" to={routes.start} />
</Switch>
<Toaster
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/assets/icons/create-snapshot.svg

This file was deleted.

12 changes: 0 additions & 12 deletions frontend/src/assets/icons/send-tx.svg

This file was deleted.

8 changes: 0 additions & 8 deletions frontend/src/assets/icons/settings-circle.svg

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/assets/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions frontend/src/assets/icons/share-feedback.svg

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/src/assets/icons/side-menu-closed.svg

This file was deleted.

16 changes: 0 additions & 16 deletions frontend/src/assets/icons/side-menu-open-emulator-not-working.svg

This file was deleted.

10 changes: 0 additions & 10 deletions frontend/src/assets/icons/side-menu-open.svg

This file was deleted.

11 changes: 2 additions & 9 deletions frontend/src/assets/icons/switch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC, ReactElement } from "react";
import classes from "./ActionDialog.module.scss";
import classNames from "classnames";
import Dialog, { DialogProps } from "../dialog/Dialog";
import { BaseDialog, DialogProps } from "../base/BaseDialog";

export type ActionDialogProps = {
title: string;
Expand All @@ -17,12 +17,12 @@ export const ActionDialog: FC<ActionDialogProps> = ({
...dialogProps
}) => {
return (
<Dialog {...dialogProps}>
<BaseDialog {...dialogProps}>
<div className={classes.root}>
<h3>{title}</h3>
<div className={classNames(classes.body, bodyClass)}>{children}</div>
{footer && <div className={classes.actions}>{footer}</div>}
</div>
</Dialog>
</BaseDialog>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import React, {
MouseEventHandler,
ReactElement,
} from "react";
import classes from "./Dialog.module.scss";
import classes from "./BaseDialog.module.scss";
import classNames from "classnames";
import Card from "../card/Card";
import Card from "../../card/Card";

export type DialogProps = {
children: ReactElement[] | ReactElement;
onClose: MouseEventHandler<HTMLDivElement>;
className?: string;
};

const Dialog: FunctionComponent<DialogProps> = ({
export const BaseDialog: FunctionComponent<DialogProps> = ({
children,
onClose,
className,
Expand All @@ -37,5 +37,3 @@ const Dialog: FunctionComponent<DialogProps> = ({
</div>
);
};

export default Dialog;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FunctionComponent, useState } from "react";
import Button from "../buttons/button/Button";
import { ActionDialog, ActionDialogProps } from "../action-dialog/ActionDialog";
import Button from "../../buttons/button/Button";
import { ActionDialog, ActionDialogProps } from "../action/ActionDialog";

export type ConfirmDialogProps = ActionDialogProps & {
onClose: () => void | Promise<void>;
Expand All @@ -11,7 +11,7 @@ export type ConfirmDialogProps = ActionDialogProps & {
title: string;
};

const ConfirmDialog: FunctionComponent<ConfirmDialogProps> = ({
export const ConfirmationDialog: FunctionComponent<ConfirmDialogProps> = ({
onConfirm,
onClose,
title,
Expand Down Expand Up @@ -52,5 +52,3 @@ const ConfirmDialog: FunctionComponent<ConfirmDialogProps> = ({
</ActionDialog>
);
};

export default ConfirmDialog;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { ReactElement, useState } from "react";
import Dialog from "../dialog/Dialog";
import { BaseDialog } from "../base/BaseDialog";
import classes from "./ConsentDialog.module.scss";
import logo from "../../assets/images/logo-foreground.svg";
import logo from "../../../assets/images/logo-foreground.svg";
import ToggleButton, {
ToggleButtonProps,
} from "../buttons/toggle-button/ToggleButton";
import Button from "../buttons/button/Button";
} from "../../buttons/toggle-button/ToggleButton";
import Button from "../../buttons/button/Button";

export type ConsentDialogProps = {
consent: boolean;
Expand All @@ -21,7 +21,7 @@ export function ConsentDialog({
const [tempConsent, setTempConsent] = useState(consent);

return (
<Dialog onClose={onClose} className={classes.modal}>
<BaseDialog onClose={onClose} className={classes.modal}>
<div className={classes.root}>
<div className={classes.header}>
<img alt="Flowser logo" src={logo} className={classes.logo} />
Expand Down Expand Up @@ -53,7 +53,7 @@ export function ConsentDialog({
<Button onClick={() => setConsent(tempConsent)}>Continue</Button>
</div>
</div>
</Dialog>
</BaseDialog>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { FC, useState } from "react";
import Button from "../buttons/button/Button";
import Button from "../../buttons/button/Button";
import classes from "./SnapshotDialog.module.scss";
import toast from "react-hot-toast";
import { ServiceRegistry } from "../../services/service-registry";
import Input from "../input/Input";
import { ActionDialog } from "../action-dialog/ActionDialog";
import { useCurrentProjectId, useGetCurrentProject } from "../../hooks/use-api";
import { useErrorHandler } from "../../hooks/use-error-handler";
import { ServiceRegistry } from "../../../services/service-registry";
import Input from "../../input/Input";
import { ActionDialog } from "../action/ActionDialog";
import { useCurrentProjectId } from "../../../hooks/use-api";
import { useErrorHandler } from "../../../hooks/use-error-handler";

export type SnapshotDialogProps = {
show?: boolean;
Expand All @@ -15,7 +15,6 @@ export type SnapshotDialogProps = {

export const SnapshotDialog: FC<SnapshotDialogProps> = ({ show, setShow }) => {
const projectId = useCurrentProjectId();
const { data } = useGetCurrentProject();
const { handleError } = useErrorHandler(SnapshotDialog.name);
const { snapshotService } = ServiceRegistry.getInstance();
const [loading, setLoading] = useState(false);
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/components/fragment/Fragment.tsx

This file was deleted.

Loading