Skip to content

Commit 2af698c

Browse files
refactor: Remove workspace schedule banner (#4932)
1 parent da05bbb commit 2af698c

File tree

6 files changed

+2
-244
lines changed

6 files changed

+2
-244
lines changed

site/src/components/Workspace/Workspace.stories.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ const Template: Story<WorkspaceProps> = (args) => <Workspace {...args} />
1515

1616
export const Running = Template.bind({})
1717
Running.args = {
18-
bannerProps: {
19-
isLoading: false,
20-
onExtend: action("extend"),
21-
},
2218
scheduleProps: {
2319
onDeadlineMinus: () => {
2420
// do nothing, this is just for storybook
@@ -36,6 +32,8 @@ Running.args = {
3632
Mocks.MockTemplate,
3733
)
3834
},
35+
maxDeadlineDecrease: 1000,
36+
maxDeadlineIncrease: 1000,
3937
},
4038
workspace: Mocks.MockWorkspace,
4139
handleStart: action("start"),

site/src/components/Workspace/Workspace.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { Resources } from "../Resources/Resources"
1414
import { Stack } from "../Stack/Stack"
1515
import { WorkspaceActions } from "../WorkspaceActions/WorkspaceActions"
1616
import { WorkspaceDeletedBanner } from "../WorkspaceDeletedBanner/WorkspaceDeletedBanner"
17-
import { WorkspaceScheduleBanner } from "../WorkspaceScheduleBanner/WorkspaceScheduleBanner"
1817
import { WorkspaceScheduleButton } from "../WorkspaceScheduleButton/WorkspaceScheduleButton"
1918
import { WorkspaceStats } from "../WorkspaceStats/WorkspaceStats"
2019
import { AlertBanner } from "../AlertBanner/AlertBanner"
@@ -33,10 +32,6 @@ export enum WorkspaceErrors {
3332
}
3433

3534
export interface WorkspaceProps {
36-
bannerProps: {
37-
isLoading?: boolean
38-
onExtend: () => void
39-
}
4035
scheduleProps: {
4136
onDeadlinePlus: (hours: number) => void
4237
onDeadlineMinus: (hours: number) => void
@@ -66,7 +61,6 @@ export interface WorkspaceProps {
6661
* Workspace is the top-level component for viewing an individual workspace
6762
*/
6863
export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
69-
bannerProps,
7064
scheduleProps,
7165
handleStart,
7266
handleStop,
@@ -188,12 +182,6 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
188182
{cancellationError}
189183
{workspaceRefreshWarning}
190184

191-
<WorkspaceScheduleBanner
192-
isLoading={bannerProps.isLoading}
193-
onExtend={bannerProps.onExtend}
194-
workspace={workspace}
195-
/>
196-
197185
<WorkspaceDeletedBanner
198186
workspace={workspace}
199187
handleClick={() => navigate(`/templates`)}

site/src/components/WorkspaceScheduleBanner/WorkspaceScheduleBanner.stories.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

site/src/components/WorkspaceScheduleBanner/WorkspaceScheduleBanner.test.tsx

Lines changed: 0 additions & 116 deletions
This file was deleted.

site/src/components/WorkspaceScheduleBanner/WorkspaceScheduleBanner.tsx

Lines changed: 0 additions & 56 deletions
This file was deleted.

site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ export const WorkspaceReadyPage = ({
7878
</Helmet>
7979

8080
<Workspace
81-
bannerProps={{
82-
isLoading: bannerState.hasTag("loading"),
83-
onExtend: () => {
84-
bannerSend({
85-
type: "INCREASE_DEADLINE",
86-
hours: 4,
87-
})
88-
},
89-
}}
9081
scheduleProps={{
9182
onDeadlineMinus: (hours: number) => {
9283
bannerSend({

0 commit comments

Comments
 (0)