Skip to content

platform gateway UI issue fix - runtime,policyhub button,docker,kubernetes logos#1285

Open
ashiduDissanayake wants to merge 1 commit intowso2:mainfrom
ashiduDissanayake:platform-gateway-runtime-ui-fix
Open

platform gateway UI issue fix - runtime,policyhub button,docker,kubernetes logos#1285
ashiduDissanayake wants to merge 1 commit intowso2:mainfrom
ashiduDissanayake:platform-gateway-runtime-ui-fix

Conversation

@ashiduDissanayake
Copy link
Contributor

@ashiduDissanayake ashiduDissanayake commented Mar 25, 2026

Summary by CodeRabbit

  • New Features

    • Added new interface for Universal gateway configuration with direct navigation to policies.
  • Style

    • Updated Quick Start guide tab icons with improved visual design.
    • Refreshed Policy Hub gateway header layout and button styling.
    • Enhanced policy section visualization with additional flow indicators.

…ding UI

- runtime tab content changed to redirection
- policy hub button changed to blue
- added an arrow
- address the issue of wso2/api-manager#4835
Copilot AI review requested due to automatic review settings March 25, 2026 09:48
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Walkthrough

The PR updates icon handling in a gateway quick start guide by importing SVG modules instead of hardcoded paths, adds conditional UI rendering for Universal gateway type in runtime configuration, adjusts Policy Hub header styling, and adds a reverse flow arrow to the policies expansion component.

Changes

Cohort / File(s) Summary
Gateway Quick Start Icons
portals/admin/.../GatewayEnvironments/UniversalGatewayQuickStartGuide.jsx
Added RocketLaunchIcon to "Quick Start" tab and switched Docker and Kubernetes tab icons from hardcoded image paths to imported SVG modules.
Universal Gateway Runtime Configuration
portals/publisher/.../Apis/Details/Configuration/RuntimeConfiguration.jsx
Added conditional early return for Universal gateway type that displays an informational message with "Go to Policies" button instead of the standard runtime configuration UI.
Policy Hub Header Styling
portals/publisher/.../Apis/Details/Policies/PolicyList.tsx
Updated Policy Hub header layout by changing container alignment from center to stretch and button style from outlined to contained, with height adjustment to alignSelf: 'stretch'.
Policies Flow Visualization
portals/publisher/.../Shared/PoliciesUI/PoliciesExpansion.tsx
Added FlowArrow rendering after PolicyDropzone with reversed arrow direction to enhance flow visualization.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Icons hop from hardcoded paths so plain,
To imported SVGs, crisp and bright!
Universal gateways find their way with grace,
Flow arrows dance in both directions' space—
A quick-start guide now rockets toward the light! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions several changes (runtime, policyhub button, docker, kubernetes logos) but the PR objectives emphasize three main items: runtime tab redirection, policy hub button color change, and arrow addition. The title references docker/kubernetes logos which are minor icon improvements, not core changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ashiduDissanayake ashiduDissanayake changed the title Update PolicyHub UI with button color change and redirection platform gateway UI issue fix - runtime,policyhub button,docker,kubernetes logos Mar 25, 2026
@sonarqubecloud
Copy link

Copy link

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

Updates the PolicyHub and Universal Gateway UI to better guide users toward managing runtime configuration via policies, while refreshing related visuals.

Changes:

  • Added a flow arrow in the shared Policies UI.
  • Updated the Policy Hub button styling (contained/blue) and layout to stretch with the adjacent control.
  • For Universal Gateway APIs, replaced Runtime Configuration content with a “Go to Policies” redirection card; refreshed Quick Start tab icons/assets.

Reviewed changes

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

File Description
portals/publisher/src/main/webapp/source/src/app/components/Shared/PoliciesUI/PoliciesExpansion.tsx Adds a FlowArrow to the shared policies expansion layout.
portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Policies/PolicyList.tsx Adjusts Policy Hub button variant and flex alignment/stretch behavior.
portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Configuration/RuntimeConfiguration.jsx Adds Universal Gateway redirect UI from Runtime Configuration to Policies.
portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/UniversalGatewayQuickStartGuide.jsx Adds an icon for “Quick Start” and switches Docker/K8s icons to imported SVG assets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +695 to +697
defaultMessage='For APIs deployed on the Universal Gateway, runtime configurations
such as authentication and security are applied via policies.
Head over to the Policies section to view and manage them.'
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The defaultMessage is a single-quoted string spanning multiple lines, which is invalid JavaScript/JSX and will fail to compile. Convert this to a single-line string, or use a template literal (backticks) / explicit concatenation / {'...'} with \\n as needed.

Suggested change
defaultMessage='For APIs deployed on the Universal Gateway, runtime configurations
such as authentication and security are applied via policies.
Head over to the Policies section to view and manage them.'
defaultMessage='For APIs deployed on the Universal Gateway, runtime configurations such as authentication and security are applied via policies. Head over to the Policies section to view and manage them.'

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +35
import DockerIcon from '../../../../../site/public/images/docker-icon.svg';
import KubernetesIcon from '../../../../../site/public/images/Kubernetes_logo.svg';
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

These imports reach outside the admin portal’s src tree into site/public, which tightly couples the build to repo layout and may break depending on the bundler’s allowed import roots/asset loader rules. Prefer placing these assets under the admin portal’s source assets (so they’re bundled reliably) or keep them as static URLs (as previously done) if they’re intended to be served from /site/public.

Suggested change
import DockerIcon from '../../../../../site/public/images/docker-icon.svg';
import KubernetesIcon from '../../../../../site/public/images/Kubernetes_logo.svg';
const DockerIcon = '/site/public/images/docker-icon.svg';
const KubernetesIcon = '/site/public/images/Kubernetes_logo.svg';

Copilot uses AI. Check for mistakes.
@@ -138,6 +138,7 @@ const PoliciesExpansionShared: FC<PoliciesExpansionSharedProps> = ({
}
isApiRevision={isApiRevision}
/>
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The arrow direction is intentionally inverted relative to arrowDirection, which is non-obvious and makes the prop easy to misuse later (especially if arrowDirection ever expands beyond 'left' | 'right'). Consider renaming the local value to reflect the inversion (e.g., oppositeArrowDirection) or adding a short inline comment clarifying why the direction is flipped.

Suggested change
/>
/>
{/* Second arrow intentionally points in the opposite direction to bracket the dropzone */}

Copilot uses AI. Check for mistakes.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Configuration/RuntimeConfiguration.jsx (1)

655-716: Short-circuit the Universal path before the old runtime initialization.

This branch renders a static CTA, but it still sits behind the generic loading gate and the earlier key-manager / endpoint setup effects. That means the Universal page can be delayed—or even show an unrelated key-manager error toast—before the user ever sees “Go to Policies”. Please treat api.gatewayType === 'Universal' as a true fast path and bypass those requests/loaders.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Configuration/RuntimeConfiguration.jsx`
around lines 655 - 716, The Universal gateway branch must be a true fast path:
in the RuntimeConfiguration component, short-circuit and render the
api.gatewayType === 'Universal' UI before any heavy loaders/toast-producing
logic runs by returning that JSX early (or by guarding side-effect logic), so
key-manager / endpoint setup effects and generic loading gates never execute for
Universal APIs. Concretely, move the api.gatewayType === 'Universal' check to
the top of the RuntimeConfiguration component body (or add an early return),
and/or add an early-return guard inside the relevant useEffect handlers (the
key-manager and endpoint initialization effects) so functions like the
key-manager/endpoint setup effects do nothing when api.gatewayType ===
'Universal' and no loaders/toasts are triggered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Configuration/RuntimeConfiguration.jsx`:
- Around line 655-716: The Universal gateway branch must be a true fast path: in
the RuntimeConfiguration component, short-circuit and render the api.gatewayType
=== 'Universal' UI before any heavy loaders/toast-producing logic runs by
returning that JSX early (or by guarding side-effect logic), so key-manager /
endpoint setup effects and generic loading gates never execute for Universal
APIs. Concretely, move the api.gatewayType === 'Universal' check to the top of
the RuntimeConfiguration component body (or add an early return), and/or add an
early-return guard inside the relevant useEffect handlers (the key-manager and
endpoint initialization effects) so functions like the key-manager/endpoint
setup effects do nothing when api.gatewayType === 'Universal' and no
loaders/toasts are triggered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05498bdf-d13d-4bf7-8fae-d393390ad0d4

📥 Commits

Reviewing files that changed from the base of the PR and between 283dec1 and f521840.

📒 Files selected for processing (4)
  • portals/admin/src/main/webapp/source/src/app/components/GatewayEnvironments/UniversalGatewayQuickStartGuide.jsx
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Configuration/RuntimeConfiguration.jsx
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Policies/PolicyList.tsx
  • portals/publisher/src/main/webapp/source/src/app/components/Shared/PoliciesUI/PoliciesExpansion.tsx

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.

3 participants