Skip to content

Commit a78d4cf

Browse files
committed
Remove bottom bar from workspace page
1 parent c334031 commit a78d4cf

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

site/src/AppRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ export const AppRouter: FC = () => {
370370

371371
{/* In order for the 404 page to work properly the routes that start with
372372
top level parameter must be fully qualified. */}
373-
<Route path="/:username/:workspace" element={<WorkspacePage />} />
374373
<Route
375374
path="/:username/:workspace/builds/:buildNumber"
376375
element={<WorkspaceBuildPage />}
@@ -413,6 +412,7 @@ export const AppRouter: FC = () => {
413412
</Route>
414413

415414
{/* Pages that don't have the dashboard layout */}
415+
<Route path="/:username/:workspace" element={<WorkspacePage />} />
416416
<Route
417417
path="/templates/:template/versions/:version/edit"
418418
element={<TemplateVersionEditorPage />}

site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import {
1414
import { WorkspaceDeletedBanner } from "./WorkspaceDeletedBanner";
1515
import { WorkspaceTopbar } from "./WorkspaceTopbar";
1616
import { HistorySidebar } from "./HistorySidebar";
17-
import { dashboardContentBottomPadding, navHeight } from "theme/constants";
18-
import { bannerHeight } from "components/Dashboard/DeploymentBanner/DeploymentBannerView";
1917
import HistoryOutlined from "@mui/icons-material/HistoryOutlined";
2018
import { useTheme } from "@mui/material/styles";
2119
import { SidebarIconButton } from "components/FullPageLayout/Sidebar";
@@ -119,8 +117,6 @@ export const Workspace: FC<WorkspaceProps> = ({
119117
"topbar topbar topbar" auto
120118
"leftbar sidebar content" 1fr / auto auto 1fr
121119
`,
122-
maxHeight: `calc(100vh - ${navHeight + bannerHeight}px)`,
123-
marginBottom: `-${dashboardContentBottomPadding}px`,
124120
}}
125121
>
126122
<WorkspaceTopbar

site/src/pages/WorkspacePage/WorkspacePage.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { WorkspacePermissions, workspaceChecks } from "./permissions";
1414
import { watchWorkspace } from "api/api";
1515
import { Workspace } from "api/typesGenerated";
1616
import { useEffectEvent } from "hooks/hookPolyfills";
17+
import { Navbar } from "components/Dashboard/Navbar/Navbar";
1718

1819
export const WorkspacePage: FC = () => {
1920
const queryClient = useQueryClient();
@@ -102,27 +103,26 @@ export const WorkspacePage: FC = () => {
102103
workspaceQuery.error ?? templateQuery.error ?? permissionsQuery.error;
103104
const isLoading = !workspace || !template || !permissions;
104105

105-
if (pageError) {
106-
return (
107-
<Margins>
108-
<ErrorAlert
109-
error={pageError}
110-
css={{ marginTop: 16, marginBottom: 16 }}
111-
/>
112-
</Margins>
113-
);
114-
}
115-
116-
if (isLoading) {
117-
return <Loader />;
118-
}
119-
120106
return (
121-
<WorkspaceReadyPage
122-
workspace={workspace}
123-
template={template}
124-
permissions={permissions}
125-
/>
107+
<div css={{ height: "100%" }}>
108+
<Navbar />
109+
{pageError ? (
110+
<Margins>
111+
<ErrorAlert
112+
error={pageError}
113+
css={{ marginTop: 16, marginBottom: 16 }}
114+
/>
115+
</Margins>
116+
) : isLoading ? (
117+
<Loader />
118+
) : (
119+
<WorkspaceReadyPage
120+
workspace={workspace}
121+
template={template}
122+
permissions={permissions}
123+
/>
124+
)}
125+
</div>
126126
);
127127
};
128128

0 commit comments

Comments
 (0)