-
Notifications
You must be signed in to change notification settings - Fork 593
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
CONSOLE-3883: Improve dynamic plugin docs #13637
Merged
openshift-merge-bot
merged 4 commits into
openshift:master
from
vojtechszocs:improve-plugin-docs
Mar 7, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
frontend/packages/console-dynamic-plugin-sdk/upgrade-PatternFly.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# PatternFly Upgrade Notes | ||
|
||
A dynamic plugin targets one or more versions of OpenShift Console. Each version supports | ||
specific version(s) of [PatternFly](https://www.patternfly.org/) in terms of CSS styling. | ||
|
||
Check the [OpenShift Console Versions vs PatternFly Versions][console-pf-versions] table for | ||
compatibility before upgrading to a newer version of PatternFly. | ||
|
||
## CSS styling | ||
|
||
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 4.14 & below | ||
|
||
Console provides the following PatternFly 4.x [shared modules][console-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: | ||
|
||
```ts | ||
// Do _not_ do this: | ||
import { Button } from '@patternfly/react-core/dist/esm/components/Button'; | ||
// Instead, do this: | ||
import { Button } from '@patternfly/react-core'; | ||
``` | ||
|
||
## Console 4.15 | ||
|
||
Plugins that only target OpenShift Console 4.15 and newer should upgrade to PatternFly 5.x to take | ||
advantage of [PatternFly dynamic modules][console-pf-dynamic-modules]. | ||
|
||
Any PatternFly related code should be imported via the corresponding package index: | ||
|
||
```ts | ||
// Do _not_ do this: | ||
import { MonitoringIcon } from '@patternfly/react-icons/dist/esm/icons/monitoring-icon'; | ||
// Instead, do this: | ||
import { MonitoringIcon } from '@patternfly/react-icons'; | ||
``` | ||
|
||
## PatternFly resources | ||
|
||
- [Major release highlights providing an overview of changes][pf-release-highlights] | ||
- [Upgrade guide with information about codemods and other resources][pf-upgrade-guide] | ||
- [Release notes change log that can be searched and filtered][pf-upgrade-release-notes] | ||
|
||
[console-shared-modules]: ./README.md#shared-modules | ||
[console-pf-versions]: ./README.md#openshift-console-versions-vs-patternfly-versions | ||
[console-pf-dynamic-modules]: ./README.md#patternfly-dynamic-modules | ||
[pf-release-highlights]: https://www.patternfly.org/get-started/release-highlights/ | ||
[pf-upgrade-guide]: https://www.patternfly.org/get-started/upgrade | ||
[pf-upgrade-release-notes]: https://www.patternfly.org/get-started/upgrade/release-notes |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets link the table here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhadvig This is a reference-style link to
console-pf-versions
declared at the end of the Markdown document.