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 1982153: Skip empty categories (id and label) in OperatorHub tab view #9479
Conversation
_.each(items, (item) => { | ||
_.each(item.categories, (category) => { | ||
if (!newCategories[category]) { | ||
if (!newCategories[category] && category) { |
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.
This is the only line we really need for this fix 🤣
@jerolimov Do you mind opening a Bugzilla bug so we can backport this fix? |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerolimov, spadgett 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 |
@jerolimov: All pull requests linked via external trackers have merged: Bugzilla bug 1982153 has been moved to the MODIFIED state. In response to this:
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/test-infra repository. |
/bugzilla refresh |
@jerolimov: Bugzilla bug 1982153 is in an unrecognized state (MODIFIED) and will not be moved to the MODIFIED state. In response to this:
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/test-infra repository. |
@spadgett I created a BZ ticket in management console (https://bugzilla.redhat.com/show_bug.cgi?id=1982153), and marked it as low-prio and low-severity because it doesn't break anything. Feel free to change. It happen since 4.6, but with this low prio, back to which version do you want a backport? I will add a cherrypick then whenever one version is merged. |
I think just backporting to 4.8 is reasonable. /cherry-pick release-4.8 |
@spadgett: new pull request created: #9509 In response to this:
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/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-6146
https://bugzilla.redhat.com/show_bug.cgi?id=1982153
Analysis / Root cause:
When running the cypress test
developer-catalog-details.feature
the test tries to install the OpenShift Serverless operator and fails because the OperatorHub page contains an accessibility issue.The vertical tab navigation contains a
VerticalTabsTab
entry (li > a
) (rendered in tile-view-page.jsx) which results in an anchor without accessibility infos:(This may depend on the fetched OperatorHub data but happen on fresh clusters started with the
cluster-bot
.)Solution Description:
The categories are calculated based on the OperatorHub items, some of them contains an empty category string (
{ ... categories: [""] ... }
). The new code just skips this empty category.Screen shots / Gifs for design review:
@openshift/team-devconsole-ux
Skipping the empty string category results in a slightly different (IMHO fixed) UI:
Before there was a space between "All items" and the categories. There is no "Other" category because the entries are shown in this "empty string category.
On 4.6 it was also possible to select this category. Since 4.7 this is not possible anymore. But the "Other" entry is still missing.
With this PR the spacing (it was the empty string category) is not shown anymore. The page shows an "Other" entry instead at the end:
Unit test coverage report:
Added one new unit test for the util function which creates the category object:
Test setup:
yarn test-cypress-devconsole
and selectdeveloper-catalog-details.feature
A11y check
Before:
After:
Cypress notes
This issue was noticed while debugging #9361. This fix focused on this cypress issue:
After fixing this the tests still has some issues which are already addressed in #9361.
Browser conformance: