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

Bug 2317212: Fix Clients' list page filtering #1648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SanjalKatiyar
Copy link
Collaborator

Before:
Screenshot 2024-10-21 at 12 46 35 PM

After:
Screenshot 2024-10-21 at 12 51 00 PM

Copy link
Contributor

openshift-ci bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SanjalKatiyar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Oct 21, 2024

@SanjalKatiyar: This pull request references Bugzilla bug 2317212, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2317212: Fix Clients' list page filtering

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented Oct 21, 2024

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: PrasadDesala.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@SanjalKatiyar: This pull request references Bugzilla bug 2317212, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2317212: Fix Clients' list page filtering

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@@ -75,3 +76,15 @@ export const versionMismatchFilter = (
);
},
});

export const nameFilterOverride = (): RowFilter<StorageConsumerKind> => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const nameFilterOverride = (): RowFilter<StorageConsumerKind> => ({
export const storageConsumerNameFilter = (): RowFilter<StorageConsumerKind> => ({

// - passing to both "useListPageFilter" hook & "ListPageFilter" component
// "rowFiltersWithNameOverride":
// - needed for overriding the filtering (default) on the CR's "name" (need to read the name from the CR's status instead)
// - only passing to "useListPageFilter" hook & not "ListPageFilter" component
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not list page filter component?

Copy link
Collaborator Author

@SanjalKatiyar SanjalKatiyar Oct 21, 2024

Choose a reason for hiding this comment

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

We have a separate dropdown for "Name" filtering on the UI, already managed by ListPageFilter component by default. All we need to do is to override filter's definition in useListPageFilter hook.

ListPageFilter + rowFilters adds a different/new dropdown, passing rowFiltersWithNameOverride to ListPageFilter is adding extra empty item to that dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants