From 292407a344be4c365199903066cf32030719c73d Mon Sep 17 00:00:00 2001 From: Lycoon Date: Sun, 22 Mar 2026 12:28:36 +0100 Subject: [PATCH 1/4] reorganized interface --- components/editor/DocumentEditorPanel.tsx | 2 +- components/navbar/ProjectNavbar.module.css | 54 +------- components/navbar/ProjectNavbar.tsx | 92 ++++--------- .../project/ProjectWorkspace.module.css | 3 +- .../project/SplitPanelContainer.module.css | 33 +++++ components/project/SplitPanelContainer.tsx | 124 +++++++++++++++++- src/context/ViewContext.tsx | 34 ++++- 7 files changed, 218 insertions(+), 124 deletions(-) diff --git a/components/editor/DocumentEditorPanel.tsx b/components/editor/DocumentEditorPanel.tsx index d5115cb..87b0dae 100644 --- a/components/editor/DocumentEditorPanel.tsx +++ b/components/editor/DocumentEditorPanel.tsx @@ -431,7 +431,7 @@ const DocumentEditorPanel = ({ onMouseDown={handleContainerMouseDown} onFocus={() => setFocusedEditorType(focusType)} > -
+
diff --git a/components/navbar/ProjectNavbar.module.css b/components/navbar/ProjectNavbar.module.css index d463c31..8c1e6bc 100644 --- a/components/navbar/ProjectNavbar.module.css +++ b/components/navbar/ProjectNavbar.module.css @@ -14,11 +14,16 @@ } .center { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); display: flex; flex-direction: row; align-items: center; gap: 8px; - height: 100%; + height: calc(100% - 50px); + pointer-events: auto; } .navbar_island { @@ -50,7 +55,6 @@ gap: 24px; height: 100%; - width: var(--navbar-sidebar-width); } .navBtns { @@ -61,52 +65,6 @@ height: 100%; } -/* Segmented panel switcher */ -.panel_switcher { - display: flex; - flex-direction: row; - align-items: center; - gap: 2px; - padding: 3px; - border-radius: 64px; - background-color: var(--secondary); - height: 100%; -} - -.panel_btn { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - gap: 6px; - padding: 0 14px; - height: 100%; - border-radius: 64px; - white-space: nowrap; - - font-size: 0.75rem; - font-weight: 500; - text-transform: uppercase; - letter-spacing: 0.04em; - - color: var(--secondary-text); - cursor: pointer; - user-select: none; - transition: - color 0.2s ease, - background-color 0.2s ease; -} - -.panel_btn:hover { - color: var(--primary-text); - background-color: var(--primary); -} - -.panel_btn_active { - color: var(--primary-text); - background-color: var(--primary); -} - .back_btn { display: flex; flex-direction: row; diff --git a/components/navbar/ProjectNavbar.tsx b/components/navbar/ProjectNavbar.tsx index 0b07048..ed91107 100644 --- a/components/navbar/ProjectNavbar.tsx +++ b/components/navbar/ProjectNavbar.tsx @@ -17,9 +17,6 @@ import { BarChart2, CircleArrowLeft, CircleCheckBig, - Clapperboard, - FileText, - LayoutDashboard, PanelRight, PanelRightClose, Settings, @@ -32,7 +29,6 @@ import navbar from "./ProjectNavbar.module.css"; import navBtn from "@components/utils/NavbarIconButton.module.css"; import ScreenplayFormatDropdown from "./ScreenplayFormatDropdown"; import ScreenplaySearch from "./ScreenplaySearch"; -import ViewOptionsDropdown from "./ViewOptionsDropdown"; const StatusIndicator = () => { const { connectionStatus } = useContext(ProjectContext); @@ -125,15 +121,6 @@ const ProjectNavbar = () => { [], ); - const handlePanelClick = (panel: PanelType) => { - if (viewContext.isSplit) { - viewContext.setFocusedPanel(panel); - } else { - if (viewContext.primaryPanel === panel) return; - viewContext.setPrimaryPanel(panel); - } - }; - const handleSplitToggle = () => { if (viewContext.isSplit) { viewContext.setSecondaryPanel(null); @@ -148,13 +135,6 @@ const ProjectNavbar = () => { } }; - const getPanelBtnStyle = (panel: PanelType) => { - const isActive = viewContext.isSplit - ? viewContext.focusedPanel === panel - : viewContext.primaryPanel === panel; - return `${navbar.panel_btn} ${isActive ? navbar.panel_btn_active : ""}`; - }; - // Load project title - from membership or local storage useEffect(() => { if (membership && !isLocalEdit.current) { @@ -190,7 +170,7 @@ const ProjectNavbar = () => { return (