8000 feat: add "on this page" to empty table message when you're past page 1 by presleyp · Pull Request #4886 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add "on this page" to empty table message when you're past page 1 #4886

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 9 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
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
Fix the right story
  • Loading branch information
presleyp committed Nov 8, 2022
commit 3abc30e8e33dfc85c0f38b0c16e13374dab7f473
15 changes: 10 additions & 5 deletions site/src/components/UsersTable/UsersTable.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentMeta, Story } from "@storybook/react"
import {
MockSiteRoles,
MockAssignableSiteRoles,
MockUser,
MockUser2,
} from "../../testHelpers/renderHelpers"
Expand All @@ -9,34 +9,39 @@ import { UsersTable, UsersTableProps } from "./UsersTable"
export default {
title: "components/UsersTable",
component: UsersTable,
argTypes: {
isNonInitialPage: {
defaultValue: false,
},
},
} as ComponentMeta<typeof UsersTable>

const Template: Story<UsersTableProps> = (args) => <UsersTable {...args} />

export const Example = Template.bind({})
Example.args = {
users: [MockUser, MockUser2],
roles: MockSiteRoles,
roles: MockAssignableSiteRoles,
canEditUsers: false,
}

export const Editable = Template.bind({})
Editable.args = {
users: [MockUser, MockUser2],
roles: MockSiteRoles,
roles: MockAssignableSiteRoles,
canEditUsers: true,
}

export const Empty = Template.bind({})
Empty.args = {
users: [],
roles: MockSiteRoles,
roles: MockAssignableSiteRoles,
}

export const Loading = Template.bind({})
Loading.args = {
users: [],
roles: MockSiteRoles,
roles: MockAssignableSiteRoles,
isLoading: true,
}
Loading.parameters = {
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/UsersPage/UsersPageView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const Member = Template.bind({})
Member.args = { canEditUsers: false }

export const Empty = Template.bind({})
Empty.args = { users: [], isNonInitialPage: false }
Empty.args = { users: [] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not having isNonInitialPage here is causing Cond to error with A non-final Cond in a ChooseOne does not have a condition prop..


export const EmptyPage = Template.bind({})
EmptyPage.args = { users: [], isNonInitialPage: true }
Expand Down
0