Skip to content

refactor: Remove workspace schedule banner #4932

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 1 commit into from
Nov 8, 2022
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
6 changes: 2 additions & 4 deletions site/src/components/Workspace/Workspace.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const Template: Story<WorkspaceProps> = (args) => <Workspace {...args} />

export const Running = Template.bind({})
Running.args = {
bannerProps: {
isLoading: false,
onExtend: action("extend"),
},
scheduleProps: {
onDeadlineMinus: () => {
// do nothing, this is just for storybook
Expand All @@ -36,6 +32,8 @@ Running.args = {
Mocks.MockTemplate,
)
},
maxDeadlineDecrease: 1000,
maxDeadlineIncrease: 1000,
},
workspace: Mocks.MockWorkspace,
handleStart: action("start"),
Expand Down
12 changes: 0 additions & 12 deletions site/src/components/Workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Resources } from "../Resources/Resources"
import { Stack } from "../Stack/Stack"
import { WorkspaceActions } from "../WorkspaceActions/WorkspaceActions"
import { WorkspaceDeletedBanner } from "../WorkspaceDeletedBanner/WorkspaceDeletedBanner"
import { WorkspaceScheduleBanner } from "../WorkspaceScheduleBanner/WorkspaceScheduleBanner"
import { WorkspaceScheduleButton } from "../WorkspaceScheduleButton/WorkspaceScheduleButton"
import { WorkspaceStats } from "../WorkspaceStats/WorkspaceStats"
import { AlertBanner } from "../AlertBanner/AlertBanner"
Expand All @@ -33,10 +32,6 @@ export enum WorkspaceErrors {
}

export interface WorkspaceProps {
bannerProps: {
isLoading?: boolean
onExtend: () => void
}
scheduleProps: {
onDeadlinePlus: (hours: number) => void
onDeadlineMinus: (hours: number) => void
Expand Down Expand Up @@ -66,7 +61,6 @@ export interface WorkspaceProps {
* Workspace is the top-level component for viewing an individual workspace
*/
export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
bannerProps,
scheduleProps,
handleStart,
handleStop,
Expand Down Expand Up @@ -188,12 +182,6 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
{cancellationError}
{workspaceRefreshWarning}

<WorkspaceScheduleBanner
isLoading={bannerProps.isLoading}
onExtend={bannerProps.onExtend}
workspace={workspace}
/>

<WorkspaceDeletedBanner
workspace={workspace}
handleClick={() => navigate(`/templates`)}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ export const WorkspaceReadyPage = ({
</Helmet>

<Workspace
bannerProps={{
isLoading: bannerState.hasTag("loading"),
onExtend: () => {
bannerSend({
type: "INCREASE_DEADLINE",
hours: 4,
})
},
}}
scheduleProps={{
onDeadlineMinus: (hours: number) => {
bannerSend({
Expand Down