-
Notifications
You must be signed in to change notification settings - Fork 594
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
[WIP] Expose CreateProjectListPage
and NamespacedPage
components in internal SDK
#11823
Conversation
…d/packages/console-shared/src/components/projects
…/dynamic-plugin-sdk-internal
…ackage to preserve plugin dynamic imports there
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mturley The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
/retest |
@mturley: The following tests 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/test-infra repository. I understand the commands that are listed here. |
Putting this on hold for now, it seems this belongs in the SDK proper. |
@mturley: PR needs rebase. 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/test-infra repository. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Based on the usage here on the Add page and here on the Pipelines page, these two components allow a plugin to provide pages which require a namespace/project to be selected/created before reaching the page.
CreateProjectListPage
instead of the page when there is no namespace present in the URL, the plugin can let the user create or select a project and then automatically proceed to the namespaced page in the same way that the above pages do (with a custom description at the top) without having to reimplement this selection page.NamespacedPage
, the plugin can provide the project switcher bar at the top even on pages which don't have/k8s
in their URL (which is useful if a page doesn't strictly map to a k8s resource semantically). This is done above for both the/add/*
and/dev-pipelines/*
paths.This PR moves the above two components from
frontend/packages/dev-console/src/components
intofrontend/packages/console-shared/src/components
, moves their prop types tofrontend/packages/console-dynamic-plugin-sdk/src/api/internal-types.ts
and exports them fromfrontend/packages/console-dynamic-plugin-sdk/src/api/internal-api.ts
. This pattern is based on the last PR to expose something in this package (#11708).dev-console/src/components/projects
containedCreateProjectListPage
and its internalProjectListPage
, and also adetails
subdirectory containing theProjectDetailsPage
component. This PR moves the former two components to a new directory atconsole-shared/src/components/projects
, but leaves behind theProjectDetailsPage
in a new directory atdev-console/src/components/project-details
because it is imported dynamically in the dev-console plugin's routes, so it didn't seem right to move it out of that package.NamespacedPage
component wasn't in a subdirectory ofdev-console/src/components
, so it is now also at the top level ofconsole-shared/src/components
.index.ts
file was added atconsole-shared/src/components/projects
to match the pattern of other subdirectories there.@console/shared
now that they are exported there.