From 0a40633d539365b673d507caf3c97697160ac019 Mon Sep 17 00:00:00 2001 From: logonoff Date: Thu, 26 Mar 2026 08:36:53 -0400 Subject: [PATCH] NO-JIRA: prep for 4.22.0-prerelease.2 SDK publish --- .../CHANGELOG-core.md | 18 ++--- .../CHANGELOG-webpack.md | 4 +- .../release-notes/4.22.md | 70 +++++++++---------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md index d2dc2ac0160..1a0ec52e026 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md +++ b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-core.md @@ -10,14 +10,19 @@ For current development version of Console, use `4.x.0-prerelease.n` packages. For older 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility table in [Console dynamic plugins README](./README.md). -## 4.22.0-prerelease.2 - TBD +## 4.22.0-prerelease.2 - 2026-03-26 + +> [!IMPORTANT] +> This release includes breaking changes that impact all existing Console plugins. +> Refer to [the release notes](https://github.com/openshift/console/blob/main/frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md) +> for details on how to adapt your plugins for Console 4.22. - **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 support for `console.page/resource/tab` and `console.dashboards/overview/detail/item` 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]) +- **Breaking**: Removed `pluginID` from the result in `useResolvedExtensions` hook. Use `pluginName` instead ([CONSOLE-3769], [#15904]) +- **Breaking**: Removed `AppInitSDK` and `useReduxStore` in the `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]) - **Type breaking**: Changed `FileUploadHandler` return type from `void` to `To | void`. Handlers can now return a path (from `react-router`) for programmatic navigation instead of calling history methods directly ([CONSOLE-4990], [#15959]) @@ -26,10 +31,6 @@ table in [Console dynamic plugins README](./README.md). ## 4.22.0-prerelease.1 - 2025-01-21 -> [!IMPORTANT] -> This release includes breaking changes that impact all existing Console plugins. -> Refer to upgrade-sdk.md for details on how to adapt your plugins for Console 4.22. - - **Breaking**: Removed ability to load plugins that use legacy plugin manifest format ([CONSOLE-3769], [#15778]) - **Breaking**: Removed `setPluginStore` function in `k8s-utils.ts` ([CONSOLE-3769], [#15778]) - **Breaking**: Removed `useSafetyFirst` ([CONSOLE-5039], [#14869]) @@ -196,6 +197,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-5063]: https://issues.redhat.com/browse/CONSOLE-5063 [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 @@ -216,10 +218,8 @@ table in [Console dynamic plugins README](./README.md). [OCPBUGS-52948]: https://issues.redhat.com/browse/OCPBUGS-52948 [OCPBUGS-55368]: https://issues.redhat.com/browse/OCPBUGS-55368 [OCPBUGS-56248]: https://issues.redhat.com/browse/OCPBUGS-56248 -[OCPBUGS-57755]: https://issues.redhat.com/browse/OCPBUGS-57755 [OCPBUGS-58118]: https://issues.redhat.com/browse/OCPBUGS-58118 [OCPBUGS-58258]: https://issues.redhat.com/browse/OCPBUGS-58258 -[OCPBUGS-58375]: https://issues.redhat.com/browse/OCPBUGS-58375 [OCPBUGS-62126]: https://issues.redhat.com/browse/OCPBUGS-62126 [ODC-7425]: https://issues.redhat.com/browse/ODC-7425 [#12983]: https://github.com/openshift/console/pull/12983 diff --git a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md index dbe4ac3bcf5..dc1b2f53deb 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md +++ b/frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md @@ -10,10 +10,10 @@ For current development version of Console, use `4.x.0-prerelease.n` packages. For older 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility table in [Console dynamic plugins README](./README.md). -## 4.22.0-prerelease.2 - TBD +## 4.22.0-prerelease.2 - 2026-03-26 - **Deprecated**: `loadPluginEntry` callback is deprecated in favor of `__load_plugin_entry__`. Migrate by - building your plugin with a 4.22 or later of `ConsoleRemotePlugin`. Runtime support for older plugins + building your plugin with `ConsoleRemotePlugin` version 4.22 or later. Runtime support for older plugins built for 4.21 or older will be removed in a future version of OCP Console. ([CONSOLE-3769], [#15904]) - Add warnings for usage of deprecated Console provided shared modules ([CONSOLE-5135], [#16178]) diff --git a/frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md b/frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md index ce475d34ba7..80f7ed7c799 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md +++ b/frontend/packages/console-dynamic-plugin-sdk/release-notes/4.22.md @@ -13,7 +13,6 @@ Additional updates to these shared modules might occur before the 4.22 release i - Upgraded from `react-redux` v7 to v9. Plugins must use `react-redux` v9 to remain compatible with Console. - Upgraded from `redux` v4 to v5. Plugins must use `redux` v5 to remain compatible with Console. - Upgraded from `redux-thunk` v2 to v3. Plugins must use `redux-thunk` v3 to remain compatible with Console. -- Upgraded from `react-i18next` v11 to v15. Plugins must use `react-i18next` v15 to remain compatible with Console. - Upgraded from `react-router` v5 to v7. Plugins must use `react-router` v7 to remain compatible with Console. - The `react-router-dom-v5-compat` and `react-router-dom` shared modules are deprecated. Plugins should replace these imports with `react-router`. @@ -25,23 +24,13 @@ Additional updates to these shared modules might occur before the 4.22 release i - Support for PatternFly 5.x within Console is removed. Console now only uses PatternFly 6.x. - PatternFly 6.x CSS has been upgraded from 6.2.x to 6.4.x. -## Addition of `@openshift/dynamic-plugin-sdk` shared module - - - -The `@openshift/dynamic-plugin-sdk` package has been added as a shared module in Console because of internal -changes to how Console manages plugins. - -This shared module provides a shared React context for plugin and extension management. Plugins should not -use or depend on this package. - > [!WARNING] > OpenShift web console does not support non-PatternFly CSS provided by Console in plugins. > 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`. +- 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 @@ -100,7 +89,7 @@ with `console.dashboards/custom/overview/detail/item` using this pattern: 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 +## React Router 7 upgrade ### Aliasing `react-router-dom` and `react-router-dom-v5-compat` @@ -122,7 +111,7 @@ Console has migrated from using the `history` package to React Router's native t This affects the following public API types: - `useDeleteModal` hook's `redirectTo` parameter type has changed from `LocationDescriptor` (from `history`) - to `To` (from `react-router-dom-v5-compat`) + to `To` (from `react-router`) #### Migration guide @@ -142,28 +131,16 @@ If your plugin uses the `useDeleteModal` hook and passes a `redirectTo` paramete The `To` type is compatible with the previous `LocationDescriptor` type (accepts strings and location objects), so most plugins should only need to update their imports. -## react-i18next upgrade - -Console 4.22 upgrades from `react-i18next` v11 to v16. For more information about breaking changes and migration -guidance, see the [react-i18next changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md). - -In this release, Console removes the following custom formatters from the `react-i18next` initialization: -- `number`: now a [built-in formatter](https://www.i18next.com/translation-function/formatting#number) -- `fromNow` -- `dateTime` - -Plugins that use these formatters must implement their own formatting to replace this functionality. - -## React 18 upgrade tips +## React 18 upgrade In this release, Console upgraded from React 17 to React 18. The following guidance highlights common update considerations for plugin authors. ### Upgrade guidance -When upgrading plugins to support React 18, plugin authors might need to review and update -custom hooks related to React 18's new rendering behavior. Plugins may also need to update their -code to align with new type definitions. For more information, see: +When upgrading plugins to support React 18, plugin authors might need to review and update custom hooks related +to React 18's new rendering behavior. Plugins might also need to update their code to align with new type +definitions. For more information, see: - [`@types/react` v18 changelog](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210) - [React 18 Upgrade Guide](https://react.dev/blog/2022/03/08/react-18-upgrade-guide) @@ -171,8 +148,8 @@ code to align with new type definitions. For more information, see: ### New JSX transform Console currently supports React 18. The [new JSX transform] was introduced in React 17. The new JSX -transform reduces bundle size, as well as allowing the usage of JSX syntax without importing the React -namespace. Adopting the new JSX transform is highly recommended in React 18. +transform reduces bundle size, and enables JSX syntax without importing the React namespace. Adopting the +new JSX transform is highly recommended in React 18. In `tsconfig.json`, set the `jsx` compiler option to `react-jsx`. The following diff shows a common update required when migrating to the new JSX transform: @@ -186,9 +163,32 @@ update required when migrating to the new JSX transform: } ``` -You may also consider running the [upgrade-react-imports] codemod to automatically update your imports to use named -imports (which is React's recommended way). The React namespace import (`import * as React from 'react'`) is still -valid and will still be supported by React 18. +You might also consider running the [upgrade-react-imports] codemod to automatically update your imports to use named +imports (which is React's recommended way). The React namespace import (`import * as React from 'react'`) remains +valid and is supported by React 18. + +## react-i18next upgrade + +Console 4.22 upgrades from `react-i18next` v11 to v16. For more information about breaking changes and migration +guidance, see the [react-i18next changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md). + +In this release, Console removes the following custom formatters from the `react-i18next` initialization: +- `number`: now a [built-in formatter](https://www.i18next.com/translation-function/formatting#number) +- `fromNow` +- `dateTime` + +Plugins that use these formatters must implement their own formatting to replace this functionality. + +## Addition of `@openshift/dynamic-plugin-sdk` shared module + + + +The `@openshift/dynamic-plugin-sdk` package ("upstream SDK") has been added as a shared module in Console +because of internal changes to how Console manages plugins. + +This shared module provides a shared React context for plugin and extension management. Plugins should not +use or depend on the upstream SDK. We do not provide API stability guarantees for the upstream SDK, and +its existence as a shared module is subject to removal without deprecation. [new JSX transform]: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html [upgrade-react-imports]: https://app.codemod.com/registry/react/update-react-imports