From 6947f811e17b2c7d5973de5e9fe71e9f7cade6d6 Mon Sep 17 00:00:00 2001 From: Dhruv Arora Date: Tue, 30 Jul 2024 19:00:21 -0700 Subject: [PATCH 1/8] Added basic UI --- fission/src/Synthesis.tsx | 2 + .../ui/modals/configuring/SettingsModal.tsx | 5 ++ .../src/ui/panels/QualitySettingsPanel.tsx | 50 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 fission/src/ui/panels/QualitySettingsPanel.tsx diff --git a/fission/src/Synthesis.tsx b/fission/src/Synthesis.tsx index e027a5e761..efe7ec11c8 100644 --- a/fission/src/Synthesis.tsx +++ b/fission/src/Synthesis.tsx @@ -66,6 +66,7 @@ import NewInputSchemeModal from "./ui/modals/configuring/theme-editor/NewInputSc import AssignNewSchemeModal from "./ui/modals/configuring/theme-editor/AssignNewSchemeModal.tsx" import AnalyticsConsent from "./ui/components/AnalyticsConsent.tsx" import PreferencesSystem from "./systems/preferences/PreferencesSystem.ts" +import QualitySettingsPanel from "./ui/panels/QualitySettingsPanel.tsx" const worker = new Lazy(() => new WPILibWSWorker()) @@ -253,6 +254,7 @@ const initialPanels: ReactElement[] = [ , , , + , ] export default Synthesis diff --git a/fission/src/ui/modals/configuring/SettingsModal.tsx b/fission/src/ui/modals/configuring/SettingsModal.tsx index 9e2ab7e340..5e3923b584 100644 --- a/fission/src/ui/modals/configuring/SettingsModal.tsx +++ b/fission/src/ui/modals/configuring/SettingsModal.tsx @@ -1,5 +1,6 @@ import React, { useState } from "react" import { useModalControlContext } from "@/ui/ModalContext" +import { usePanelControlContext } from "@/ui/PanelContext" import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaGear } from "react-icons/fa6" import Label, { LabelSize } from "@/components/Label" @@ -15,6 +16,7 @@ import { Spacer } from "@/ui/components/StyledComponents" const SettingsModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() + const { openPanel } = usePanelControlContext() const [qualitySettings, setQualitySettings] = useState( PreferencesSystem.getGlobalPreference("QualitySettings") @@ -67,6 +69,9 @@ const SettingsModal: React.FC = ({ modalId }) => { >
+ +