Skip to content

Conversation

sg00dwin
Copy link
Member

@sg00dwin sg00dwin commented Oct 7, 2025

Summary

Re-enables the sort dropdown in the Software Catalog with three sorting options: Relevance (default), A-Z, and Z-A.

Problem

The sort dropdown was previously commented out because it only offered A-Z/Z-A sorting, which conflicted, at the time, with the newly implemented relevance-based sorting system. Users had no way to change the sort order, if desired.

Solution

Re-enabled the ConsoleSelect sort field that allows users to choose between:

  1. Relevance (default) - Keyword relevance scoring + Red Hat provider prioritization
  2. A-Z - Pure alphabetical ascending order
  3. Z-A - Pure alphabetical descending order

Changes:

  • Add RELEVANCE to CatalogSortOrder enum as default sort mode
  • Create sortCatalogItems() function to handle all 3 sort modes with search filtering
  • Update filterBySearchKeyword() to accept optional sortOrder parameter
  • Re-enable sort dropdown UI in CatalogToolbar with 3 options
  • Wire up sort state management in CatalogView with URL persistence
  • Add 13 unit tests for sortCatalogItems

Assisted-by: Cursor

Screen Recording

Add user-selectable sort order to Software Catalog with three modes:
- Relevance (default): Keyword relevance scoring + Red Hat prioritization
- A-Z: Pure alphabetical ascending
- Z-A: Pure alphabetical descending

Changes:
- Add RELEVANCE to CatalogSortOrder enum as default sort mode
- Create sortCatalogItems() function to handle all 3 sort modes with search filtering
- Update filterBySearchKeyword() to accept optional sortOrder parameter
- Re-enable sort dropdown UI in CatalogToolbar with 3 options
- Wire up sort state management in CatalogView with URL persistence
- Add 13 unit tests for sortCatalogItems
@openshift-ci openshift-ci bot added the component/shared Related to console-shared label Oct 7, 2025
Copy link
Contributor

openshift-ci bot commented Oct 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sg00dwin
Once this PR has been reviewed and has the lgtm label, please assign rawagner for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@sg00dwin sg00dwin changed the title Add sort select field with Relevance, A-Z, Z-A options CONSOLE-4761: Add sort select field with Relevance, A-Z, Z-A options Oct 7, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 7, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 7, 2025

@sg00dwin: This pull request references CONSOLE-4761 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

In response to this:

Summary

Re-enables the sort dropdown in the Software Catalog with three sorting options: Relevance (default), A-Z, and Z-A.

Problem

The sort dropdown was previously commented out because it only offered A-Z/Z-A sorting, which conflicted, at the time, with the newly implemented relevance-based sorting system. Users had no way to change the sort order, if desired.

Solution

Re-enabled the ConsoleSelect sort field that allows users to choose between:

  1. Relevance (default) - Keyword relevance scoring + Red Hat provider prioritization
  2. A-Z - Pure alphabetical ascending order
  3. Z-A - Pure alphabetical descending order

Changes:

  • Add RELEVANCE to CatalogSortOrder enum as default sort mode
  • Create sortCatalogItems() function to handle all 3 sort modes with search filtering
  • Update filterBySearchKeyword() to accept optional sortOrder parameter
  • Re-enable sort dropdown UI in CatalogToolbar with 3 options
  • Wire up sort state management in CatalogView with URL persistence
  • Add 13 unit tests for sortCatalogItems

Assisted-by: Cursor

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 openshift-eng/jira-lifecycle-plugin repository.

@sg00dwin
Copy link
Member Author

sg00dwin commented Oct 7, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 7, 2025

@sg00dwin: This pull request references CONSOLE-4761 which is a valid jira issue.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 7, 2025

@sg00dwin: This pull request references CONSOLE-4761 which is a valid jira issue.

In response to this:

Summary

Re-enables the sort dropdown in the Software Catalog with three sorting options: Relevance (default), A-Z, and Z-A.

Problem

The sort dropdown was previously commented out because it only offered A-Z/Z-A sorting, which conflicted, at the time, with the newly implemented relevance-based sorting system. Users had no way to change the sort order, if desired.

Solution

Re-enabled the ConsoleSelect sort field that allows users to choose between:

  1. Relevance (default) - Keyword relevance scoring + Red Hat provider prioritization
  2. A-Z - Pure alphabetical ascending order
  3. Z-A - Pure alphabetical descending order

Changes:

  • Add RELEVANCE to CatalogSortOrder enum as default sort mode
  • Create sortCatalogItems() function to handle all 3 sort modes with search filtering
  • Update filterBySearchKeyword() to accept optional sortOrder parameter
  • Re-enable sort dropdown UI in CatalogToolbar with 3 options
  • Wire up sort state management in CatalogView with URL persistence
  • Add 13 unit tests for sortCatalogItems

Assisted-by: Cursor

Screen Recording

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Oct 8, 2025

@sg00dwin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/frontend 78b68a4 link true /test frontend
ci/prow/okd-scos-e2e-aws-ovn 78b68a4 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-gcp-console 78b68a4 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/shared Related to console-shared jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants