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

feat: enable sorting and filtering for users table #1777

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CodyWMitchell
Copy link
Contributor

@CodyWMitchell CodyWMitchell commented Mar 7, 2025

Description

  • Allows for sorting based on username (Currently the only field supported by the API)
  • Allows for filtering based on username and email (Currently the only fields supported by the API)

RHCLOUD-35605


Screenshots

After:

image


Checklist ☑️

  • PR only fixes one issue or story
  • Change reviewed for extraneous code
  • UI best practices adhered to
  • Commits squashed and meaningfully named
  • All PR checks pass locally (build, lint, test, E2E)

  • (Optional) QE: Needs QE attention (OUIA changed, perceived impact to tests, no test coverage)
  • (Optional) QE: Has been mentioned
  • (Optional) UX: Needs UX attention (end user UX modified, missing designs)
  • (Optional) UX: Has been mentioned

@CodyWMitchell CodyWMitchell marked this pull request as ready for review March 7, 2025 16:04
@CodyWMitchell CodyWMitchell requested a review from a team as a code owner March 7, 2025 16:04
@@ -351,6 +423,21 @@ const UsersTable: React.FunctionComponent<UsersTableProps> = ({ onAddUserClick,
/>
}
pagination={React.cloneElement(paginationComponent, { isCompact: true })}
filters={
<DataViewFilters onChange={(_e, values) => onSetFilters(values)} values={filters}>
<DataViewTextFilter
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add some ouiaIds to DataViewFilters and DataviewTextFilter

@InsaneZein
Copy link
Contributor

Could you also add a simple cypress test for filtering and sorting?

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.

2 participants