Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions dynamic-demo-plugin/console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,6 @@
"component": { "$codeRef": "dashboardCard.default" }
}
},
{
"type": "console.dashboards/overview/detail/item",
"properties": {
"component": { "$codeRef": "overviewDetailItem.default" }
}
},
{
"type": "console.dashboards/custom/overview/detail/item",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
"Launch overlay modal": "Launch overlay modal",
"Hello {{planet}}! I am Thor!": "Hello {{planet}}! I am Thor!",
"Hello {{planet}}! I am Loki!": "Hello {{planet}}! I am Loki!",
"Added title": "Added title",
"My value": "My value",
"Added title - error": "Added title - error",
"{{count}} Cron Job": "{{count}} Cron Job",
"{{count}} Cron Job_plural": "{{count}} Cron Jobs",
"Cron Jobs": "Cron Jobs",
Expand Down
1 change: 0 additions & 1 deletion dynamic-demo-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"listPage": "./components/ListPage.tsx",
"modalPage": "./components/Modals/ModalPage.tsx",
"navPage": "./components/Nav.tsx",
"overviewDetailItem": "./components/OverviewDetailItem.tsx",
"perspective": "./utils/perspective.ts",
"projectOverview": "./utils/project-overview.ts",
"projectOverviewInventory": "./components/ProjectOverview/Inventory.tsx",
Expand Down
4 changes: 0 additions & 4 deletions dynamic-demo-plugin/src/components/OverviewDetailItem.css

This file was deleted.

35 changes: 0 additions & 35 deletions dynamic-demo-plugin/src/components/OverviewDetailItem.tsx

This file was deleted.

16 changes: 10 additions & 6 deletions frontend/packages/console-app/console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,16 @@
}
},
{
"type": "console.page/resource/tab",
"type": "console.tab/horizontalNav",
"properties": {
"href": "volumesnapshots",
"model": {
"version": "v1",
"kind": "PersistentVolumeClaim"
},
"name": "%console-app~VolumeSnapshots%",
"page": {
"name": "%console-app~VolumeSnapshots%",
"href": "volumesnapshots"
},
"component": { "$codeRef": "volumeSnapshotPage.VolumeSnapshotPVCPage" }
}
},
Expand Down Expand Up @@ -2352,15 +2354,17 @@
}
},
{
"type": "console.page/resource/tab",
"type": "console.tab/horizontalNav",
"properties": {
"href": "plugin-manifest",
"model": {
"group": "console.openshift.io",
"version": "v1",
"kind": "ConsolePlugin"
},
"name": "%console-app~Plugin manifest%",
"page": {
"name": "%console-app~Plugin manifest%",
"href": "plugin-manifest"
},
"component": { "$codeRef": "ConsolePluginManifestPage.ConsolePluginManifestPage" }
}
},
Expand Down
10 changes: 7 additions & 3 deletions frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ table in [Console dynamic plugins README](./README.md).
## 4.22.0-prerelease.2 - TBD

- **Breaking**: Changed `AlertAction` extension to use `LaunchOverlay` instead of `LaunchModal`. The `action` callback parameter is now typed as `LaunchOverlay`, which does not support the optional `id` parameter that `LaunchModal` had. Plugins implementing `console.alert-action` extensions must update their action callbacks accordingly. ([CONSOLE-4447])
- **Breaking**: Removed `pluginID` from the result in `useResolvedExtensions` hook ([CONSOLE-3769], [#15904])
- **Breaking**: Removed support for `console.page/resource/tab` and `console.dashboards/overview/detail/item`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

these are long, complete sentences. periods on ends?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jseseCCS We try to follow the Common Changelog format.

Every change should use imperative mood, dot at the end is not required since a change should not span over multiple sentences.

extensions. Use `console.tab/horizontalNav` and `console.dashboards/custom/overview/detail/item` extensions
instead ([CONSOLE-5093], [#16043])
- **Breaking**: Removed `pluginID` from the result in `useResolvedExtensions` hook, use `pluginName` instead ([CONSOLE-3769], [#15904])
- **Breaking**: Removed `AppInitSDK` and `useReduxStore` in `app` directory ([CONSOLE-5063], [#16019])
- **Deprecated**: `useUserSettings` hook has been renamed to `useUserPreference` for consistency ([OCPBUGS-44612], [#16057])
- **Type breaking**: Changed `useDeleteModal` hook's `redirectTo` parameter type from `LocationDescriptor` (from `history`) to `To` (from `react-router`) ([CONSOLE-4990], [#15959])
Expand Down Expand Up @@ -193,6 +196,7 @@ table in [Console dynamic plugins README](./README.md).
[CONSOLE-4990]: https://issues.redhat.com/browse/CONSOLE-4990
[CONSOLE-5039]: https://issues.redhat.com/browse/CONSOLE-5039
[CONSOLE-5050]: https://issues.redhat.com/browse/CONSOLE-5050
[CONSOLE-5093]: https://issues.redhat.com/browse/CONSOLE-5093
[OCPBUGS-19048]: https://issues.redhat.com/browse/OCPBUGS-19048
[OCPBUGS-30077]: https://issues.redhat.com/browse/OCPBUGS-30077
[OCPBUGS-31355]: https://issues.redhat.com/browse/OCPBUGS-31355
Expand Down Expand Up @@ -266,7 +270,7 @@ table in [Console dynamic plugins README](./README.md).
[#15893]: https://github.com/openshift/console/pull/15893
[#15904]: https://github.com/openshift/console/pull/15904
[#15934]: https://github.com/openshift/console/pull/15934
[#15959]: https://github.com/openshift/console/pull/15959
[#16019]: https://github.com/openshift/console/pull/16019
[#16043]: https://github.com/openshift/console/pull/16043
[#16057]: https://github.com/openshift/console/pull/16057
[#15959]: https://github.com/openshift/console/pull/15959
[#16061]: https://github.com/openshift/console/pull/16061
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
76. [dev-console.add/action](#dev-consoleaddaction)
77. [dev-console.add/action-group](#dev-consoleaddaction-group)
78. [dev-console.import/environment](#dev-consoleimportenvironment)
79. [DEPRECATED] [console.dashboards/overview/detail/item](#consoledashboardsoverviewdetailitem)
80. [DEPRECATED] [console.page/resource/tab](#consolepageresourcetab)

---

Expand Down Expand Up @@ -1387,35 +1385,3 @@ This extension can be used to specify extra build environment variable fields un
| `imageStreamTags` | `string[]` | no | List of supported image stream tags |
| `environments` | `ImageEnvironment[]` | no | List of environment variables |

---

## `console.dashboards/overview/detail/item`

### Summary [DEPRECATED]

@deprecated use CustomOverviewDetailItem type instead

### Properties

| Name | Value Type | Optional | Description |
| ---- | ---------- | -------- | ----------- |
| `component` | `CodeRef<ComponentType>` | no | The value, based on the DetailItem component |

---

## `console.page/resource/tab`

### Summary [DEPRECATED]

@deprecated - Use `console.tab/horizontalNav` instead

### Properties

| Name | Value Type | Optional | Description |
| ---- | ---------- | -------- | ----------- |
| `model` | `ExtensionK8sGroupKindModel` | no | The model for which this resource page links to. |
| `component` | `CodeRef<React.ComponentType<{}>>` | no | The component to be rendered when the route matches. |
| `name` | `string` | no | The name of the tab. |
| `href` | `string` | yes | The optional href for the tab link. If not provided, the first `path` is used. |
| `exact` | `boolean` | yes | When `true`, the path must match the URL exactly. |

63 changes: 58 additions & 5 deletions frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,65 @@ use or depend on this package.
> The following information is provided for reference only.

OpenShift web console no longer applies styling to the following CSS classes:

- Removed CSS classes from Console core that were used for deprecated modal components. Plugins that reference these classes in their custom CSS should migrate to PatternFly v6 modal classes (e.g., `.pf-v6-c-modal-box__body`) or use data-test attributes. Removed classes: `.co-overlay`, `.modal-footer`, `.modal-paragraph`, `.modal-header`, `.modal-body`, `.modal-body-border`, `.modal-body-content`, `.modal-content`, `.modal-dialog`, `.co-modal-table`, `.modal__inline-resource-link`.

## Removal of deprecated extensions

Two long-deprecated extensions are removed from Console.

### Removal of `console.page/resource/tab` extension

The `console.page/resource/tab` extension is removed, which was previously deprecated in favor
of the `console.tab/horizontalNav` extension.

In your `console-extensions.json` file, replace any usage of `console.page/resource/tab` with
`console.tab/horizontalNav` using this pattern:

```diff
{
- "type": "console.page/resource/tab",
+ "type": "console.tab/horizontalNav",
"properties": {
- "href": "path-to-page",
"model": {
"group": "group",
"version": "version",
"kind": "kind"
},
- "name": "%namespace~Name%",
+ "page": {
+ "name": "%namespace~Name%",
+ "href": "path-to-page"
+ },
"component": { "$codeRef": "resourcePages.resourcePage" }
}
},
```

### Removal of `console.dashboards/overview/detail/item` extension

The `console.dashboards/overview/detail/item` extension is removed, which was previously deprecated
in favor of the `console.dashboards/custom/overview/detail/item` extension.

In your `console-extensions.json` file, replace any usage of `console.dashboards/overview/detail/item`
with `console.dashboards/custom/overview/detail/item` using this pattern:

```diff
{
- "type": "console.dashboards/overview/detail/item",
+ "type": "console.dashboards/custom/overview/detail/item",
"properties": {
+ "title": "%namespace~Title%",
"component": { "$codeRef": "detailItems.customDetailItem" },
}
},
```

## Removal of `@openshift-console/plugin-shared`

The `@openshift-console/plugin-shared` package has been removed from the Console codebase, and the
corresponding npm package is deprecated. Plugins should remove this dependency from their `package.json`
if present.
The `@openshift-console/plugin-shared` package is removed from the Console codebase, and the corresponding npm
package is deprecated. Plugins should remove this dependency from their `package.json` if present.

## React Router

Expand Down Expand Up @@ -88,8 +141,8 @@ objects), so most plugins should only need to update their imports.

## React 18 upgrade tips

Console now uses React 18. The following guidance highlights common update considerations
for plugin authors.
In this release, Console upgraded from React 17 to React 18. The following guidance highlights common update
considerations for plugin authors.

### Upgrade guidance

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ export type ClusterOverviewMultilineUtilizationItem = Extension<
}
>;

/**
* @deprecated use CustomOverviewDetailItem type instead
*/
export type OverviewDetailItem = Extension<
'console.dashboards/overview/detail/item',
{
/** The value, based on the DetailItem component */
component: CodeRef<ComponentType>;
}
>;

/** Adds an item to the Details card of Overview Dashboard */
export type CustomOverviewDetailItem = Extension<
'console.dashboards/custom/overview/detail/item',
Expand Down Expand Up @@ -92,8 +81,5 @@ export const isClusterOverviewMultilineUtilizationItem = (
): e is ClusterOverviewMultilineUtilizationItem =>
e.type === 'console.cluster-overview/multiline-utilization-item';

export const isOverviewDetailItem = (e: Extension): e is OverviewDetailItem =>
e.type === 'console.dashboards/overview/detail/item';

export const isCustomOverviewDetailItem = (e: Extension): e is CustomOverviewDetailItem =>
e.type === 'console.dashboards/custom/overview/detail/item';
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,6 @@ export type ResourceDetailsPage = Extension<
ResourcePageProperties & {}
>;

/**
* Adds a new resource tab page to Console router.
*
* @deprecated - Use `console.tab/horizontalNav` instead
*/
export type ResourceTabPage = Extension<
'console.page/resource/tab',
Omit<ResourcePageProperties, 'component'> & {
/** The component to be rendered when the route matches. */
component: CodeRef<React.ComponentType>;
/** The name of the tab. */
name: string;
/** The optional href for the tab link. If not provided, the first `path` is used. */
href?: string;
/** When `true`, the path must match the URL exactly. */
exact?: boolean;
}
>;

/**
* Adds a new standalone page rendered outside the common Console page layout.
*
Expand All @@ -99,7 +80,3 @@ export const isResourceListPage = (e: Extension): e is ResourceListPage =>

export const isResourceDetailsPage = (e: Extension): e is ResourceDetailsPage =>
e.type === 'console.page/resource/details';

/** @deprecated - use `console.tab/horizontalNav` */
export const isResourceTabPage = (e: Extension): e is ResourceTabPage =>
e.type === 'console.page/resource/tab';
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
ClusterOverviewUtilizationItem,
ClusterOverviewMultilineUtilizationItem,
CustomOverviewDetailItem,
OverviewDetailItem,
} from '../extensions/cluster-overview';
import type { ClusterGlobalConfig } from '../extensions/cluster-settings';
import type { ContextProvider } from '../extensions/context-providers';
Expand Down Expand Up @@ -49,7 +48,6 @@ import type {
RoutePage,
ResourceDetailsPage,
ResourceListPage,
ResourceTabPage,
} from '../extensions/pages';
import type { Perspective } from '../extensions/perspectives';
import type {
Expand Down Expand Up @@ -105,7 +103,6 @@ export type SupportedExtension =
| SupportedTopologyDetailsExtensions
| RoutePage
| ResourceListPage
| ResourceTabPage
| ResourceDetailsPage
| DashboardsTab
| DashboardsCard
Expand Down Expand Up @@ -135,7 +132,6 @@ export type SupportedExtension =
| ClusterOverviewInventoryItem
| ClusterOverviewUtilizationItem
| ClusterOverviewMultilineUtilizationItem
| OverviewDetailItem
| CustomOverviewDetailItem
| ProjectOverviewUtilizationItem
| ProjectOverviewInventoryItem
Expand Down
Loading