-
Notifications
You must be signed in to change notification settings - Fork 698
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
User Management Screen improvements #4454
User Management Screen improvements #4454
Conversation
Signed-off-by: Kartikay <[email protected]>
@@ -190,6 +191,13 @@ export default function AccountSettingsUserManagementView( | |||
const { isOpen: isCreateUserModalOpen, open: openCreateUserModal, close: closeCreateUserModal } = useToggleOpen(); | |||
const { getString } = useStrings(); | |||
|
|||
const [currentPage, setCurrentPage] = useState(1); | |||
const itemsPerPage = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users can manually set limits too, you can do something like src/controllers/ExperimentDashboardV2/ExperimentDashboardV2.tsx
what done here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I have my minors this week, would continue from next week. Apologies for delay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure no problems @kartikaysaxena, all the best for your exams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added options for the user to select the number of itemsPerPage. Should I add more options or change it into an input field or does it look fine? PTAL @hrishavjha
Screen.Recording.2024-03-06.at.7.06.21.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you pass pageSizeOptions: [...new Set([10 , 20, itemsPerPage])].sort()
prop to the pagination component it will render the dropdown. Rest changes looks good to me 🚀
Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]> Signed-off-by: Kartikay <[email protected]>
…kaysaxena/litmus into usermanagment_improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for contributing!
chaoscenter/web/src/views/AccountSettingsUserManagement/AccountSettingsUserManagement.tsx
Outdated
Show resolved
Hide resolved
chaoscenter/web/src/views/AccountSettingsUserManagement/AccountSettingsUserManagement.tsx
Outdated
Show resolved
Hide resolved
chaoscenter/web/src/views/AccountSettingsUserManagement/AccountSettingsUserManagement.tsx
Outdated
Show resolved
Hide resolved
chaoscenter/web/src/views/AccountSettingsUserManagement/AccountSettingsUserManagement.tsx
Outdated
Show resolved
Hide resolved
…tSettingsUserManagement.tsx Co-authored-by: Sahil <[email protected]> Signed-off-by: Kartikay <[email protected]>
…tSettingsUserManagement.tsx Co-authored-by: Sahil <[email protected]> Signed-off-by: Kartikay <[email protected]>
6014e14
to
bcd1063
Compare
…tSettingsUserManagement.tsx Co-authored-by: Sahil <[email protected]> Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]>
bcd1063
to
b18c29c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Proposed changes
Fixes #4450
Added pagination for user management screen.
Types of changes
What types of changes does your code introduce to Litmus? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Dependency
Special notes for your reviewer: