A dynamic plugin targets one or more versions of OpenShift Console. Each version supports specific version(s) of PatternFly in terms of CSS styling.
Check the OpenShift Console Versions vs PatternFly Versions table for compatibility before upgrading to a newer version of PatternFly.
Plugins should only include styles that are specific to their user interfaces to be evaluated on
top of base PatternFly styles. Avoid importing styles such as @patternfly/react-styles/**/*.css
or any styles from @patternfly/patternfly
package in your plugin.
Console application is responsible for loading base styles for all supported PatternFly version(s).
Console provides the following PatternFly 4.x shared modules to plugins:
@patternfly/react-core
@patternfly/react-table
@patternfly/quickstarts
When using code from these packages, make sure to import directly from the package index:
// Do _not_ do this:
import { Button } from '@patternfly/react-core/dist/esm/components/Button';
// Instead, do this:
import { Button } from '@patternfly/react-core';
Plugins that only target OpenShift Console 4.15 and newer should upgrade to PatternFly 5.x to take advantage of PatternFly dynamic modules.
Any PatternFly related code should be imported via the corresponding package index:
// Do _not_ do this:
import { MonitoringIcon } from '@patternfly/react-icons/dist/esm/icons/monitoring-icon';
// Instead, do this:
import { MonitoringIcon } from '@patternfly/react-icons';