Skip to content

feat: Improve empty states for workspaces and templates #1950

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 15 commits into from
Jun 1, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix workspace page view stories
  • Loading branch information
BrunoQuaresma committed Jun 1, 2022
commit 114f65ad30cdb91d439f43ed0143b5a3cf96bbc1
11 changes: 8 additions & 3 deletions site/src/pages/WorkspacesPage/WorkspacesPageView.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta, Story } from "@storybook/react"
import { ProvisionerJobStatus, Workspace } from "../../api/typesGenerated"
import { ProvisionerJobStatus, Workspace, WorkspaceTransition } from "../../api/typesGenerated"
import { MockWorkspace } from "../../testHelpers/entities"
import { WorkspacesPageView, WorkspacesPageViewProps } from "./WorkspacesPageView"

Expand All @@ -10,7 +10,10 @@ export default {

const Template: Story<WorkspacesPageViewProps> = (args) => <WorkspacesPageView {...args} />

const createWorkspaceWithStatus = (status: ProvisionerJobStatus, transition = "start"): Workspace => {
const createWorkspaceWithStatus = (
status: ProvisionerJobStatus,
transition: WorkspaceTransition = "start",
): Workspace => {
return {
...MockWorkspace,
latest_build: {
Expand Down Expand Up @@ -46,4 +49,6 @@ AllStates.args = {
}

export const Empty = Template.bind({})
Empty.args = {}
Empty.args = {
workspaces: [],
}