Skip to content
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

Merged

Conversation

kartikaysaxena
Copy link
Contributor

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 apply

  • [x ] New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

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.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Screenshot 2024-02-20 at 7 41 40 PM Screenshot 2024-02-20 at 7 41 47 PM

Signed-off-by: Kartikay <[email protected]>
@kartikaysaxena
Copy link
Contributor Author

cc @hrishavjha @Saranya-jena

@@ -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;
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

@hrishavjha hrishavjha Mar 7, 2024

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 🚀

Copy link
Member

@hrishavjha hrishavjha left a 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!

kartikaysaxena and others added 2 commits April 6, 2024 17:20
…tSettingsUserManagement.tsx

Co-authored-by: Sahil <[email protected]>
Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]>
Copy link
Member

@hrishavjha hrishavjha left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Saranya-jena Saranya-jena merged commit 77336cb into litmuschaos:master Apr 8, 2024
15 of 16 checks passed
@kartikaysaxena kartikaysaxena deleted the usermanagment_improvements branch April 8, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements in User Management screen
5 participants