Contributing to Networking Console Plugin
May 14, 2026 · View on GitHub
Getting Started
For initial setup (prerequisites, clone, install, dev server), see README.md.
Coding Standards
TypeScript and React
- Target ES2016 with ESNext modules. The project uses
esbuild-loaderfor fast transpilation. - Follow the ESLint config in
.eslintrc.json— runnpm run lintbefore submitting. - Import ordering is enforced by
simple-import-sort: Node builtins, packages (React first), internal@-prefixed paths, relative paths, then styles. - Use
@utils/*,@views/*,@styles/*path aliases rather than deep relative paths. - Use
no-console— callnetworkConsolefrom@utils/utils/helpersinstead ofconsole.*directly. - Unused variables prefixed with
_are allowed; all others trigger an error.
Component Patterns
- Each view follows the structure:
actions/,details/,form/,list/, plus amanifest.tsthat declares console extensions and exposed modules. - List views use the SDK's
VirtualizedTable,ListPageBody,ListPageFilter, andListPageHeadercomponents. - Forms use
react-hook-form. - Routing uses
react-router(v7). ImportLink,useNavigate,useLocation, anduseParamsfromreact-router. - K8s resource operations use SDK hooks:
useK8sWatchResource,k8sCreate,k8sPatch,k8sDelete. - Functional components only, typed with
FCfrom React - Use PatternFly 6 components for all UI — no custom HTML elements for standard patterns
- One component per file — utility files, types (aside from props), constants, etc. go in a
utils/folder within the component's directory - Define props as TypeScript
typein the same file or a co-locatedtypes.ts - Default export for page-level components
Styling
- Use PatternFly components and global CSS variables. No hex colors (dark mode compatibility).
- Prefix custom CSS classnames with the plugin name.
- SCSS files are co-located with their components and have the same name as the component file, but with the 'scss' extension.
Internationalization
- Use the
useNetworkingTranslationhook (wrapsuseTranslation('plugin__networking-console-plugin')). - For JSX-embedded translations, use the
Transcomponent fromreact-i18next. - After adding or changing translatable strings, run
npm run i18nand commit the updatedlocales/files. - The i18n CI check (
test-frontend.sh) verifies locale files are current.
PR Process
This project uses the Prow-based OpenShift CI system with OWNERS-driven review.
Workflow
- Fork the repo and create a feature branch from
main. - Make changes, run
npm run lintand fix any issues. - If you changed translatable strings, run
npm run i18nand commit the locale updates. - Open a PR against
mainin openshift/networking-console-plugin. - Reference the Jira ticket in the PR title:
OCPBUGS-NNNNN: descriptionorCNV-NNNNN: description.
Review and Merge
The OWNERS file defines two roles:
- Reviewers review code and apply the
lgtmlabel via/lgtm. - Approvers approve the PR for merge via
/approve.
PRs require approval from at least one person in the reviewer list and a different person from the approver list in OWNERS. If the submitter is in one of the lists, their ack is added automatically
Release branches
The repo maintains multiple active release branches (release-4.17, release-4.18, ..., release-4.23). Each branch
tracks a specific OpenShift release:
main— development branch for the next releaserelease-X.Y— stable branch for OpenShift X.Y; receives bug fixes and CVE remediations via cherry-picks- SDK version must correspond to the target release branch (e.g.,
release-4.22uses SDK 4.22.x)
Cherry-Picks
CVE remediations and bug fixes are cherry-picked to active release branches (release-4.16 through the current
release). Cherry-pick PRs use the title format [release-X.YY] OCPBUGS-NNNNN: description and reference the main-branch
PR.
Testing
- Lint:
npm run lint(ESLint + Prettier) - i18n check:
npm run i18nthen verifygit status --short localesshows no changes - Cypress E2E:
npm run test-cypress-headless(requires a running OpenShift cluster)
E2E specs live in integration-tests. Tests run against http://localhost:9000 by default (override with
BRIDGE_BASE_ADDRESS).
CI runs test-frontend.sh (i18n validation) and test-prow-e2e.sh (Cypress against a live cluster) on every PR.
Commit Conventions
- Reference the Jira ticket in the commit or PR title:
OCPBUGS-NNNNN: fix descriptionorCNV-NNNNN: add feature. - Keep commits focused on a single change.