-
Notifications
You must be signed in to change notification settings - Fork 665
CONSOLE-4709: Remove kebab factory uses from devconsole and Topology plugin #15720
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
base: main
Are you sure you want to change the base?
Conversation
|
@vikram-raj: This pull request references CONSOLE-4709 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/cc @logonoff |
0172e17 to
1f67343
Compare
logonoff
left a comment
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
|
/label px-approved |
|
@yanpzhan will work on PR testing |
|
/retest |
46e698d to
25f2eeb
Compare
|
Checked on cluster launched against the pr. Regression tests passed, there is not functional issue. |
|
@yanpzhan: This PR has been marked as verified by 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 openshift-eng/jira-lifecycle-plugin repository. |
66e2eb2 to
b85ba34
Compare
|
/hold Revision 8c248c8 was retested 3 times: holding |
|
/unhold /retest |
8c248c8 to
26e45e7
Compare
|
resolved conflicts in i18n file console-app.json /verified by yanpzhan |
|
@vikram-raj: This PR has been marked as verified by 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 openshift-eng/jira-lifecycle-plugin repository. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
frontend/packages/dev-console/src/components/projects/details/ProjectDetailsPage.tsx (1)
19-29: ProjectDetails composition and LazyActionMenu wiring look good; consider minor typing/constant cleanupThe refactor to a dedicated
ProjectDetailscomponent, includingkind={referenceForModel(ProjectModel)}and theLazyActionMenu-basedcustomActionMenu, looks functionally sound and aligns with the new actions architecture. Likewise,handleNamespaceChangeusingPROJECT_DETAILS_ALL_NS_PAGE_URI+ALL_NAMESPACES_KEYis clear.Two small maintainability tweaks you might consider:
- Add an explicit prop type for
ProjectDetails(e.g., combiningMonitoringPagePropswith{ activeNamespace: string; pages: Page[] }) instead of leavingpropsas implicitany.- Reuse
PROJECT_DETAILS_ALL_NS_PAGE_URIin the breadcrumbs instead of duplicating'/project-details/all-namespaces', so the paths stay in sync if they ever change.Also applies to: 31-55, 99-101
frontend/public/components/modals/delete-namespace-modal.tsx (1)
30-72: Overlay-based DeleteNamespaceModal looks correct; consider simplifying the success navigationThe migration to an
OverlayComponentwithcloseOverlay, PFModal/ModalHeader/ModalBody/ModalFooter, and theuseDeleteNamespaceModalLauncherhook preserves the original delete + confirmation + namespace reset behavior while aligning with the newer overlay pattern. The promise handling and error display viausePromiseHandler/ErrorMessagealso look intact.One minor readability optimization: in the success path of
onSubmit, you navigate once viaformatNamespaceRoute(inside theif (resource.metadata.name === activeNamespace)block) and then again to/k8s/cluster/${kind.plural}aftercloseOverlay(). Since the second navigation effectively determines the final location, you could likely drop the firstnavigate(newPath)(while keeping thesetActiveNamespace/setLastNamespaceupdates) unless there is a specific intermediate routing requirement. That would make the flow easier to follow without changing observable behavior.Also applies to: 78-121, 124-130
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (12)
frontend/packages/console-app/console-extensions.json(1 hunks)frontend/packages/console-app/locales/en/console-app.json(1 hunks)frontend/packages/console-app/package.json(1 hunks)frontend/packages/console-app/src/actions/providers/project-provider.ts(1 hunks)frontend/packages/dev-console/locales/en/devconsole.json(1 hunks)frontend/packages/dev-console/src/components/projects/details/ProjectDetailsPage.tsx(3 hunks)frontend/packages/dev-console/src/components/projects/details/__tests__/ProjectDetailsPage.spec.tsx(1 hunks)frontend/packages/topology/src/actions/index.ts(0 hunks)frontend/packages/topology/src/actions/nodeActions.ts(0 hunks)frontend/public/components/modals/delete-namespace-modal.tsx(4 hunks)frontend/public/components/modals/index.ts(0 hunks)frontend/public/components/namespace.jsx(6 hunks)
💤 Files with no reviewable changes (3)
- frontend/packages/topology/src/actions/index.ts
- frontend/packages/topology/src/actions/nodeActions.ts
- frontend/public/components/modals/index.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- frontend/packages/console-app/console-extensions.json
- frontend/packages/dev-console/locales/en/devconsole.json
- frontend/packages/console-app/src/actions/providers/project-provider.ts
- frontend/packages/dev-console/src/components/projects/details/tests/ProjectDetailsPage.spec.tsx
- frontend/packages/console-app/locales/en/console-app.json
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
frontend/packages/dev-console/src/components/projects/details/ProjectDetailsPage.tsxfrontend/public/components/modals/delete-namespace-modal.tsxfrontend/public/components/namespace.jsxfrontend/packages/console-app/package.json
🔇 Additional comments (3)
frontend/packages/console-app/package.json (1)
55-55: NewprojectProviderexposed module wiring looks consistentThe new
projectProviderentry follows the existing provider naming and path conventions and should integrate cleanly with the plugin system.frontend/public/components/namespace.jsx (2)
75-75: Pull-secret modal import change is consistentImporting
configureNamespacePullSecretModalfrom./modalskeeps modal-related utilities centralized and matches how other modals are typically wired in this module.
105-106: LazyActionMenu integration for namespaces/projects is coherent and aligns with provider-based actionsThe new
LazyActionMenuusage for:
- namespace list rows (namespace context),
- project list rows (project context), and
- the
NamespacesDetailsPage/ProjectsDetailsPagecustomActionMenudropdowns,all consistently key the context by
referenceForModel(NamespaceModel|ProjectModel)and setkind={referenceForModel(...Model)}on the respectiveDetailsPages. This should play well with the new namespace/project action providers and eliminates the direct Kebab wiring.From a readability and maintainability standpoint, centralizing actions through
LazyActionMenuhere looks solid; no functional issues stand out.Also applies to: 330-331, 640-641, 1092-1100, 1113-1119
logonoff
left a comment
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: logonoff, vikram-raj 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 |
|
@vikram-raj: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
/hold Revision 26e45e7 was retested 3 times: holding |
|
/unhold /retest |
Remove the use of the kebab factory from the following pages of the devconsole plugin
Changes from the big PR #15520