From 89a3215ccd5ce6525bb1dcd08b370b18c2602c3f Mon Sep 17 00:00:00 2001 From: PepperLola Date: Tue, 18 Jun 2024 16:16:13 -0700 Subject: [PATCH 1/2] moved all ui components to src/ui added path aliases to reference new components, modals, panels directories --- fission/src/Synthesis.tsx | 84 +++++++++---------- fission/src/ToastContext.tsx | 2 +- fission/src/{ => ui}/components/Button.tsx | 0 fission/src/{ => ui}/components/Checkbox.tsx | 0 fission/src/{ => ui}/components/Container.tsx | 0 fission/src/{ => ui}/components/Dropdown.tsx | 0 fission/src/{ => ui}/components/Input.tsx | 0 fission/src/{ => ui}/components/Label.tsx | 0 .../src/{ => ui}/components/LabeledButton.tsx | 0 fission/src/{ => ui}/components/MainHUD.tsx | 8 +- fission/src/{ => ui}/components/Modal.tsx | 2 +- fission/src/{ => ui}/components/Panel.tsx | 2 +- fission/src/{ => ui}/components/Radio.tsx | 0 fission/src/{ => ui}/components/Scene.css | 0 fission/src/{ => ui}/components/Scene.tsx | 4 +- .../src/{ => ui}/components/ScrollView.tsx | 0 .../src/{ => ui}/components/SelectButton.tsx | 0 fission/src/{ => ui}/components/Slider.tsx | 0 fission/src/{ => ui}/components/Stack.tsx | 0 fission/src/{ => ui}/components/Toast.tsx | 2 +- fission/src/{ => ui}/components/Tooltip.tsx | 0 fission/src/{ => ui}/components/UserIcon.tsx | 0 .../{ => ui}/modals/DownloadAssetsModal.tsx | 8 +- .../{ => ui}/modals/ExitSynthesisModal.tsx | 4 +- .../src/{ => ui}/modals/MatchResultsModal.tsx | 6 +- .../{ => ui}/modals/UpdateAvailableModal.tsx | 4 +- fission/src/{ => ui}/modals/ViewModal.tsx | 4 +- .../aether/ConnectToMultiplayerModal.tsx | 10 +-- .../modals/aether/ServerHostingModal.tsx | 6 +- .../modals/configuring/ChangeInputsModal.tsx | 8 +- .../ChooseMultiplayerModeModal.tsx | 4 +- .../ChooseSingleplayerModeModal.tsx | 4 +- .../modals/configuring/ConfigMotorModal.tsx | 6 +- .../modals/configuring/DrivetrainModal.tsx | 4 +- .../configuring/PracticeSettingsModal.tsx | 10 +-- .../modals/configuring/RoboRIOModal.tsx | 6 +- .../modals/configuring/SettingsModal.tsx | 14 ++-- .../rio-config/RCConfigEncoderModal.tsx | 10 +-- .../rio-config/RCConfigPwmGroupModal.tsx | 16 ++-- .../rio-config/RCCreateDeviceModal.tsx | 6 +- .../theme-editor/DeleteAllThemesModal.tsx | 6 +- .../theme-editor/DeleteThemeModal.tsx | 6 +- .../theme-editor/NewThemeModal.tsx | 8 +- .../theme-editor/ThemeEditorModal.tsx | 0 .../modals/mirabuf/ImportMirabufModal.tsx | 4 +- .../modals/spawning/ManageAssembliesModal.tsx | 4 +- .../modals/spawning/MatchModeModal.tsx | 6 +- .../modals/spawning/SpawningModals.tsx | 2 +- .../src/{ => ui}/panels/RobotSwitchPanel.tsx | 12 +-- .../{ => ui}/panels/SpawnLocationPanel.tsx | 4 +- .../ConfigureGamepiecePickupPanel.tsx | 6 +- .../ConfigureShotTrajectoryPanel.tsx | 6 +- .../configuring/scoring/ScoringZonesPanel.tsx | 0 .../configuring/scoring/ZoneConfigPanel.tsx | 0 .../panels/information/ScoreboardPanel.tsx | 6 +- .../panels/simulation/DriverStationPanel.tsx | 8 +- fission/tsconfig.json | 76 ++++++++++------- fission/vite.config.ts | 69 +++++++-------- 58 files changed, 240 insertions(+), 217 deletions(-) rename fission/src/{ => ui}/components/Button.tsx (100%) rename fission/src/{ => ui}/components/Checkbox.tsx (100%) rename fission/src/{ => ui}/components/Container.tsx (100%) rename fission/src/{ => ui}/components/Dropdown.tsx (100%) rename fission/src/{ => ui}/components/Input.tsx (100%) rename fission/src/{ => ui}/components/Label.tsx (100%) rename fission/src/{ => ui}/components/LabeledButton.tsx (100%) rename fission/src/{ => ui}/components/MainHUD.tsx (97%) rename fission/src/{ => ui}/components/Modal.tsx (98%) rename fission/src/{ => ui}/components/Panel.tsx (98%) rename fission/src/{ => ui}/components/Radio.tsx (100%) rename fission/src/{ => ui}/components/Scene.css (100%) rename fission/src/{ => ui}/components/Scene.tsx (96%) rename fission/src/{ => ui}/components/ScrollView.tsx (100%) rename fission/src/{ => ui}/components/SelectButton.tsx (100%) rename fission/src/{ => ui}/components/Slider.tsx (100%) rename fission/src/{ => ui}/components/Stack.tsx (100%) rename fission/src/{ => ui}/components/Toast.tsx (97%) rename fission/src/{ => ui}/components/Tooltip.tsx (100%) rename fission/src/{ => ui}/components/UserIcon.tsx (100%) rename fission/src/{ => ui}/modals/DownloadAssetsModal.tsx (89%) rename fission/src/{ => ui}/modals/ExitSynthesisModal.tsx (85%) rename fission/src/{ => ui}/modals/MatchResultsModal.tsx (85%) rename fission/src/{ => ui}/modals/UpdateAvailableModal.tsx (83%) rename fission/src/{ => ui}/modals/ViewModal.tsx (94%) rename fission/src/{ => ui}/modals/aether/ConnectToMultiplayerModal.tsx (79%) rename fission/src/{ => ui}/modals/aether/ServerHostingModal.tsx (87%) rename fission/src/{ => ui}/modals/configuring/ChangeInputsModal.tsx (94%) rename fission/src/{ => ui}/modals/configuring/ChooseMultiplayerModeModal.tsx (83%) rename fission/src/{ => ui}/modals/configuring/ChooseSingleplayerModeModal.tsx (82%) rename fission/src/{ => ui}/modals/configuring/ConfigMotorModal.tsx (93%) rename fission/src/{ => ui}/modals/configuring/DrivetrainModal.tsx (94%) rename fission/src/{ => ui}/modals/configuring/PracticeSettingsModal.tsx (76%) rename fission/src/{ => ui}/modals/configuring/RoboRIOModal.tsx (75%) rename fission/src/{ => ui}/modals/configuring/SettingsModal.tsx (83%) rename fission/src/{ => ui}/modals/configuring/rio-config/RCConfigEncoderModal.tsx (89%) rename fission/src/{ => ui}/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx (89%) rename fission/src/{ => ui}/modals/configuring/rio-config/RCCreateDeviceModal.tsx (86%) rename fission/src/{ => ui}/modals/configuring/theme-editor/DeleteAllThemesModal.tsx (78%) rename fission/src/{ => ui}/modals/configuring/theme-editor/DeleteThemeModal.tsx (78%) rename fission/src/{ => ui}/modals/configuring/theme-editor/NewThemeModal.tsx (79%) rename fission/src/{ => ui}/modals/configuring/theme-editor/ThemeEditorModal.tsx (100%) rename fission/src/{ => ui}/modals/mirabuf/ImportMirabufModal.tsx (98%) rename fission/src/{ => ui}/modals/spawning/ManageAssembliesModal.tsx (95%) rename fission/src/{ => ui}/modals/spawning/MatchModeModal.tsx (88%) rename fission/src/{ => ui}/modals/spawning/SpawningModals.tsx (98%) rename fission/src/{ => ui}/panels/RobotSwitchPanel.tsx (81%) rename fission/src/{ => ui}/panels/SpawnLocationPanel.tsx (94%) rename fission/src/{ => ui}/panels/configuring/ConfigureGamepiecePickupPanel.tsx (85%) rename fission/src/{ => ui}/panels/configuring/ConfigureShotTrajectoryPanel.tsx (85%) rename fission/src/{ => ui}/panels/configuring/scoring/ScoringZonesPanel.tsx (100%) rename fission/src/{ => ui}/panels/configuring/scoring/ZoneConfigPanel.tsx (100%) rename fission/src/{ => ui}/panels/information/ScoreboardPanel.tsx (92%) rename fission/src/{ => ui}/panels/simulation/DriverStationPanel.tsx (77%) diff --git a/fission/src/Synthesis.tsx b/fission/src/Synthesis.tsx index 7cfd69ca47..9bef5a00ba 100644 --- a/fission/src/Synthesis.tsx +++ b/fission/src/Synthesis.tsx @@ -1,4 +1,4 @@ -import Scene from './components/Scene.tsx'; +import Scene from '@/components/Scene.tsx'; import MirabufSceneObject from './mirabuf/MirabufSceneObject.ts'; import { LoadMirabufRemote } from './mirabuf/MirabufLoader.ts'; import { mirabuf } from './proto/mirabuf'; @@ -6,53 +6,53 @@ import MirabufParser, { ParseErrorSeverity } from './mirabuf/MirabufParser.ts'; import MirabufInstance from './mirabuf/MirabufInstance.ts'; import { AnimatePresence, motion } from "framer-motion" import { ReactElement, useEffect } from "react" -import { ModalControlProvider, useModalManager } from "./ModalContext" -import { PanelControlProvider, usePanelManager } from "./PanelContext" -import { useTheme } from "./ThemeContext" -import { ToastContainer, ToastProvider } from "./ToastContext" +import { ModalControlProvider, useModalManager } from "@/ModalContext" +import { PanelControlProvider, usePanelManager } from "@/PanelContext" +import { useTheme } from "@/ThemeContext" +import { ToastContainer, ToastProvider } from "@/ToastContext" import { TOOLTIP_DURATION, TooltipControl, TooltipControlProvider, TooltipType, useTooltipManager, -} from "./TooltipContext" -import MainHUD from "./components/MainHUD" -import DownloadAssetsModal from "./modals/DownloadAssetsModal" -import ExitSynthesisModal from "./modals/ExitSynthesisModal" -import MatchResultsModal from "./modals/MatchResultsModal" -import UpdateAvailableModal from "./modals/UpdateAvailableModal" -import ViewModal from "./modals/ViewModal" -import ConnectToMultiplayerModal from "./modals/aether/ConnectToMultiplayerModal" -import ServerHostingModal from "./modals/aether/ServerHostingModal" -import ChangeInputsModal from "./modals/configuring/ChangeInputsModal" -import ChooseMultiplayerModeModal from "./modals/configuring/ChooseMultiplayerModeModal" -import ChooseSingleplayerModeModal from "./modals/configuring/ChooseSingleplayerModeModal" -import ConfigMotorModal from "./modals/configuring/ConfigMotorModal" -import DrivetrainModal from "./modals/configuring/DrivetrainModal" -import PracticeSettingsModal from "./modals/configuring/PracticeSettingsModal" -import RoboRIOModal from "./modals/configuring/RoboRIOModal" -import SettingsModal from "./modals/configuring/SettingsModal" -import RCConfigEncoderModal from "./modals/configuring/rio-config/RCConfigEncoderModal" -import RCConfigPwmGroupModal from "./modals/configuring/rio-config/RCConfigPwmGroupModal" -import RCCreateDeviceModal from "./modals/configuring/rio-config/RCCreateDeviceModal" -import DeleteAllThemesModal from "./modals/configuring/theme-editor/DeleteAllThemesModal" -import DeleteThemeModal from "./modals/configuring/theme-editor/DeleteThemeModal" -import NewThemeModal from "./modals/configuring/theme-editor/NewThemeModal" -import ThemeEditorModal from "./modals/configuring/theme-editor/ThemeEditorModal" -import MatchModeModal from "./modals/spawning/MatchModeModal" -import RobotSwitchPanel from "./panels/RobotSwitchPanel" -import SpawnLocationsPanel from "./panels/SpawnLocationPanel" -import ConfigureGamepiecePickupPanel from "./panels/configuring/ConfigureGamepiecePickupPanel" -import ConfigureShotTrajectoryPanel from "./panels/configuring/ConfigureShotTrajectoryPanel" -import ScoringZonesPanel from "./panels/configuring/scoring/ScoringZonesPanel" -import ZoneConfigPanel from "./panels/configuring/scoring/ZoneConfigPanel" -import ScoreboardPanel from "./panels/information/ScoreboardPanel" -import DriverStationPanel from "./panels/simulation/DriverStationPanel" -import ManageAssembliesModal from './modals/spawning/ManageAssembliesModal.tsx'; -import World from './systems/World.ts'; -import { AddRobotsModal, AddFieldsModal, SpawningModal } from './modals/spawning/SpawningModals.tsx'; -import ImportMirabufModal from './modals/mirabuf/ImportMirabufModal.tsx'; +} from "@/TooltipContext" +import MainHUD from "@/components/MainHUD" +import DownloadAssetsModal from "@/modals/DownloadAssetsModal" +import ExitSynthesisModal from "@/modals/ExitSynthesisModal" +import MatchResultsModal from "@/modals/MatchResultsModal" +import UpdateAvailableModal from "@/modals/UpdateAvailableModal" +import ViewModal from "@/modals/ViewModal" +import ConnectToMultiplayerModal from "@/modals/aether/ConnectToMultiplayerModal" +import ServerHostingModal from "@/modals/aether/ServerHostingModal" +import ChangeInputsModal from "@/modals/configuring/ChangeInputsModal" +import ChooseMultiplayerModeModal from "@/modals/configuring/ChooseMultiplayerModeModal" +import ChooseSingleplayerModeModal from "@/modals/configuring/ChooseSingleplayerModeModal" +import ConfigMotorModal from "@/modals/configuring/ConfigMotorModal" +import DrivetrainModal from "@/modals/configuring/DrivetrainModal" +import PracticeSettingsModal from "@/modals/configuring/PracticeSettingsModal" +import RoboRIOModal from "@/modals/configuring/RoboRIOModal" +import SettingsModal from "@/modals/configuring/SettingsModal" +import RCConfigEncoderModal from "@/modals/configuring/rio-config/RCConfigEncoderModal" +import RCConfigPwmGroupModal from "@/modals/configuring/rio-config/RCConfigPwmGroupModal" +import RCCreateDeviceModal from "@/modals/configuring/rio-config/RCCreateDeviceModal" +import DeleteAllThemesModal from "@/modals/configuring/theme-editor/DeleteAllThemesModal" +import DeleteThemeModal from "@/modals/configuring/theme-editor/DeleteThemeModal" +import NewThemeModal from "@/modals/configuring/theme-editor/NewThemeModal" +import ThemeEditorModal from "@/modals/configuring/theme-editor/ThemeEditorModal" +import MatchModeModal from "@/modals/spawning/MatchModeModal" +import RobotSwitchPanel from "@/panels/RobotSwitchPanel" +import SpawnLocationsPanel from "@/panels/SpawnLocationPanel" +import ConfigureGamepiecePickupPanel from "@/panels/configuring/ConfigureGamepiecePickupPanel" +import ConfigureShotTrajectoryPanel from "@/panels/configuring/ConfigureShotTrajectoryPanel" +import ScoringZonesPanel from "@/panels/configuring/scoring/ScoringZonesPanel" +import ZoneConfigPanel from "@/panels/configuring/scoring/ZoneConfigPanel" +import ScoreboardPanel from "@/panels/information/ScoreboardPanel" +import DriverStationPanel from "@/panels/simulation/DriverStationPanel" +import ManageAssembliesModal from '@/modals/spawning/ManageAssembliesModal.tsx'; +import World from '@/systems/World.ts'; +import { AddRobotsModal, AddFieldsModal, SpawningModal } from '@/modals/spawning/SpawningModals.tsx'; +import ImportMirabufModal from '@/modals/mirabuf/ImportMirabufModal.tsx'; const DEFAULT_MIRA_PATH = '/api/mira/Robots/Team 2471 (2018)_v7.mira'; diff --git a/fission/src/ToastContext.tsx b/fission/src/ToastContext.tsx index cc473456a7..39af7a9069 100644 --- a/fission/src/ToastContext.tsx +++ b/fission/src/ToastContext.tsx @@ -5,7 +5,7 @@ import React, { useCallback, ReactNode, } from "react" -import Toast from "./components/Toast" +import Toast from "@/components/Toast" import { AnimatePresence, motion } from "framer-motion" export type ToastType = "info" | "warning" | "error" diff --git a/fission/src/components/Button.tsx b/fission/src/ui/components/Button.tsx similarity index 100% rename from fission/src/components/Button.tsx rename to fission/src/ui/components/Button.tsx diff --git a/fission/src/components/Checkbox.tsx b/fission/src/ui/components/Checkbox.tsx similarity index 100% rename from fission/src/components/Checkbox.tsx rename to fission/src/ui/components/Checkbox.tsx diff --git a/fission/src/components/Container.tsx b/fission/src/ui/components/Container.tsx similarity index 100% rename from fission/src/components/Container.tsx rename to fission/src/ui/components/Container.tsx diff --git a/fission/src/components/Dropdown.tsx b/fission/src/ui/components/Dropdown.tsx similarity index 100% rename from fission/src/components/Dropdown.tsx rename to fission/src/ui/components/Dropdown.tsx diff --git a/fission/src/components/Input.tsx b/fission/src/ui/components/Input.tsx similarity index 100% rename from fission/src/components/Input.tsx rename to fission/src/ui/components/Input.tsx diff --git a/fission/src/components/Label.tsx b/fission/src/ui/components/Label.tsx similarity index 100% rename from fission/src/components/Label.tsx rename to fission/src/ui/components/Label.tsx diff --git a/fission/src/components/LabeledButton.tsx b/fission/src/ui/components/LabeledButton.tsx similarity index 100% rename from fission/src/components/LabeledButton.tsx rename to fission/src/ui/components/LabeledButton.tsx diff --git a/fission/src/components/MainHUD.tsx b/fission/src/ui/components/MainHUD.tsx similarity index 97% rename from fission/src/components/MainHUD.tsx rename to fission/src/ui/components/MainHUD.tsx index d1178622e8..1e54d4a81a 100644 --- a/fission/src/components/MainHUD.tsx +++ b/fission/src/ui/components/MainHUD.tsx @@ -6,11 +6,11 @@ import { GrFormClose } from "react-icons/gr" import { GiSteeringWheel } from "react-icons/gi" import { HiDownload } from "react-icons/hi" import { IoGameControllerOutline, IoPeople } from "react-icons/io5" -import { useModalControlContext } from "../ModalContext" -import { usePanelControlContext } from "../PanelContext" +import { useModalControlContext } from "@/ModalContext" +import { usePanelControlContext } from "@/PanelContext" import { motion } from "framer-motion" -import logo from "../assets/autodesk_logo.png" -import { ToastType, useToastContext } from "../ToastContext" +import logo from "@/assets/autodesk_logo.png" +import { ToastType, useToastContext } from "@/ToastContext" import { Random } from "@/util/Random" import APS, { APS_USER_INFO_UPDATE_EVENT } from "@/aps/APS" import { UserIcon } from "./UserIcon" diff --git a/fission/src/components/Modal.tsx b/fission/src/ui/components/Modal.tsx similarity index 98% rename from fission/src/components/Modal.tsx rename to fission/src/ui/components/Modal.tsx index 4d822ff1cf..3a1ba847d9 100644 --- a/fission/src/components/Modal.tsx +++ b/fission/src/ui/components/Modal.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react" -import { useModalControlContext } from "../ModalContext" +import { useModalControlContext } from "@/ModalContext" export type ModalPropsImpl = { modalId: string diff --git a/fission/src/components/Panel.tsx b/fission/src/ui/components/Panel.tsx similarity index 98% rename from fission/src/components/Panel.tsx rename to fission/src/ui/components/Panel.tsx index 7605e21942..8d4c324c5e 100644 --- a/fission/src/components/Panel.tsx +++ b/fission/src/ui/components/Panel.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react" -import { usePanelControlContext } from "../PanelContext" +import { usePanelControlContext } from "@/PanelContext" export type PanelPropsImpl = { panelId: string diff --git a/fission/src/components/Radio.tsx b/fission/src/ui/components/Radio.tsx similarity index 100% rename from fission/src/components/Radio.tsx rename to fission/src/ui/components/Radio.tsx diff --git a/fission/src/components/Scene.css b/fission/src/ui/components/Scene.css similarity index 100% rename from fission/src/components/Scene.css rename to fission/src/ui/components/Scene.css diff --git a/fission/src/components/Scene.tsx b/fission/src/ui/components/Scene.tsx similarity index 96% rename from fission/src/components/Scene.tsx rename to fission/src/ui/components/Scene.tsx index 2ee5a71b33..602f18c8b7 100644 --- a/fission/src/components/Scene.tsx +++ b/fission/src/ui/components/Scene.tsx @@ -2,7 +2,7 @@ import './Scene.css'; import { useEffect, useRef } from "react"; import Stats from 'stats.js'; import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; -import SceneObject from "../systems/scene/SceneObject"; +import SceneObject from "@/systems/scene/SceneObject"; import World from '@/systems/World'; let stats: Stats | null; @@ -64,4 +64,4 @@ function Scene({ useStats }: SceneProps) { ); } -export default Scene; \ No newline at end of file +export default Scene; diff --git a/fission/src/components/ScrollView.tsx b/fission/src/ui/components/ScrollView.tsx similarity index 100% rename from fission/src/components/ScrollView.tsx rename to fission/src/ui/components/ScrollView.tsx diff --git a/fission/src/components/SelectButton.tsx b/fission/src/ui/components/SelectButton.tsx similarity index 100% rename from fission/src/components/SelectButton.tsx rename to fission/src/ui/components/SelectButton.tsx diff --git a/fission/src/components/Slider.tsx b/fission/src/ui/components/Slider.tsx similarity index 100% rename from fission/src/components/Slider.tsx rename to fission/src/ui/components/Slider.tsx diff --git a/fission/src/components/Stack.tsx b/fission/src/ui/components/Stack.tsx similarity index 100% rename from fission/src/components/Stack.tsx rename to fission/src/ui/components/Stack.tsx diff --git a/fission/src/components/Toast.tsx b/fission/src/ui/components/Toast.tsx similarity index 97% rename from fission/src/components/Toast.tsx rename to fission/src/ui/components/Toast.tsx index 430bc5f9cc..b84fa61637 100644 --- a/fission/src/components/Toast.tsx +++ b/fission/src/ui/components/Toast.tsx @@ -1,5 +1,5 @@ import React, { ReactElement, useEffect } from "react" -import { ToastData, useToastContext } from "../ToastContext" +import { ToastData, useToastContext } from "@/ToastContext" import { GrFormClose } from "react-icons/gr" import { BsFillWrenchAdjustableCircleFill } from "react-icons/bs" import { AiFillWarning } from "react-icons/ai" diff --git a/fission/src/components/Tooltip.tsx b/fission/src/ui/components/Tooltip.tsx similarity index 100% rename from fission/src/components/Tooltip.tsx rename to fission/src/ui/components/Tooltip.tsx diff --git a/fission/src/components/UserIcon.tsx b/fission/src/ui/components/UserIcon.tsx similarity index 100% rename from fission/src/components/UserIcon.tsx rename to fission/src/ui/components/UserIcon.tsx diff --git a/fission/src/modals/DownloadAssetsModal.tsx b/fission/src/ui/modals/DownloadAssetsModal.tsx similarity index 89% rename from fission/src/modals/DownloadAssetsModal.tsx rename to fission/src/ui/modals/DownloadAssetsModal.tsx index 5c656345c3..b37f5bfc89 100644 --- a/fission/src/modals/DownloadAssetsModal.tsx +++ b/fission/src/ui/modals/DownloadAssetsModal.tsx @@ -1,8 +1,8 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../components/Modal" -import Stack, { StackDirection } from "../components/Stack" -import Label, { LabelSize } from "../components/Label" -import LabeledButton, { LabelPlacement } from "../components/LabeledButton" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import Stack, { StackDirection } from "@/components/Stack" +import Label, { LabelSize } from "@/components/Label" +import LabeledButton, { LabelPlacement } from "@/components/LabeledButton" import { HiDownload } from "react-icons/hi" const DownloadAssetsModal: React.FC = ({ modalId }) => ( diff --git a/fission/src/modals/ExitSynthesisModal.tsx b/fission/src/ui/modals/ExitSynthesisModal.tsx similarity index 85% rename from fission/src/modals/ExitSynthesisModal.tsx rename to fission/src/ui/modals/ExitSynthesisModal.tsx index 3c6447cac6..90803210c8 100644 --- a/fission/src/modals/ExitSynthesisModal.tsx +++ b/fission/src/ui/modals/ExitSynthesisModal.tsx @@ -1,7 +1,7 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import Label from "../components/Label" +import Label from "@/components/Label" const ExitSynthesisModal: React.FC = ({ modalId }) => { const isOnMainMenu = false diff --git a/fission/src/modals/MatchResultsModal.tsx b/fission/src/ui/modals/MatchResultsModal.tsx similarity index 85% rename from fission/src/modals/MatchResultsModal.tsx rename to fission/src/ui/modals/MatchResultsModal.tsx index 8d719b294e..3fc1c9cf1b 100644 --- a/fission/src/modals/MatchResultsModal.tsx +++ b/fission/src/ui/modals/MatchResultsModal.tsx @@ -1,8 +1,8 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import Stack, { StackDirection } from "../components/Stack" -import Label from "../components/Label" +import Stack, { StackDirection } from "@/components/Stack" +import Label from "@/components/Label" type Entry = { name: string diff --git a/fission/src/modals/UpdateAvailableModal.tsx b/fission/src/ui/modals/UpdateAvailableModal.tsx similarity index 83% rename from fission/src/modals/UpdateAvailableModal.tsx rename to fission/src/ui/modals/UpdateAvailableModal.tsx index 20ef23014d..5d6dda5cad 100644 --- a/fission/src/modals/UpdateAvailableModal.tsx +++ b/fission/src/ui/modals/UpdateAvailableModal.tsx @@ -1,7 +1,7 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import Label from "../components/Label" +import Label from "@/components/Label" const UpdateAvailableModal: React.FC = ({ modalId }) => { return ( diff --git a/fission/src/modals/ViewModal.tsx b/fission/src/ui/modals/ViewModal.tsx similarity index 94% rename from fission/src/modals/ViewModal.tsx rename to fission/src/ui/modals/ViewModal.tsx index 4afec763ca..67d0523395 100644 --- a/fission/src/modals/ViewModal.tsx +++ b/fission/src/ui/modals/ViewModal.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../components/Modal" -import Dropdown from "../components/Dropdown" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import Dropdown from "@/components/Dropdown" import { FaMagnifyingGlass } from "react-icons/fa6" import { TooltipControl, useTooltipControlContext } from "@/TooltipContext" diff --git a/fission/src/modals/aether/ConnectToMultiplayerModal.tsx b/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx similarity index 79% rename from fission/src/modals/aether/ConnectToMultiplayerModal.tsx rename to fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx index 32cf07c4cb..73b9558ca0 100644 --- a/fission/src/modals/aether/ConnectToMultiplayerModal.tsx +++ b/fission/src/ui/modals/aether/ConnectToMultiplayerModal.tsx @@ -1,10 +1,10 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" -import Button from "../../components/Button" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import Button from "@/components/Button" import { FaGear } from "react-icons/fa6" -import Stack, { StackDirection } from "../../components/Stack" -import Dropdown from "../../components/Dropdown" -import Label from "../../components/Label" +import Stack, { StackDirection } from "@/components/Stack" +import Dropdown from "@/components/Dropdown" +import Label from "@/components/Label" const ConnectToMultiplayerModal: React.FC = ({ modalId }) => ( = ({ modalId }) => { return ( diff --git a/fission/src/modals/configuring/ChooseSingleplayerModeModal.tsx b/fission/src/ui/modals/configuring/ChooseSingleplayerModeModal.tsx similarity index 82% rename from fission/src/modals/configuring/ChooseSingleplayerModeModal.tsx rename to fission/src/ui/modals/configuring/ChooseSingleplayerModeModal.tsx index f35d0430dd..083f95d742 100644 --- a/fission/src/modals/configuring/ChooseSingleplayerModeModal.tsx +++ b/fission/src/ui/modals/configuring/ChooseSingleplayerModeModal.tsx @@ -1,7 +1,7 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaGear } from "react-icons/fa6" -import Button from "../../components/Button" +import Button from "@/components/Button" const ChooseSingleplayerModeModal: React.FC = ({ modalId }) => { return ( diff --git a/fission/src/modals/configuring/ConfigMotorModal.tsx b/fission/src/ui/modals/configuring/ConfigMotorModal.tsx similarity index 93% rename from fission/src/modals/configuring/ConfigMotorModal.tsx rename to fission/src/ui/modals/configuring/ConfigMotorModal.tsx index 4a7e658af5..e45dc259e3 100644 --- a/fission/src/modals/configuring/ConfigMotorModal.tsx +++ b/fission/src/ui/modals/configuring/ConfigMotorModal.tsx @@ -1,7 +1,7 @@ import { FaGear } from "react-icons/fa6" -import Modal, { ModalPropsImpl } from "../../components/Modal" -import Slider from "../../components/Slider" -import Label, { LabelSize } from "../../components/Label" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import Slider from "@/components/Slider" +import Label, { LabelSize } from "@/components/Label" import { useState } from "react" type Motor = { diff --git a/fission/src/modals/configuring/DrivetrainModal.tsx b/fission/src/ui/modals/configuring/DrivetrainModal.tsx similarity index 94% rename from fission/src/modals/configuring/DrivetrainModal.tsx rename to fission/src/ui/modals/configuring/DrivetrainModal.tsx index 64d0a3211f..b2ab19aecd 100644 --- a/fission/src/modals/configuring/DrivetrainModal.tsx +++ b/fission/src/ui/modals/configuring/DrivetrainModal.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaCar } from "react-icons/fa6" -import Dropdown from "../../components/Dropdown" +import Dropdown from "@/components/Dropdown" import { TooltipControl, useTooltipControlContext } from "@/TooltipContext" type DrivetrainType = "None" | "Tank" | "Arcade" | "Swerve" diff --git a/fission/src/modals/configuring/PracticeSettingsModal.tsx b/fission/src/ui/modals/configuring/PracticeSettingsModal.tsx similarity index 76% rename from fission/src/modals/configuring/PracticeSettingsModal.tsx rename to fission/src/ui/modals/configuring/PracticeSettingsModal.tsx index 55542cb6dd..a77a7abbd2 100644 --- a/fission/src/modals/configuring/PracticeSettingsModal.tsx +++ b/fission/src/ui/modals/configuring/PracticeSettingsModal.tsx @@ -1,10 +1,10 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaGear } from "react-icons/fa6" -import Button from "../../components/Button" -import Label, { LabelSize } from "../../components/Label" -import Stack, { StackDirection } from "../../components/Stack" -import Dropdown from "../../components/Dropdown" +import Button from "@/components/Button" +import Label, { LabelSize } from "@/components/Label" +import Stack, { StackDirection } from "@/components/Stack" +import Dropdown from "@/components/Dropdown" const PracticeSettingsModal: React.FC = ({ modalId }) => { return ( diff --git a/fission/src/modals/configuring/RoboRIOModal.tsx b/fission/src/ui/modals/configuring/RoboRIOModal.tsx similarity index 75% rename from fission/src/modals/configuring/RoboRIOModal.tsx rename to fission/src/ui/modals/configuring/RoboRIOModal.tsx index 847362c258..1d9896a378 100644 --- a/fission/src/modals/configuring/RoboRIOModal.tsx +++ b/fission/src/ui/modals/configuring/RoboRIOModal.tsx @@ -1,7 +1,7 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" -import LabeledButton, { LabelPlacement } from "../../components/LabeledButton" -import { useModalControlContext } from "../../ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import LabeledButton, { LabelPlacement } from "@/components/LabeledButton" +import { useModalControlContext } from "@/ModalContext" import { BsCodeSquare } from "react-icons/bs" const RoboRIOModal: React.FC = ({ modalId }) => { diff --git a/fission/src/modals/configuring/SettingsModal.tsx b/fission/src/ui/modals/configuring/SettingsModal.tsx similarity index 83% rename from fission/src/modals/configuring/SettingsModal.tsx rename to fission/src/ui/modals/configuring/SettingsModal.tsx index 3a342e4e47..295308f5db 100644 --- a/fission/src/modals/configuring/SettingsModal.tsx +++ b/fission/src/ui/modals/configuring/SettingsModal.tsx @@ -1,12 +1,12 @@ import React from "react" -import { useModalControlContext } from "../../ModalContext" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import { useModalControlContext } from "@/ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaGear } from "react-icons/fa6" -import Label, { LabelSize } from "../../components/Label" -import Dropdown from "../../components/Dropdown" -import Button from "../../components/Button" -import Slider from "../../components/Slider" -import Checkbox from "../../components/Checkbox" +import Label, { LabelSize } from "@/components/Label" +import Dropdown from "@/components/Dropdown" +import Button from "@/components/Button" +import Slider from "@/components/Slider" +import Checkbox from "@/components/Checkbox" const SettingsModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/rio-config/RCConfigEncoderModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx similarity index 89% rename from fission/src/modals/configuring/rio-config/RCConfigEncoderModal.tsx rename to fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx index 5247c45627..079371804c 100644 --- a/fission/src/modals/configuring/rio-config/RCConfigEncoderModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx @@ -1,10 +1,10 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" -import { useModalControlContext } from "../../../ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import { useModalControlContext } from "@/ModalContext" import { FaPlus } from "react-icons/fa6" -import Label, { LabelSize } from "../../../components/Label" -import Input from "../../../components/Input" -import Dropdown from "../../../components/Dropdown" +import Label, { LabelSize } from "@/components/Label" +import Input from "@/components/Input" +import Dropdown from "@/components/Dropdown" const RCConfigEncoderModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx similarity index 89% rename from fission/src/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx rename to fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx index 7f7be3aeab..f9e78b9de9 100644 --- a/fission/src/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx @@ -1,13 +1,13 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" -import { useModalControlContext } from "../../../ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import { useModalControlContext } from "@/ModalContext" import { FaPlus } from "react-icons/fa6" -import ScrollView from "../../../components/ScrollView" -import Stack, { StackDirection } from "../../../components/Stack" -import Checkbox from "../../../components/Checkbox" -import Container from "../../../components/Container" -import Label, { LabelSize } from "../../../components/Label" -import Input from "../../../components/Input" +import ScrollView from "@/components/ScrollView" +import Stack, { StackDirection } from "@/components/Stack" +import Checkbox from "@/components/Checkbox" +import Container from "@/components/Container" +import Label, { LabelSize } from "@/components/Label" +import Input from "@/components/Input" const RCConfigPwmGroupModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/rio-config/RCCreateDeviceModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx similarity index 86% rename from fission/src/modals/configuring/rio-config/RCCreateDeviceModal.tsx rename to fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx index 6e1df80689..5f727dd6ad 100644 --- a/fission/src/modals/configuring/rio-config/RCCreateDeviceModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" -import { useModalControlContext } from "../../../ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import { useModalControlContext } from "@/ModalContext" import { FaPlus } from "react-icons/fa6" -import Dropdown from "../../../components/Dropdown" +import Dropdown from "@/components/Dropdown" const RCCreateDeviceModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/theme-editor/DeleteAllThemesModal.tsx b/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx similarity index 78% rename from fission/src/modals/configuring/theme-editor/DeleteAllThemesModal.tsx rename to fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx index 0eb6525adc..c1a2dc678d 100644 --- a/fission/src/modals/configuring/theme-editor/DeleteAllThemesModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx @@ -1,8 +1,8 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import { useModalControlContext } from "../../../ModalContext" -import { useTheme } from "../../../ThemeContext" +import { useModalControlContext } from "@/ModalContext" +import { useTheme } from "@/ThemeContext" const DeleteAllThemesModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/theme-editor/DeleteThemeModal.tsx b/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx similarity index 78% rename from fission/src/modals/configuring/theme-editor/DeleteThemeModal.tsx rename to fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx index 90330909b4..b255214baf 100644 --- a/fission/src/modals/configuring/theme-editor/DeleteThemeModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx @@ -1,8 +1,8 @@ import React from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import { useModalControlContext } from "../../../ModalContext" -import { useTheme } from "../../../ThemeContext" +import { useModalControlContext } from "@/ModalContext" +import { useTheme } from "@/ThemeContext" const DeleteThemeModal: React.FC = ({ modalId }) => { const { currentTheme, deleteTheme } = useTheme() diff --git a/fission/src/modals/configuring/theme-editor/NewThemeModal.tsx b/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx similarity index 79% rename from fission/src/modals/configuring/theme-editor/NewThemeModal.tsx rename to fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx index 8e77df75da..969ed446ce 100644 --- a/fission/src/modals/configuring/theme-editor/NewThemeModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx @@ -1,9 +1,9 @@ import React, { useState } from "react" -import Modal, { ModalPropsImpl } from "../../../components/Modal" -import { useModalControlContext } from "../../../ModalContext" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import { useModalControlContext } from "@/ModalContext" import { FaPlus } from "react-icons/fa6" -import Input from "../../../components/Input" -import { useTheme } from "../../../ThemeContext" +import Input from "@/components/Input" +import { useTheme } from "@/ThemeContext" const NewThemeModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/modals/configuring/theme-editor/ThemeEditorModal.tsx b/fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx similarity index 100% rename from fission/src/modals/configuring/theme-editor/ThemeEditorModal.tsx rename to fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx diff --git a/fission/src/modals/mirabuf/ImportMirabufModal.tsx b/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx similarity index 98% rename from fission/src/modals/mirabuf/ImportMirabufModal.tsx rename to fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx index 564976cdd0..a0abf1596e 100644 --- a/fission/src/modals/mirabuf/ImportMirabufModal.tsx +++ b/fission/src/ui/modals/mirabuf/ImportMirabufModal.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaPlus } from "react-icons/fa6" import Button from "@/components/Button"; import Label, { LabelSize } from "@/components/Label"; @@ -118,4 +118,4 @@ const ImportMirabufModal: React.FC = ({ modalId }) => { ) } -export default ImportMirabufModal \ No newline at end of file +export default ImportMirabufModal diff --git a/fission/src/modals/spawning/ManageAssembliesModal.tsx b/fission/src/ui/modals/spawning/ManageAssembliesModal.tsx similarity index 95% rename from fission/src/modals/spawning/ManageAssembliesModal.tsx rename to fission/src/ui/modals/spawning/ManageAssembliesModal.tsx index c08a9417fb..7ae40b40c2 100644 --- a/fission/src/modals/spawning/ManageAssembliesModal.tsx +++ b/fission/src/ui/modals/spawning/ManageAssembliesModal.tsx @@ -1,5 +1,5 @@ import React, { useReducer } from "react" -import Modal, { ModalPropsImpl } from "../../components/Modal" +import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaPlus } from "react-icons/fa6" import Button from "@/components/Button"; import Label, { LabelSize } from "@/components/Label"; @@ -55,4 +55,4 @@ const ManageAssembliesModal: React.FC = ({ modalId }) => { ) } -export default ManageAssembliesModal \ No newline at end of file +export default ManageAssembliesModal diff --git a/fission/src/modals/spawning/MatchModeModal.tsx b/fission/src/ui/modals/spawning/MatchModeModal.tsx similarity index 88% rename from fission/src/modals/spawning/MatchModeModal.tsx rename to fission/src/ui/modals/spawning/MatchModeModal.tsx index 869a547d46..7ab0466e2c 100644 --- a/fission/src/modals/spawning/MatchModeModal.tsx +++ b/fission/src/ui/modals/spawning/MatchModeModal.tsx @@ -1,7 +1,7 @@ import { FaGear } from "react-icons/fa6" -import Modal, { ModalPropsImpl } from "../../components/Modal" -import Dropdown from "../../components/Dropdown" -import Label, { LabelSize } from "../../components/Label" +import Modal, { ModalPropsImpl } from "@/components/Modal" +import Dropdown from "@/components/Dropdown" +import Label, { LabelSize } from "@/components/Label" const MatchModeModal: React.FC = ({ modalId }) => { const robotsPerAlliance = 3 diff --git a/fission/src/modals/spawning/SpawningModals.tsx b/fission/src/ui/modals/spawning/SpawningModals.tsx similarity index 98% rename from fission/src/modals/spawning/SpawningModals.tsx rename to fission/src/ui/modals/spawning/SpawningModals.tsx index ac01357931..02164965eb 100644 --- a/fission/src/modals/spawning/SpawningModals.tsx +++ b/fission/src/ui/modals/spawning/SpawningModals.tsx @@ -3,7 +3,7 @@ import Modal, { ModalPropsImpl } from "../../components/Modal" import { FaPlus } from "react-icons/fa6" import Stack, { StackDirection } from "../../components/Stack" import Button, { ButtonSize } from "../../components/Button" -import { useModalControlContext } from "../../ModalContext" +import { useModalControlContext } from "@/ModalContext" import Label, { LabelSize } from "@/components/Label" import { CreateMirabufFromUrl } from "@/mirabuf/MirabufSceneObject" import World from "@/systems/World" diff --git a/fission/src/panels/RobotSwitchPanel.tsx b/fission/src/ui/panels/RobotSwitchPanel.tsx similarity index 81% rename from fission/src/panels/RobotSwitchPanel.tsx rename to fission/src/ui/panels/RobotSwitchPanel.tsx index 3147e164c3..b3d5c52db5 100644 --- a/fission/src/panels/RobotSwitchPanel.tsx +++ b/fission/src/ui/panels/RobotSwitchPanel.tsx @@ -1,11 +1,11 @@ import React, { useState } from "react" -import Label, { LabelSize } from "../components/Label" -import Panel, { PanelPropsImpl } from "../components/Panel" +import Label, { LabelSize } from "@/components/Label" +import Panel, { PanelPropsImpl } from "@/components/Panel" import { IoPeople } from "react-icons/io5" -import Stack, { StackDirection } from "../components/Stack" -import Button from "../components/Button" -import { useModalControlContext } from "../ModalContext" -import Checkbox from "../components/Checkbox" +import Stack, { StackDirection } from "@/components/Stack" +import Button from "@/components/Button" +import { useModalControlContext } from "@/ModalContext" +import Checkbox from "@/components/Checkbox" const RobotSwitchPanel: React.FC = ({ panelId }) => { const [robots, setRobots] = useState([ diff --git a/fission/src/panels/SpawnLocationPanel.tsx b/fission/src/ui/panels/SpawnLocationPanel.tsx similarity index 94% rename from fission/src/panels/SpawnLocationPanel.tsx rename to fission/src/ui/panels/SpawnLocationPanel.tsx index f5b44124a4..c8ff585fb6 100644 --- a/fission/src/panels/SpawnLocationPanel.tsx +++ b/fission/src/ui/panels/SpawnLocationPanel.tsx @@ -1,6 +1,6 @@ import { useTooltipControlContext } from "@/TooltipContext" -import Button from "../components/Button" -import Panel, { PanelPropsImpl } from "../components/Panel" +import Button from "@/components/Button" +import Panel, { PanelPropsImpl } from "@/components/Panel" const SpawnLocationsPanel: React.FC = ({ panelId }) => { const robotsPerAlliance = 3 diff --git a/fission/src/panels/configuring/ConfigureGamepiecePickupPanel.tsx b/fission/src/ui/panels/configuring/ConfigureGamepiecePickupPanel.tsx similarity index 85% rename from fission/src/panels/configuring/ConfigureGamepiecePickupPanel.tsx rename to fission/src/ui/panels/configuring/ConfigureGamepiecePickupPanel.tsx index 371d59a92f..97345d453b 100644 --- a/fission/src/panels/configuring/ConfigureGamepiecePickupPanel.tsx +++ b/fission/src/ui/panels/configuring/ConfigureGamepiecePickupPanel.tsx @@ -1,8 +1,8 @@ import { useState } from "react" import { FaGear } from "react-icons/fa6" -import Panel, { PanelPropsImpl } from "../../components/Panel" -import SelectButton from "../../components/SelectButton" -import Slider from "../../components/Slider" +import Panel, { PanelPropsImpl } from "@/components/Panel" +import SelectButton from "@/components/SelectButton" +import Slider from "@/components/Slider" const ConfigureGamepiecePickupPanel: React.FC = ({ panelId, diff --git a/fission/src/panels/configuring/ConfigureShotTrajectoryPanel.tsx b/fission/src/ui/panels/configuring/ConfigureShotTrajectoryPanel.tsx similarity index 85% rename from fission/src/panels/configuring/ConfigureShotTrajectoryPanel.tsx rename to fission/src/ui/panels/configuring/ConfigureShotTrajectoryPanel.tsx index 8df2edf41a..2955bd35cc 100644 --- a/fission/src/panels/configuring/ConfigureShotTrajectoryPanel.tsx +++ b/fission/src/ui/panels/configuring/ConfigureShotTrajectoryPanel.tsx @@ -1,8 +1,8 @@ import { useState } from "react" import { FaGear } from "react-icons/fa6" -import Panel, { PanelPropsImpl } from "../../components/Panel" -import SelectButton from "../../components/SelectButton" -import Slider from "../../components/Slider" +import Panel, { PanelPropsImpl } from "@/components/Panel" +import SelectButton from "@/components/SelectButton" +import Slider from "@/components/Slider" const ConfigureShotTrajectoryPanel: React.FC = ({ panelId, diff --git a/fission/src/panels/configuring/scoring/ScoringZonesPanel.tsx b/fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx similarity index 100% rename from fission/src/panels/configuring/scoring/ScoringZonesPanel.tsx rename to fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx diff --git a/fission/src/panels/configuring/scoring/ZoneConfigPanel.tsx b/fission/src/ui/panels/configuring/scoring/ZoneConfigPanel.tsx similarity index 100% rename from fission/src/panels/configuring/scoring/ZoneConfigPanel.tsx rename to fission/src/ui/panels/configuring/scoring/ZoneConfigPanel.tsx diff --git a/fission/src/panels/information/ScoreboardPanel.tsx b/fission/src/ui/panels/information/ScoreboardPanel.tsx similarity index 92% rename from fission/src/panels/information/ScoreboardPanel.tsx rename to fission/src/ui/panels/information/ScoreboardPanel.tsx index 7aa21b3481..21559eb2ca 100644 --- a/fission/src/panels/information/ScoreboardPanel.tsx +++ b/fission/src/ui/panels/information/ScoreboardPanel.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useState } from "react" -import Label, { LabelSize } from "../../components/Label" -import Panel, { PanelPropsImpl } from "../../components/Panel" -import Stack, { StackDirection } from "../../components/Stack" +import Label, { LabelSize } from "@/components/Label" +import Panel, { PanelPropsImpl } from "@/components/Panel" +import Stack, { StackDirection } from "@/components/Stack" const ScoreboardPanel: React.FC = ({ panelId }) => { const [redScore] = useState(0) diff --git a/fission/src/panels/simulation/DriverStationPanel.tsx b/fission/src/ui/panels/simulation/DriverStationPanel.tsx similarity index 77% rename from fission/src/panels/simulation/DriverStationPanel.tsx rename to fission/src/ui/panels/simulation/DriverStationPanel.tsx index ea80a56e32..1d239c9e6e 100644 --- a/fission/src/panels/simulation/DriverStationPanel.tsx +++ b/fission/src/ui/panels/simulation/DriverStationPanel.tsx @@ -1,9 +1,9 @@ import React, { useState } from "react" -import Panel, { PanelPropsImpl } from "../../components/Panel" +import Panel, { PanelPropsImpl } from "@/components/Panel" import { GiSteeringWheel } from "react-icons/gi" -import Stack, { StackDirection } from "../../components/Stack" -import Button from "../../components/Button" -import Dropdown from "../../components/Dropdown" +import Stack, { StackDirection } from "@/components/Stack" +import Button from "@/components/Button" +import Dropdown from "@/components/Dropdown" const DriverStationPanel: React.FC = ({ panelId }) => { const [enabled, setEnabled] = useState(false) diff --git a/fission/tsconfig.json b/fission/tsconfig.json index cd343babff..9bb75bfacc 100644 --- a/fission/tsconfig.json +++ b/fission/tsconfig.json @@ -1,31 +1,51 @@ { - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - "baseUrl": ".", - "paths": { - "@/*": [ - "./src/*" - ] + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": [ + "ES2020", + "DOM", + "DOM.Iterable" + ], + "module": "ESNext", + "skipLibCheck": true, + "baseUrl": ".", + "paths": { + "@/*": [ + "src/*" + ], + "@/components/*": [ + "src/ui/components/*" + ], + "@/modals/*": [ + "src/ui/modals/*" + ], + "@/panels/*": [ + "src/ui/panels/*" + ], + "@/systems/*": [ + "src/systems/*" + ] + }, + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true }, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": [ + "src" + ], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] } diff --git a/fission/vite.config.ts b/fission/vite.config.ts index 478da1046d..9767173567 100644 --- a/fission/vite.config.ts +++ b/fission/vite.config.ts @@ -8,38 +8,41 @@ const dockerServerPort = 3003 // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), /* viteSingleFile() */], - resolve: { - alias: [ - { find: '@', replacement: path.resolve(__dirname, 'src') } - ] - }, - test: { - globals: true, - environment: 'jsdom' - }, - server: { - // this ensures that the browser opens upon server start - open: true, - // this sets a default port to 3000 - port: serverPort, - cors: false, - proxy: { - '/api/mira': { - target: `http://localhost:${serverPort}${basePath}`, - changeOrigin: true, - secure: false, - rewrite: (path) => path.replace(/^\/api\/mira/, '/Downloadables/Mira') - }, - '/api/auth': { - target: `http://localhost:${dockerServerPort}/`, - changeOrigin: true, - secure: false - } + plugins: [react(), /* viteSingleFile() */], + resolve: { + alias: [ + { find: '@/components', replacement: path.resolve(__dirname, 'src', 'ui', 'components') }, + { find: '@/modals', replacement: path.resolve(__dirname, 'src', 'ui', 'modals') }, + { find: '@/panels', replacement: path.resolve(__dirname, 'src', 'ui', 'panels') }, + { find: '@', replacement: path.resolve(__dirname, 'src') } + ] }, - }, - build: { - target: 'esnext', - }, - base: basePath + test: { + globals: true, + environment: 'jsdom' + }, + server: { + // this ensures that the browser opens upon server start + open: true, + // this sets a default port to 3000 + port: serverPort, + cors: false, + proxy: { + '/api/mira': { + target: `http://localhost:${serverPort}${basePath}`, + changeOrigin: true, + secure: false, + rewrite: (path) => path.replace(/^\/api\/mira/, '/Downloadables/Mira') + }, + '/api/auth': { + target: `http://localhost:${dockerServerPort}/`, + changeOrigin: true, + secure: false + } + }, + }, + build: { + target: 'esnext', + }, + base: basePath }) From fd224803e467c628fe6fa6464b2d9140a4c6ed4e Mon Sep 17 00:00:00 2001 From: PepperLola Date: Tue, 18 Jun 2024 16:31:51 -0700 Subject: [PATCH 2/2] moved ui element context files to ui directory --- fission/src/Synthesis.tsx | 10 +++++----- fission/src/main.tsx | 2 +- fission/src/{ => ui}/ModalContext.tsx | 0 fission/src/{ => ui}/PanelContext.tsx | 0 fission/src/{ => ui}/ThemeContext.tsx | 2 +- fission/src/{ => ui}/ToastContext.tsx | 0 fission/src/{ => ui}/TooltipContext.tsx | 0 fission/src/ui/components/MainHUD.tsx | 6 +++--- fission/src/ui/components/Modal.tsx | 2 +- fission/src/ui/components/Panel.tsx | 2 +- fission/src/ui/components/Toast.tsx | 2 +- fission/src/ui/modals/ViewModal.tsx | 2 +- fission/src/ui/modals/configuring/DrivetrainModal.tsx | 2 +- fission/src/ui/modals/configuring/RoboRIOModal.tsx | 2 +- fission/src/ui/modals/configuring/SettingsModal.tsx | 2 +- .../configuring/rio-config/RCConfigEncoderModal.tsx | 2 +- .../configuring/rio-config/RCConfigPwmGroupModal.tsx | 2 +- .../configuring/rio-config/RCCreateDeviceModal.tsx | 2 +- .../configuring/theme-editor/DeleteAllThemesModal.tsx | 4 ++-- .../configuring/theme-editor/DeleteThemeModal.tsx | 4 ++-- .../modals/configuring/theme-editor/NewThemeModal.tsx | 4 ++-- .../configuring/theme-editor/ThemeEditorModal.tsx | 4 ++-- fission/src/ui/modals/spawning/SpawningModals.tsx | 4 ++-- fission/src/ui/panels/RobotSwitchPanel.tsx | 2 +- fission/src/ui/panels/SpawnLocationPanel.tsx | 2 +- .../panels/configuring/scoring/ScoringZonesPanel.tsx | 2 +- 26 files changed, 33 insertions(+), 33 deletions(-) rename fission/src/{ => ui}/ModalContext.tsx (100%) rename fission/src/{ => ui}/PanelContext.tsx (100%) rename fission/src/{ => ui}/ThemeContext.tsx (99%) rename fission/src/{ => ui}/ToastContext.tsx (100%) rename fission/src/{ => ui}/TooltipContext.tsx (100%) diff --git a/fission/src/Synthesis.tsx b/fission/src/Synthesis.tsx index 9bef5a00ba..f3569c5598 100644 --- a/fission/src/Synthesis.tsx +++ b/fission/src/Synthesis.tsx @@ -6,17 +6,17 @@ import MirabufParser, { ParseErrorSeverity } from './mirabuf/MirabufParser.ts'; import MirabufInstance from './mirabuf/MirabufInstance.ts'; import { AnimatePresence, motion } from "framer-motion" import { ReactElement, useEffect } from "react" -import { ModalControlProvider, useModalManager } from "@/ModalContext" -import { PanelControlProvider, usePanelManager } from "@/PanelContext" -import { useTheme } from "@/ThemeContext" -import { ToastContainer, ToastProvider } from "@/ToastContext" +import { ModalControlProvider, useModalManager } from "@/ui/ModalContext" +import { PanelControlProvider, usePanelManager } from "@/ui/PanelContext" +import { useTheme } from "@/ui/ThemeContext" +import { ToastContainer, ToastProvider } from "@/ui/ToastContext" import { TOOLTIP_DURATION, TooltipControl, TooltipControlProvider, TooltipType, useTooltipManager, -} from "@/TooltipContext" +} from "@/ui/TooltipContext" import MainHUD from "@/components/MainHUD" import DownloadAssetsModal from "@/modals/DownloadAssetsModal" import ExitSynthesisModal from "@/modals/ExitSynthesisModal" diff --git a/fission/src/main.tsx b/fission/src/main.tsx index e6f566189f..e8fc2b831f 100644 --- a/fission/src/main.tsx +++ b/fission/src/main.tsx @@ -1,5 +1,5 @@ import ReactDOM from "react-dom/client" -import { Theme, ThemeProvider } from "./ThemeContext" +import { Theme, ThemeProvider } from "@/ui/ThemeContext" import Synthesis from "./Synthesis" import "./index.css" diff --git a/fission/src/ModalContext.tsx b/fission/src/ui/ModalContext.tsx similarity index 100% rename from fission/src/ModalContext.tsx rename to fission/src/ui/ModalContext.tsx diff --git a/fission/src/PanelContext.tsx b/fission/src/ui/PanelContext.tsx similarity index 100% rename from fission/src/PanelContext.tsx rename to fission/src/ui/PanelContext.tsx diff --git a/fission/src/ThemeContext.tsx b/fission/src/ui/ThemeContext.tsx similarity index 99% rename from fission/src/ThemeContext.tsx rename to fission/src/ui/ThemeContext.tsx index 49e2cea3c1..901b76ce19 100644 --- a/fission/src/ThemeContext.tsx +++ b/fission/src/ui/ThemeContext.tsx @@ -1,6 +1,6 @@ import React, { ReactNode, createContext, useContext, useState } from "react" import { RgbaColor } from "react-colorful" -import { addGlobalFunc } from "./util/dom" +import { addGlobalFunc } from "@/util/dom" export const defaultThemeName = "Default" export type ColorName = diff --git a/fission/src/ToastContext.tsx b/fission/src/ui/ToastContext.tsx similarity index 100% rename from fission/src/ToastContext.tsx rename to fission/src/ui/ToastContext.tsx diff --git a/fission/src/TooltipContext.tsx b/fission/src/ui/TooltipContext.tsx similarity index 100% rename from fission/src/TooltipContext.tsx rename to fission/src/ui/TooltipContext.tsx diff --git a/fission/src/ui/components/MainHUD.tsx b/fission/src/ui/components/MainHUD.tsx index 1e54d4a81a..baacd7dc84 100644 --- a/fission/src/ui/components/MainHUD.tsx +++ b/fission/src/ui/components/MainHUD.tsx @@ -6,11 +6,11 @@ import { GrFormClose } from "react-icons/gr" import { GiSteeringWheel } from "react-icons/gi" import { HiDownload } from "react-icons/hi" import { IoGameControllerOutline, IoPeople } from "react-icons/io5" -import { useModalControlContext } from "@/ModalContext" -import { usePanelControlContext } from "@/PanelContext" +import { useModalControlContext } from "@/ui/ModalContext" +import { usePanelControlContext } from "@/ui/PanelContext" import { motion } from "framer-motion" import logo from "@/assets/autodesk_logo.png" -import { ToastType, useToastContext } from "@/ToastContext" +import { ToastType, useToastContext } from "@/ui/ToastContext" import { Random } from "@/util/Random" import APS, { APS_USER_INFO_UPDATE_EVENT } from "@/aps/APS" import { UserIcon } from "./UserIcon" diff --git a/fission/src/ui/components/Modal.tsx b/fission/src/ui/components/Modal.tsx index 3a1ba847d9..72a76a46ce 100644 --- a/fission/src/ui/components/Modal.tsx +++ b/fission/src/ui/components/Modal.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" export type ModalPropsImpl = { modalId: string diff --git a/fission/src/ui/components/Panel.tsx b/fission/src/ui/components/Panel.tsx index 8d4c324c5e..6438bb8129 100644 --- a/fission/src/ui/components/Panel.tsx +++ b/fission/src/ui/components/Panel.tsx @@ -1,5 +1,5 @@ import React, { ReactNode } from "react" -import { usePanelControlContext } from "@/PanelContext" +import { usePanelControlContext } from "@/ui/PanelContext" export type PanelPropsImpl = { panelId: string diff --git a/fission/src/ui/components/Toast.tsx b/fission/src/ui/components/Toast.tsx index b84fa61637..7f6cee0612 100644 --- a/fission/src/ui/components/Toast.tsx +++ b/fission/src/ui/components/Toast.tsx @@ -1,5 +1,5 @@ import React, { ReactElement, useEffect } from "react" -import { ToastData, useToastContext } from "@/ToastContext" +import { ToastData, useToastContext } from "@/ui/ToastContext" import { GrFormClose } from "react-icons/gr" import { BsFillWrenchAdjustableCircleFill } from "react-icons/bs" import { AiFillWarning } from "react-icons/ai" diff --git a/fission/src/ui/modals/ViewModal.tsx b/fission/src/ui/modals/ViewModal.tsx index 67d0523395..ce3c0b015b 100644 --- a/fission/src/ui/modals/ViewModal.tsx +++ b/fission/src/ui/modals/ViewModal.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" import Dropdown from "@/components/Dropdown" import { FaMagnifyingGlass } from "react-icons/fa6" -import { TooltipControl, useTooltipControlContext } from "@/TooltipContext" +import { TooltipControl, useTooltipControlContext } from "@/ui/TooltipContext" type ViewType = "Orbit" | "Freecam" | "Overview" | "Driver Station" diff --git a/fission/src/ui/modals/configuring/DrivetrainModal.tsx b/fission/src/ui/modals/configuring/DrivetrainModal.tsx index b2ab19aecd..692eac2ffd 100644 --- a/fission/src/ui/modals/configuring/DrivetrainModal.tsx +++ b/fission/src/ui/modals/configuring/DrivetrainModal.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaCar } from "react-icons/fa6" import Dropdown from "@/components/Dropdown" -import { TooltipControl, useTooltipControlContext } from "@/TooltipContext" +import { TooltipControl, useTooltipControlContext } from "@/ui/TooltipContext" type DrivetrainType = "None" | "Tank" | "Arcade" | "Swerve" diff --git a/fission/src/ui/modals/configuring/RoboRIOModal.tsx b/fission/src/ui/modals/configuring/RoboRIOModal.tsx index 1d9896a378..22140051a3 100644 --- a/fission/src/ui/modals/configuring/RoboRIOModal.tsx +++ b/fission/src/ui/modals/configuring/RoboRIOModal.tsx @@ -1,7 +1,7 @@ import React from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" import LabeledButton, { LabelPlacement } from "@/components/LabeledButton" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { BsCodeSquare } from "react-icons/bs" const RoboRIOModal: React.FC = ({ modalId }) => { diff --git a/fission/src/ui/modals/configuring/SettingsModal.tsx b/fission/src/ui/modals/configuring/SettingsModal.tsx index 295308f5db..29cf3aacc7 100644 --- a/fission/src/ui/modals/configuring/SettingsModal.tsx +++ b/fission/src/ui/modals/configuring/SettingsModal.tsx @@ -1,5 +1,5 @@ import React from "react" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import Modal, { ModalPropsImpl } from "@/components/Modal" import { FaGear } from "react-icons/fa6" import Label, { LabelSize } from "@/components/Label" diff --git a/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx index 079371804c..a5b6c7d0f4 100644 --- a/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCConfigEncoderModal.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { FaPlus } from "react-icons/fa6" import Label, { LabelSize } from "@/components/Label" import Input from "@/components/Input" diff --git a/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx index f9e78b9de9..46dbbd7f3e 100644 --- a/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCConfigPwmGroupModal.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { FaPlus } from "react-icons/fa6" import ScrollView from "@/components/ScrollView" import Stack, { StackDirection } from "@/components/Stack" diff --git a/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx b/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx index 5f727dd6ad..8a1d4f71a5 100644 --- a/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx +++ b/fission/src/ui/modals/configuring/rio-config/RCCreateDeviceModal.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { FaPlus } from "react-icons/fa6" import Dropdown from "@/components/Dropdown" diff --git a/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx b/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx index c1a2dc678d..0fe082b267 100644 --- a/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/DeleteAllThemesModal.tsx @@ -1,8 +1,8 @@ import React from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import { useModalControlContext } from "@/ModalContext" -import { useTheme } from "@/ThemeContext" +import { useModalControlContext } from "@/ui/ModalContext" +import { useTheme } from "@/ui/ThemeContext" const DeleteAllThemesModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx b/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx index b255214baf..e42da19e63 100644 --- a/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/DeleteThemeModal.tsx @@ -1,8 +1,8 @@ import React from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" import { GrFormClose } from "react-icons/gr" -import { useModalControlContext } from "@/ModalContext" -import { useTheme } from "@/ThemeContext" +import { useModalControlContext } from "@/ui/ModalContext" +import { useTheme } from "@/ui/ThemeContext" const DeleteThemeModal: React.FC = ({ modalId }) => { const { currentTheme, deleteTheme } = useTheme() diff --git a/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx b/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx index 969ed446ce..427bb66c13 100644 --- a/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/NewThemeModal.tsx @@ -1,9 +1,9 @@ import React, { useState } from "react" import Modal, { ModalPropsImpl } from "@/components/Modal" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { FaPlus } from "react-icons/fa6" import Input from "@/components/Input" -import { useTheme } from "@/ThemeContext" +import { useTheme } from "@/ui/ThemeContext" const NewThemeModal: React.FC = ({ modalId }) => { const { openModal } = useModalControlContext() diff --git a/fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx b/fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx index 3c892ca160..df561e7590 100644 --- a/fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx +++ b/fission/src/ui/modals/configuring/theme-editor/ThemeEditorModal.tsx @@ -1,9 +1,9 @@ -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import { ColorName, Theme, useTheme -} from "@/ThemeContext" +} from "@/ui/ThemeContext" import Button from "@/components/Button" import Dropdown from "@/components/Dropdown" import Modal, { ModalPropsImpl } from "@/components/Modal" diff --git a/fission/src/ui/modals/spawning/SpawningModals.tsx b/fission/src/ui/modals/spawning/SpawningModals.tsx index 02164965eb..3e716adc69 100644 --- a/fission/src/ui/modals/spawning/SpawningModals.tsx +++ b/fission/src/ui/modals/spawning/SpawningModals.tsx @@ -3,11 +3,11 @@ import Modal, { ModalPropsImpl } from "../../components/Modal" import { FaPlus } from "react-icons/fa6" import Stack, { StackDirection } from "../../components/Stack" import Button, { ButtonSize } from "../../components/Button" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import Label, { LabelSize } from "@/components/Label" import { CreateMirabufFromUrl } from "@/mirabuf/MirabufSceneObject" import World from "@/systems/World" -import { useTooltipControlContext } from "@/TooltipContext" +import { useTooltipControlContext } from "@/ui/TooltipContext" interface MirabufEntry { displayName: string; diff --git a/fission/src/ui/panels/RobotSwitchPanel.tsx b/fission/src/ui/panels/RobotSwitchPanel.tsx index b3d5c52db5..e440053589 100644 --- a/fission/src/ui/panels/RobotSwitchPanel.tsx +++ b/fission/src/ui/panels/RobotSwitchPanel.tsx @@ -4,7 +4,7 @@ import Panel, { PanelPropsImpl } from "@/components/Panel" import { IoPeople } from "react-icons/io5" import Stack, { StackDirection } from "@/components/Stack" import Button from "@/components/Button" -import { useModalControlContext } from "@/ModalContext" +import { useModalControlContext } from "@/ui/ModalContext" import Checkbox from "@/components/Checkbox" const RobotSwitchPanel: React.FC = ({ panelId }) => { diff --git a/fission/src/ui/panels/SpawnLocationPanel.tsx b/fission/src/ui/panels/SpawnLocationPanel.tsx index c8ff585fb6..9e4a58f449 100644 --- a/fission/src/ui/panels/SpawnLocationPanel.tsx +++ b/fission/src/ui/panels/SpawnLocationPanel.tsx @@ -1,4 +1,4 @@ -import { useTooltipControlContext } from "@/TooltipContext" +import { useTooltipControlContext } from "@/ui/TooltipContext" import Button from "@/components/Button" import Panel, { PanelPropsImpl } from "@/components/Panel" diff --git a/fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx b/fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx index 9483629a97..c0aeaf7a76 100644 --- a/fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx +++ b/fission/src/ui/panels/configuring/scoring/ScoringZonesPanel.tsx @@ -1,5 +1,5 @@ import { useState } from "react" -import { usePanelControlContext } from "@/PanelContext" +import { usePanelControlContext } from "@/ui/PanelContext" import Button from "@/components/Button" import Label, { LabelSize } from "@/components/Label" import Panel, { PanelPropsImpl } from "@/components/Panel"