-
Notifications
You must be signed in to change notification settings - Fork 43
OCPBUGS-65887: Update a lot of deps #93
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
Open
logonoff
wants to merge
7
commits into
openshift:main
Choose a base branch
from
logonoff:OCPBUGS-65887-deps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c8ddb09
OCPBUGS-65887: Update a lot of deps
logonoff ba1b415
OCPBUGS-65887: Update i18n strings
logonoff f52a36b
OCPBUGS-65887: Add auto format on save for vscode
logonoff 7016f3b
OCPBUGS-68557: Resolve all missing `peerDeps` warnings
logonoff ee255d7
OCPBUGS-65887: Ban all colours and update README
logonoff 623ccaa
OCPBUGS-65887: Bump to 4.20 SDK
logonoff 6075b34
NO-JIRA: add myself to owners
logonoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| approvers: | ||
| - christianvogt | ||
| - florkbr | ||
| - spadgett | ||
| - vojtechszocs | ||
| - jhadvig | ||
| - TheRealJon | ||
| - logonoff | ||
| - rhamilto | ||
| - spadgett | ||
| - TheRealJon | ||
| - vojtechszocs | ||
| component: Management Console |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,21 +1,18 @@ | ||
| # OpenShift Console Plugin Template | ||
| # OpenShift console plugin template | ||
|
|
||
| This project is a minimal template for writing a new OpenShift Console dynamic | ||
| plugin. | ||
|
|
||
| [Dynamic plugins](https://github.com/openshift/console/tree/master/frontend/packages/console-dynamic-plugin-sdk) | ||
| allow you to extend the | ||
| [OpenShift UI](https://github.com/openshift/console) | ||
| [Openshift console plugins](https://github.com/openshift/console/tree/main/frontend/packages/console-dynamic-plugin-sdk) | ||
| allow you to extend the [OpenShift web console](https://github.com/openshift/console) | ||
| at runtime, adding custom pages and other extensions. They are based on | ||
| [webpack module federation](https://webpack.js.org/concepts/module-federation/). | ||
| Plugins are registered with console using the `ConsolePlugin` custom resource | ||
| and enabled in the console operator config by a cluster administrator. | ||
|
|
||
| Using the latest `v1` API version of `ConsolePlugin` CRD, requires OpenShift 4.12 | ||
| and higher. For using old `v1alpha1` API version us OpenShift version 4.10 or 4.11. | ||
|
|
||
| For an example of a plugin that works with OpenShift 4.11, see the `release-4.11` branch. | ||
| For a plugin that works with OpenShift 4.10, see the `release-4.10` branch. | ||
| The `main` branch of this repository contains an example plugin which works | ||
| with the latest version. To see an example of a plugin which works with an older | ||
| version, visit the appropriate `release-4.x` branch. | ||
|
|
||
| [Node.js](https://nodejs.org/en/) and [yarn](https://yarnpkg.com) are required | ||
| to build and run the example. To run OpenShift console in a container, either | ||
|
|
@@ -24,17 +21,17 @@ to build and run the example. To run OpenShift console in a container, either | |
|
|
||
| ## Getting started | ||
|
|
||
| > [!IMPORTANT] | ||
| > [!IMPORTANT] | ||
| > To use this template, **DO NOT FORK THIS REPOSITORY**! Click **Use this template**, then select | ||
| > [**Create a new repository**](https://github.com/new?template_name=networking-console-plugin&template_owner=openshift) | ||
| > [**Create a new repository**](https://github.com/new?template_name=console-plugin-template&template_owner=openshift) | ||
| > to create a new repository. | ||
| > | ||
| >  | ||
| > | ||
| > **Forking this repository** for purposes outside of contributing to this repository | ||
| > **will cause issues**, as users cannot have more than one fork of a template repository | ||
| > at a time. This could prevent future users from forking and contributing to your plugin. | ||
| > | ||
| > | ||
| > Your fork would also behave like a template repository, which might be confusing for | ||
| > contributiors, because it is not possible for repositories generated from a template | ||
| > repository to contribute back to the template. | ||
|
|
@@ -177,7 +174,7 @@ naming conflicts. For example, the plugin template uses the | |
| with this namespace as follows: | ||
|
|
||
| ```tsx | ||
| conster Header: React.FC = () => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😆 |
||
| const Header: React.FC = () => { | ||
| const { t } = useTranslation('plugin__console-plugin-template'); | ||
| return <h1>{t('Hello, World!')}</h1>; | ||
| }; | ||
|
|
@@ -207,15 +204,14 @@ plugin template when adding or changing messages. | |
| This project adds prettier, eslint, and stylelint. Linting can be run with | ||
| `yarn run lint`. | ||
|
|
||
| The stylelint config disallows hex colors since these cause problems with dark | ||
| mode (starting in OpenShift console 4.11). You should use the | ||
| [PatternFly global CSS variables](https://patternfly-react-main.surge.sh/developer-resources/global-css-variables#global-css-variables) | ||
| The stylelint config disallows defining colors since these cause problems with dark | ||
| mode. Use [PatternFly semantic tokens](https://www.patternfly.org/tokens/all-patternfly-tokens) | ||
| for colors instead. | ||
|
|
||
| The stylelint config also disallows naked element selectors like `table` and | ||
| `.pf-` or `.co-` prefixed classes. This prevents plugins from accidentally | ||
| overwriting default console styles, breaking the layout of existing pages. The | ||
| best practice is to prefix your CSS classnames with your plugin name to avoid | ||
| best practice is to prefix your CSS class names with your plugin name to avoid | ||
| conflicts. Please don't disable these rules without understanding how they can | ||
| break console styles! | ||
|
|
||
|
|
@@ -225,10 +221,10 @@ Steps to generate reports | |
|
|
||
| 1. In command prompt, navigate to root folder and execute the command `yarn run cypress-merge` | ||
| 2. Then execute command `yarn run cypress-generate` | ||
| The cypress-report.html file is generated and should be in (/integration-tests/screenshots) directory | ||
| The cypress-report.html file is generated and should be in (/integration-tests/screenshots) directory. | ||
|
|
||
| ## References | ||
|
|
||
| - [Console Plugin SDK README](https://github.com/openshift/console/tree/master/frontend/packages/console-dynamic-plugin-sdk) | ||
| - [Console Plugin SDK README](https://github.com/openshift/console/tree/main/frontend/packages/console-dynamic-plugin-sdk) | ||
| - [Customization Plugin Example](https://github.com/spadgett/console-customization-plugin) | ||
| - [Dynamic Plugin Enhancement Proposal](https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md) | ||
| - [Dynamic Plugin Enhancement Proposal](https://github.com/openshift/enhancements/blob/main/enhancements/console/dynamic-plugins.md) | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,12 +1,8 @@ | ||
| { | ||
| "After cloning this project, replace references to": "After cloning this project, replace references to", | ||
| "and other plugin metadata in package.json with values for your plugin.": "and other plugin metadata in package.json with values for your plugin.", | ||
| "console-template-plugin": "console-template-plugin", | ||
| "exposedModules": "exposedModules", | ||
| "Hello, Plugin!": "Hello, Plugin!", | ||
| "in package.json mapping the reference to the module.": "in package.json mapping the reference to the module.", | ||
| "Plugin Example": "Plugin Example", | ||
| "After cloning this project, replace references to <1>console-template-plugin</1> and other plugin metadata in package.json with values for your plugin.": "After cloning this project, replace references to <1>console-template-plugin</1> and other plugin metadata in package.json with values for your plugin.", | ||
| "Hello, plugin!": "Hello, plugin!", | ||
| "Plugin example": "Plugin example", | ||
| "Success!": "Success!", | ||
| "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property": "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property", | ||
| "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property <2>exposedModules</2> in package.json mapping the reference to the module.": "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property <2>exposedModules</2> in package.json mapping the reference to the module.", | ||
| "Your plugin is working.": "Your plugin is working." | ||
| } | ||
| } |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -24,49 +24,53 @@ | |
| "webpack": "node -r ts-node/register ./node_modules/.bin/webpack" | ||
| }, | ||
| "devDependencies": { | ||
| "@cypress/webpack-preprocessor": "^5.15.5", | ||
| "@openshift-console/dynamic-plugin-sdk": "1.4.0", | ||
| "@openshift-console/dynamic-plugin-sdk-webpack": "1.1.1", | ||
| "@babel/core": "^7.28.5", | ||
| "@babel/preset-env": "^7.28.5", | ||
| "@cypress/webpack-preprocessor": "^7.0.2", | ||
| "@openshift-console/dynamic-plugin-sdk": "4.20.0", | ||
| "@openshift-console/dynamic-plugin-sdk-webpack": "4.20.0", | ||
| "@patternfly/react-core": "^6.2.2", | ||
| "@patternfly/react-icons": "^6.2.2", | ||
| "@patternfly/react-table": "^6.2.2", | ||
| "@types/node": "^18.0.0", | ||
| "@types/node": "^22.0.0", | ||
| "@types/react": "^17.0.37", | ||
| "@types/react-helmet": "^6.1.4", | ||
| "@types/react-router-dom": "^5.3.2", | ||
| "@typescript-eslint/eslint-plugin": "^5.14.0", | ||
| "@typescript-eslint/parser": "^5.14.0", | ||
| "copy-webpack-plugin": "^6.4.1", | ||
| "css-loader": "^6.7.1", | ||
| "cypress": "^12.17.4", | ||
| "@types/react-router-dom": "^5.3.3", | ||
| "@typescript-eslint/eslint-plugin": "^5.62.0", | ||
| "@typescript-eslint/parser": "^5.62.0", | ||
| "babel-loader": "^10.0.0", | ||
| "copy-webpack-plugin": "^13.0.1", | ||
| "css-loader": "^7.1.2", | ||
| "cypress": "^14.2.1", | ||
| "cypress-multi-reporters": "^1.6.2", | ||
| "eslint": "^8.10.0", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-cypress": "^2.12.1", | ||
| "eslint-plugin-prettier": "^4.0.0", | ||
| "eslint-plugin-react": "^7.29.1", | ||
| "i18next-parser": "^3.11.0", | ||
| "mocha-junit-reporter": "^2.2.0", | ||
| "mochawesome": "^7.1.3", | ||
| "i18next": "^23.11.5", | ||
| "i18next-parser": "^9.3.0", | ||
| "mocha": "^10.2.0", | ||
| "mocha-junit-reporter": "^2.2.1", | ||
| "mochawesome": "^7.1.4", | ||
| "mochawesome-merge": "^4.3.0", | ||
| "pluralize": "^8.0.0", | ||
| "prettier": "^2.7.1", | ||
| "prettier-stylelint": "^0.4.2", | ||
| "react": "^17.0.1", | ||
| "react-dom": "^17.0.1", | ||
| "react-helmet": "^6.1.0", | ||
| "react-i18next": "^11.7.3", | ||
| "react-router": "5.3.x", | ||
| "react-router-dom": "5.3.x", | ||
| "style-loader": "^3.3.1", | ||
| "stylelint": "^15.3.0", | ||
| "stylelint-config-standard": "^31.0.0", | ||
| "ts-loader": "^9.3.1", | ||
| "ts-node": "^10.8.1", | ||
| "typescript": "^4.7.4", | ||
| "webpack": "5.75.0", | ||
| "webpack-cli": "^4.9.2", | ||
| "webpack-dev-server": "^4.7.4" | ||
| "react-router-dom-v5-compat": "^6.11.2", | ||
| "style-loader": "^4.0.0", | ||
| "stylelint": "^16.25.0", | ||
| "stylelint-config-standard": "^39.0.1", | ||
| "ts-loader": "^9.5.4", | ||
| "ts-node": "^10.9.2", | ||
| "typescript": "^5.9.3", | ||
| "webpack": "^5.75.0", | ||
| "webpack-cli": "^6.0.1", | ||
| "webpack-dev-server": "^5.2.2" | ||
| }, | ||
| "consolePlugin": { | ||
| "name": "console-plugin-template", | ||
|
|
@@ -77,14 +81,7 @@ | |
| "ExamplePage": "./components/ExamplePage" | ||
| }, | ||
| "dependencies": { | ||
| "@console/pluginAPI": "*" | ||
| "@console/pluginAPI": "^4.19.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should encourage real world plugins to utilize the |
||
| } | ||
| }, | ||
| "peerDependencies": { | ||
logonoff marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "@babel/core": "^7.0.1", | ||
| "@babel/preset-env": "^7.0.0", | ||
| "babel-loader": "^8.0.2", | ||
| "i18next": "^23.11.5", | ||
| "mocha": "^10.5.1" | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /* Prefixing your CSS classes with your plugin name is a best practice to avoid | ||
| * collisions with other plugin styles. */ | ||
| .console-plugin-template__nice { | ||
| /* Use PF global vars for colors to support dark mode in OpenShift 4.11. | ||
| * https://patternfly-react-main.surge.sh/developer-resources/global-css-variables */ | ||
| color: var(--pf-global--palette--blue-400); | ||
| /* Use PatternFly semantic tokens for colors to support theming. | ||
| * https://www.patternfly.org/tokens/all-patternfly-tokens */ | ||
| color: var(--pf-t--global--color--brand--default); | ||
| } |
Oops, something went wrong.
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.
Do we need this to be an explicit option?
Does setting
editor.codeActionsOnSavecauseeditor.formatOnSaveto be enabled by default?Uh oh!
There was an error while loading. Please reload this page.
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.
We should explicitly disable
formatOnSave(even overriding user workspace preferences) because it has problems with our eslint config.codeActionsOnSaveis run beforeformatOnSave, but theformatOnSaveformatting is incorrect according to the linter. This is very annoying.