Skip to content

Conversation

andreaskienle
Copy link
Contributor

@andreaskienle andreaskienle commented Sep 26, 2025

This PR adds proper tab navigation, implemeting openmcp-project/backlog#281.

As discussed, I had to remove max-length because the subsection headers will always appear on the left. Let's see how this works out for us. Could still limit the width and align everything to the left if we want.

The diff looks big, but the real changes are pretty straightforward:

  • Moved the headings out of the components (providers, provider configs, …) and into the McpPage as <ObjectPageSubSections>.
  • Wrapped those components in panels with a generic table title “Resources (count)” to follow Fiori best practices.
  • Split the old FluxList into two: GitRepositories and Kustomisations, so they can live in separate subsections.
  • Kept broader refactoring to a minimum (especially with regard to the hint cards) so this stays focused and easier to review
2025-09-26_11-32-26.mp4

@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 09:06
@andreaskienle andreaskienle marked this pull request as draft September 26, 2025 09:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements tab-based navigation for the MCP (Managed Control Plane) page, transforming the previous single-page layout into a tabbed interface. The changes reorganize content into logical sections (Overview, Crossplane, Flux, Landscapers) and enhance navigation between components through interactive hint cards.

  • Restructures the McpPage to use ObjectPage with IconTabBar mode for tab navigation
  • Refactors Flux components by splitting FluxList into separate GitRepositories and Kustomizations components
  • Adds click handlers to hint cards for navigation between sections

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/types/types.ts Adds optional onClick handler to GenericHintProps
src/spaces/mcp/pages/McpPage.tsx Major restructuring to implement tab navigation with ObjectPageSubSections
src/spaces/mcp/pages/McpPage.module.css Updates styling for new section layout
src/index.css Removes obsolete crossplane-table-element CSS class
src/components/HintsCardsRow/HintsCardsRow.tsx Adds navigation callback prop and click handlers
src/components/HintsCardsRow/GenericHintCard/GenericHintCard.tsx Implements onClick functionality for navigation
src/components/ControlPlane/ProvidersConfig.tsx Wraps content in Panel with consistent toolbar styling
src/components/ControlPlane/Providers.tsx Wraps content in Panel with consistent toolbar styling
src/components/ControlPlane/ManagedResources.tsx Wraps content in Panel with consistent toolbar styling
src/components/ControlPlane/Kustomizations.tsx New component extracted from FluxList for Kustomizations table
src/components/ControlPlane/GitRepositories.tsx New component extracted from FluxList for Git repositories table
src/components/ControlPlane/FluxList.tsx Removed - functionality split into separate components
src/components/ControlPlane/ComponentList.tsx Wraps content in Panel with consistent toolbar styling
public/locales/en.json Updates translation keys for new section structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@andreaskienle andreaskienle marked this pull request as ready for review September 26, 2025 09:33
const hintState = config.calculateSegments(allItems, isLoading || false, error, enabled, t);

// Handle click navigation if scroll target is provided
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

can we delete this commented section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted ✅

Copy link
Contributor

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP left a comment

Choose a reason for hiding this comment

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

Good job. Much better navigation with this change :)

@andreaskienle andreaskienle merged commit 33e5876 into main Oct 2, 2025
5 checks passed
@andreaskienle andreaskienle deleted the ft/tab-navigation branch October 2, 2025 11:20
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