Skip to content

OCPBUGS-55323: Add patternfly/react-topology to shared modules list of dynamic plugin sdk #14993

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

Merged
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
3 changes: 3 additions & 0 deletions frontend/packages/console-dynamic-plugin-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ The following shared modules are provided by Console, without plugins providing

- `@openshift-console/dynamic-plugin-sdk`
- `@openshift-console/dynamic-plugin-sdk-internal`
- `@patternfly/react-topology`
- `react`
- `react-i18next`
- `react-redux`
Expand Down Expand Up @@ -175,6 +176,8 @@ This section documents notable changes in the Console provided shared modules ac
`react-router-dom-v5-compat` will be removed in the future. Plugins should continue migration to the
`react-router-dom-v5-compat` module until `react-router-dom` v6 is aliased to `react-router-dom` v6. See the
[Official v5 to v6 Migration Guide](https://reactrouter.com/6.30.0/upgrading/v5) for details.
- Added `@patternfly/react-topology` to shared modules. This supports dynamic plugins using PatternFly 6
topology components with consistent context and styling.

##### CSS styling

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const initSharedScope = () => {
addModule('@openshift-console/dynamic-plugin-sdk-internal', async () => () =>
require('@console/dynamic-plugin-sdk/src/lib-internal'),
);
addModule('@patternfly/react-topology', async () => () => require('@patternfly/react-topology'));
addModule('react', async () => () => require('react'));
addModule('react-i18next', async () => () => require('react-i18next'));
addModule('react-redux', async () => () => require('react-redux'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type SharedModuleMetadata = Partial<{
export const sharedPluginModules = [
'@openshift-console/dynamic-plugin-sdk',
'@openshift-console/dynamic-plugin-sdk-internal',
'@patternfly/react-topology',
'react',
'react-i18next',
'react-redux',
Expand All @@ -42,6 +43,7 @@ export type SharedModuleNames = typeof sharedPluginModules[number];
const sharedPluginModulesMetadata: Record<SharedModuleNames, SharedModuleMetadata> = {
'@openshift-console/dynamic-plugin-sdk': { singleton: true, allowFallback: false },
'@openshift-console/dynamic-plugin-sdk-internal': { singleton: true, allowFallback: false },
'@patternfly/react-topology': { singleton: true, allowFallback: false },
react: { singleton: true, allowFallback: false },
'react-i18next': { singleton: true, allowFallback: false },
'react-redux': { singleton: true, allowFallback: false },
Expand Down