Skip to content

Commit

Permalink
fix(vite-server)!: Readd panels and modals, fix imports, cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterBarclay committed Aug 30, 2024
1 parent d83d091 commit 431167d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions fission/src/Synthesis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import DriverStationPanel from "@/panels/simulation/DriverStationPanel"
import PokerPanel from "@/panels/PokerPanel.tsx"
import World from "@/systems/World.ts"
import ImportLocalMirabufModal from "@/modals/mirabuf/ImportLocalMirabufModal.tsx"
// import ImportMirabufPanel from "@/ui/panels/mirabuf/ImportMirabufPanel.tsx"
import ImportMirabufPanel from "@/ui/panels/mirabuf/ImportMirabufPanel.tsx"
import Skybox from "./ui/components/Skybox.tsx"
// import ChooseInputSchemePanel from "./ui/panels/configuring/ChooseInputSchemePanel.tsx"
import ChooseInputSchemePanel from "./ui/panels/configuring/ChooseInputSchemePanel.tsx"
import ProgressNotifications from "./ui/components/ProgressNotification.tsx"
import SceneOverlay from "./ui/components/SceneOverlay.tsx"

Expand All @@ -54,8 +54,8 @@ import Lazy from "./util/Lazy.ts"
import RCConfigPWMGroupModal from "@/modals/configuring/rio-config/RCConfigPWMGroupModal.tsx"
import RCConfigCANGroupModal from "@/modals/configuring/rio-config/RCConfigCANGroupModal.tsx"
import DebugPanel from "./ui/panels/DebugPanel.tsx"
// import NewInputSchemeModal from "./ui/modals/configuring/theme-editor/NewInputSchemeModal.tsx"
// import AssignNewSchemeModal from "./ui/modals/configuring/theme-editor/AssignNewSchemeModal.tsx"
import NewInputSchemeModal from "./ui/modals/configuring/theme-editor/NewInputSchemeModal.tsx"
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 APSManagementModal from "./ui/modals/APSManagementModal.tsx"
Expand Down Expand Up @@ -203,8 +203,8 @@ const initialModals = [
<ChooseSingleplayerModeModal key="singleplayer-mode" modalId="singleplayer-mode" />,
<PracticeSettingsModal key="practice-settings" modalId="practice-settings" />,
<DeleteThemeModal key="delete-theme" modalId="delete-theme" />,
// <NewInputSchemeModal key="new-scheme" modalId="new-scheme" />,
// <AssignNewSchemeModal key="assign-new-scheme" modalId="assign-new-scheme" />,
<NewInputSchemeModal key="new-scheme" modalId="new-scheme" />,
<AssignNewSchemeModal key="assign-new-scheme" modalId="assign-new-scheme" />,
<DeleteAllThemesModal key="delete-all-themes" modalId="delete-all-themes" />,
<NewThemeModal key="new-theme" modalId="new-theme" />,
<RCCreateDeviceModal key="create-device" modalId="create-device" />,
Expand All @@ -222,9 +222,9 @@ const initialPanels: ReactElement[] = [
<DriverStationPanel key="driver-station" panelId="driver-station" />,
<SpawnLocationsPanel key="spawn-locations" panelId="spawn-locations" />,
<ScoreboardPanel key="scoreboard" panelId="scoreboard" openLocation="top" sidePadding={8} />,
// <ImportMirabufPanel key="import-mirabuf" panelId="import-mirabuf" />,
<ImportMirabufPanel key="import-mirabuf" panelId="import-mirabuf" />,
<PokerPanel key="poker" panelId="poker" />,
// <ChooseInputSchemePanel key="choose-scheme" panelId="choose-scheme" />,
<ChooseInputSchemePanel key="choose-scheme" panelId="choose-scheme" />,
<WSViewPanel key="ws-view" panelId="ws-view" />,
<DebugPanel key="debug" panelId="debug" />,
<ConfigurePanel key="configure" panelId="configure" />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import InputSystem from "@/systems/input/InputSystem"
import SynthesisBrain from "@/systems/simulation/synthesis_brain/SynthesisBrain"
import { SynthesisIcons } from "@/ui/components/StyledComponents"
import { usePanelControlContext } from "@/ui/PanelContext"
import { ConfigurationType, setSelectedConfigurationType } from "@/ui/panels/configuring/assembly-config/ConfigurePanel"
import { setSelectedScheme } from "@/ui/panels/configuring/assembly-config/interfaces/inputs/ConfigureInputsInterface"
import { setSelectedConfigurationType, ConfigurationType } from "@/ui/panels/configuring/assembly-config/ConfigurationType"

const AssignNewSchemeModal: React.FC<ModalPropsImpl> = ({ modalId }) => {
const { openPanel } = usePanelControlContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import InputSchemeManager from "@/systems/input/InputSchemeManager"
import DefaultInputs from "@/systems/input/DefaultInputs"
import { SynthesisIcons } from "@/ui/components/StyledComponents"
import { usePanelControlContext } from "@/ui/PanelContext"
import { ConfigurationType, setSelectedConfigurationType } from "@/ui/panels/configuring/assembly-config/ConfigurePanel"
import { setSelectedScheme } from "@/ui/panels/configuring/assembly-config/interfaces/inputs/ConfigureInputsInterface"
import { ConfigurationType, setSelectedConfigurationType } from "@/ui/panels/configuring/assembly-config/ConfigurationType"

const NewInputSchemeModal: React.FC<ModalPropsImpl> = ({ modalId }) => {
const { openPanel } = usePanelControlContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ const ConfigInterface: React.FC<ConfigInterfaceProps> = ({ configMode, assembly,
return <ConfigureScoringZonesInterface selectedField={assembly} initialZones={zones} />
}
default:
return <></>
// throw new Error(`Config mode ${configMode} has no associated interface`)
throw new Error(`Config mode ${configMode} has no associated interface`)
}
}

Expand Down Expand Up @@ -242,7 +241,6 @@ const ConfigurePanel: React.FC<PanelPropsImpl> = ({ panelId }) => {
</ToggleButtonGroup>
{configurationType == ConfigurationType.INPUTS ? (
<ChangeInputsInterface />
// <></>
) : (
<>
{/** Select menu to pick a robot or field */}
Expand Down

0 comments on commit 431167d

Please sign in to comment.