Skip to content

Add dev preview badge to disconnected switch#3132

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:dev_preview_switch
Aug 25, 2025
Merged

Add dev preview badge to disconnected switch#3132
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
rawagner:dev_preview_switch

Conversation

@rawagner
Copy link
Member

@rawagner rawagner commented Aug 25, 2025

Screenshot From 2025-08-25 10-30-02

Summary by CodeRabbit

  • New Features
    • Added a Developer Preview indicator in Cluster Details, shown next to “Install in disconnected environment” when the single-cluster feature is disabled.
  • Style
    • Updated Cluster Details layout: the disconnected install switch and Developer Preview indicator are now aligned side by side for clearer presentation.

@openshift-ci openshift-ci bot requested review from batzionb and celdrake August 25, 2025 08:31
@coderabbitai
Copy link

coderabbitai bot commented Aug 25, 2025

Walkthrough

The UI in ClusterDetailsForm.tsx now wraps InstallDisconnectedSwitch and a newly added DeveloperPreview component in a PatternFly Split layout when the single-cluster feature flag is disabled. Imports were updated to include Split, SplitItem, and DeveloperPreview. DeveloperPreview is newly exported from the common module.

Changes

Cohort / File(s) Summary
Cluster wizard UI layout
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx
Wrapped InstallDisconnectedSwitch and DeveloperPreview in a PatternFly Split when !isSingleClusterFeatureEnabled; added imports for Split, SplitItem, and DeveloperPreview; no logic changes to form submission/validation.
Common exports
libs/ui-lib/lib/common
Added export for DeveloperPreview component, enabling its import in ClusterDetailsForm.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant ClusterDetailsForm
  participant InstallDisconnectedSwitch
  participant DeveloperPreview

  User->>ClusterDetailsForm: Open form
  alt single-cluster feature disabled
    ClusterDetailsForm->>ClusterDetailsForm: Render PatternFly Split
    ClusterDetailsForm->>InstallDisconnectedSwitch: Render switch (left)
    ClusterDetailsForm->>DeveloperPreview: Render badge/info (right)
  else enabled
    ClusterDetailsForm->>InstallDisconnectedSwitch: Render switch only
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm, size/M

Suggested reviewers

  • ElayAharoni
  • jgyselov
  • celdrake

Poem

In a split so neat, two widgets meet,
A switch to flip, a preview sweet.
When flags say “no,” they stand in line,
Side by side, they look just fine.
— A happy rabbit taps its feet. (_/)<('.')>✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 25, 2025
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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (1)

170-177: Add Split spacing so the switch and badge aren’t flush.

PatternFly Split renders items adjacent by default. Adding hasGutter improves readability and matches PF guidelines. Optionally, insert a filled spacer to push the badge to the far right if desired.

Minimal spacing improvement:

-                  <Split>
+                  <Split hasGutter>
                     <SplitItem>
                       <InstallDisconnectedSwitch isDisabled={!!cluster} />
                     </SplitItem>
                     <SplitItem>
                       <DeveloperPreview />
                     </SplitItem>
-                  </Split>
+                  </Split>

Optional right-align the badge (if that’s the intended layout):

-                  <Split hasGutter>
-                    <SplitItem>
+                  <Split hasGutter>
+                    <SplitItem>
                       <InstallDisconnectedSwitch isDisabled={!!cluster} />
                     </SplitItem>
+                    <SplitItem isFilled />
                     <SplitItem>
                       <DeveloperPreview />
                     </SplitItem>
                   </Split>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e439417 and 43a8e0b.

📒 Files selected for processing (1)
  • libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (1)
libs/ui-lib/lib/common/components/ui/DeveloperPreview.tsx (1)
  • DeveloperPreview (8-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: translation-files
  • GitHub Check: circular-deps
  • GitHub Check: tests
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: format
🔇 Additional comments (2)
libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx (2)

4-4: LGTM: PatternFly Split/SplitItem imports look correct.

The additional imports from '@patternfly/react-core' match the usage below. No issues here.


15-15: DeveloperPreview barrel export verified – no action needed

DeveloperPreview is defined in libs/ui-lib/lib/common/components/ui/DeveloperPreview.tsx and re-exported in the common barrel (libs/ui-lib/lib/common/index.ts), so importing it from ../../../common will work as expected.

@rawagner
Copy link
Member Author

/cherry-pick releases/v2.44

@openshift-cherrypick-robot
Copy link
Contributor

@rawagner: once the present PR merges, I will cherry-pick it on top of releases/v2.44 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick releases/v2.44

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.

Copy link
Contributor

@celdrake celdrake left a comment

Choose a reason for hiding this comment

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

Looks good.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2025
@openshift-ci
Copy link

openshift-ci bot commented Aug 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: celdrake, rawagner

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit 3e1f97f into openshift-assisted:master Aug 25, 2025
11 checks passed
@openshift-cherrypick-robot
Copy link
Contributor

@rawagner: new pull request created: #3135

Details

In response to this:

/cherry-pick releases/v2.44

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants