Skip to content

add fix for hide category toggle#2662

Open
Philip-Carneiro wants to merge 3 commits intokubeflow:mainfrom
Philip-Carneiro:fix-hide-category-toggle
Open

add fix for hide category toggle#2662
Philip-Carneiro wants to merge 3 commits intokubeflow:mainfrom
Philip-Carneiro:fix-hide-category-toggle

Conversation

@Philip-Carneiro
Copy link
Copy Markdown
Contributor

@Philip-Carneiro Philip-Carneiro commented Apr 28, 2026

Description

In Model performance view when only a single category is available:

  • Fix Sort position
  • Fix text and actions when no performance data is available

Before:

  • PF Mode:
    • Sort position
before-PF-sort-position - - No performance data available before-PF-no-perf-data
  • Non-PF Mode:
  • Sort position
before-sort-position -No performance data available before-no-perf-data

After:

  • PF Mode:
  • Sort position
Screenshot 2026-05-05 at 12 20 07 -No performance data available Screenshot 2026-05-05 at 11 34 16
  • Non-PF Mode:
  • Sort position
Screenshot 2026-05-05 at 11 24 58 -No performance data available Screenshot 2026-05-05 at 11 34 42

How Has This Been Tested?

This was manually tested, also added tests in cypress

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.
  • For first time contributors: Please reach out to the Reviewers to ensure all tests are being run, ensuring the label ok-to-test has been added to the PR.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

Signed-off-by: Philip Colares Carneiro <philip.colares@gmail.com>
@Philip-Carneiro Philip-Carneiro force-pushed the fix-hide-category-toggle branch from c7a817a to d909932 Compare May 5, 2026 09:50
@google-oss-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

Signed-off-by: Philip Colares Carneiro <philip.colares@gmail.com>
Signed-off-by: Philip Colares Carneiro <philip.colares@gmail.com>
@Philip-Carneiro Philip-Carneiro requested a review from ppadti May 5, 2026 13:07
<Title headingLevel="h3" size="lg">
{categoryTitle}
</Title>
{performanceViewEnabled && !hasMultipleSourceCategories(catalogSources) && (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one quick question - why we need !hasMultipleSourceCategories(catalogSources) check here because the outer condition to render this whole div cover theisSingleCategory?
feels like redundant check, no?

title="No performance data available in selected category"
title={
isSingleCategory
? 'No performance data available.'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need a period after this line to be consistent with the other title

Suggested change
? 'No performance data available.'
? 'No performance data available'

return orderedLabels;
};

export const hasMultipleSourceCategories = (catalogSources: CatalogSourceList | null): boolean => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't this util kind of similar to getActiveSourceLabels? Its just that return string[] rather than boolean. Can't we reuse that?

Comment on lines +490 to +497
initIntercepts({
sources: [mockCatalogSource({ labels: ['Provider one'] })],
hasValidatedModels: false,
});
setupFilteredModelsIntercept({ returnModelsForFilters: false });
modelCatalog.visit();

modelCatalog.togglePerformanceView();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These initial setup was repeated for the these 3 tests so can we have it in beforeEach()?

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