Skip to content

refactor(site): Add bottom spacing to the dashboard layout #6084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions site/src/components/Dashboard/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { updateCheckMachine } from "xServices/updateCheck/updateCheckXService"
import { usePermissions } from "hooks/usePermissions"
import { UpdateCheckResponse } from "api/typesGenerated"
import { DashboardProvider } from "./DashboardProvider"
import { dashboardContentBottomPadding } from "theme/constants"

export const DashboardLayout: FC = () => {
const styles = useStyles()
Expand Down Expand Up @@ -71,5 +72,6 @@ const useStyles = makeStyles((theme) => ({
},
siteContent: {
flex: 1,
paddingBottom: dashboardContentBottomPadding, // Add bottom space since we don't use a footer
},
}))
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AvatarData } from "components/AvatarData/AvatarData"
import { TemplateResourcesTable } from "components/TemplateResourcesTable/TemplateResourcesTable"
import { WorkspaceBuildLogs } from "components/WorkspaceBuildLogs/WorkspaceBuildLogs"
import { FC, useCallback, useEffect, useRef, useState } from "react"
import { navHeight } from "theme/constants"
import { dashboardContentBottomPadding, navHeight } from "theme/constants"
import { TemplateVersionFiles } from "util/templateVersion"
import {
CreateFileDialog,
Expand Down Expand Up @@ -403,6 +403,7 @@ const useStyles = makeStyles<
flex: 1,
display: "flex",
flexDirection: "column",
marginBottom: -dashboardContentBottomPadding, // Remove dashboard bottom padding
},
topbar: {
padding: theme.spacing(2),
Expand Down
1 change: 1 addition & 0 deletions site/src/theme/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export const containerWidth = 1380
export const containerWidthMedium = 1080
export const sidePadding = 24
export const CardPadding = 20
export const dashboardContentBottomPadding = 8 * 6