Skip to content

feat: paginating Users page #4792

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 34 commits into from
Oct 28, 2022
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
32263f5
Extract PageButton
presleyp Oct 21, 2022
5837c28
Fix import
presleyp Oct 21, 2022
a1303b0
Extract utils
presleyp Oct 21, 2022
ea12615
Format
presleyp Oct 21, 2022
74666ee
Separate pagination - wip
presleyp Oct 21, 2022
40f65ca
Spawn pagination machine - buggy filter
presleyp Oct 25, 2022
eef229e
Make labels optional
presleyp Oct 25, 2022
36ba04d
Layout, fix send reset bug
presleyp Oct 25, 2022
d99f149
Format
presleyp Oct 25, 2022
e4247fe
Fix refresh data bug
presleyp Oct 25, 2022
52b17f2
Remove debugging line
presleyp Oct 25, 2022
c4098f6
Fix url updates
presleyp Oct 25, 2022
b7edc7a
Update Audit Page
presleyp Oct 25, 2022
35b0cd3
Simplify pagination widget
presleyp Oct 25, 2022
ba3783b
Fix workspaces story
presleyp Oct 25, 2022
e92cbbf
Fix Audit story
presleyp Oct 25, 2022
23fdc3c
Fix pagination story and pagebutton highlight
presleyp Oct 25, 2022
1ebab32
Fix pagination tests
presleyp Oct 25, 2022
3f7e0aa
Add to utils tests
presleyp Oct 25, 2022
609af06
Format
presleyp Oct 25, 2022
86cda48
Merge branch 'main' into refactor-pagination/presleyp
presleyp Oct 25, 2022
e005aaf
Add tests
presleyp Oct 26, 2022
5715d38
Start adding pagination - type error
presleyp Oct 26, 2022
9a878fa
Merge branch 'main' into paginate-users/presleyp
presleyp Oct 26, 2022
4271fd1
Tweak machine
presleyp Oct 26, 2022
9a0ce5d
Refactor paginated api calls
presleyp Oct 27, 2022
20d5672
Show pagination when count is undefined
presleyp Oct 27, 2022
b68b46a
fix stories
presleyp Oct 27, 2022
50c5825
Fix api helper
presleyp Oct 27, 2022
2e249a0
Add test
presleyp Oct 27, 2022
953428b
Format
presleyp Oct 27, 2022
9056c44
Make widget show all the time to avoid blink
presleyp Oct 28, 2022
8f4691b
Merge branch 'main' into paginate-users/presleyp
presleyp Oct 28, 2022
b8ca97b
Merge branch 'main' into paginate-users/presleyp
presleyp Oct 28, 2022
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 Audit story
  • Loading branch information
presleyp committed Oct 25, 2022
commit e92cbbfa61e3dd7ed1573c4eab39c21dbd33a84b
24 changes: 12 additions & 12 deletions site/src/pages/AuditPage/AuditPageView.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { ComponentMeta, Story } from "@storybook/react"
import { createPaginationRef } from "components/PaginationWidget/utils"
import { MockAuditLog, MockAuditLog2 } from "testHelpers/entities"
import { AuditPageView, AuditPageViewProps } from "./AuditPageView"

export default {
title: "pages/AuditPageView",
component: AuditPageView,
argTypes: {
auditLogs: {
defaultValue: [MockAuditLog, MockAuditLog2],
},
count: {
defaultValue: 1000,
},
paginationRef: {
defaultValue: createPaginationRef({ page: 1, limit: 25 })
}
}
} as ComponentMeta<typeof AuditPageView>

const Template: Story<AuditPageViewProps> = (args) => (
<AuditPageView {...args} />
)

export const AuditPage = Template.bind({})
AuditPage.args = {
auditLogs: [MockAuditLog, MockAuditLog2],
count: 1000,
page: 1,
limit: 25,
}

export const AuditPageSmallViewport = Template.bind({})
AuditPageSmallViewport.args = {
auditLogs: [MockAuditLog, MockAuditLog2],
count: 1000,
page: 1,
limit: 25,
}
AuditPageSmallViewport.parameters = {
chromatic: { viewports: [600] },
}