Skip to content

Commit

Permalink
refactor: Remove workspace schedule banner (#4932)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoQuaresma committed Nov 8, 2022
1 parent da05bbb commit 2af698c
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 244 deletions.
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

0 comments on commit 2af698c

Please sign in to comment.