Skip to content

Commit 9c845cf

Browse files
authored
Merge branch 'patternfly:main' into main
2 parents 553dcda + 513de9e commit 9c845cf

214 files changed

Lines changed: 24064 additions & 16643 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"plugin:react/recommended",
1010
"plugin:react-hooks/recommended",
1111
"plugin:@typescript-eslint/recommended",
12+
"plugin:react/jsx-runtime",
1213
"prettier"
1314
],
1415
"overrides": [
@@ -31,13 +32,7 @@
3132
"version": "detect"
3233
}
3334
},
34-
"plugins": [
35-
"react",
36-
"react-hooks",
37-
"@typescript-eslint",
38-
"patternfly-react",
39-
"prettier"
40-
],
35+
"plugins": ["react", "react-hooks", "@typescript-eslint", "patternfly-react", "prettier"],
4136
"rules": {
4237
"@typescript-eslint/adjacent-overload-signatures": "error",
4338
"@typescript-eslint/array-type": "error",

.github/workflows/build-lint-test.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
git fetch origin pull/$GH_PR_NUM/head:tmp
1515
git checkout tmp
1616
fi
17-
- uses: actions/setup-node@v1
17+
- uses: actions/setup-node@v4
1818
with:
19-
node-version: '18'
20-
- run: yarn install --frozen-lockfile
19+
node-version: '20'
20+
- run: corepack enable
21+
- run: yarn install --immutable
2122
- name: generate
2223
run: cd packages/module && yarn generate
2324
- name: Build dist
@@ -35,10 +36,11 @@ jobs:
3536
git fetch origin pull/$GH_PR_NUM/head:tmp
3637
git checkout tmp
3738
fi
38-
- uses: actions/setup-node@v1
39+
- uses: actions/setup-node@v4
3940
with:
40-
node-version: '18'
41-
- run: yarn install --frozen-lockfile
41+
node-version: '20'
42+
- run: corepack enable
43+
- run: yarn install --immutable
4244
- name: ESLint
4345
run: yarn lint:js
4446
- name: MDLint
@@ -57,10 +59,11 @@ jobs:
5759
git fetch origin pull/$GH_PR_NUM/head:tmp
5860
git checkout tmp
5961
fi
60-
- uses: actions/setup-node@v1
62+
- uses: actions/setup-node@v4
6163
with:
62-
node-version: '18'
63-
- run: yarn install --frozen-lockfile
64+
node-version: '20'
65+
- run: corepack enable
66+
- run: yarn install --immutable
6467
- name: generate
6568
run: cd packages/module && yarn generate
6669
- name: Build dist
@@ -81,10 +84,11 @@ jobs:
8184
git fetch origin pull/$GH_PR_NUM/head:tmp
8285
git checkout tmp
8386
fi
84-
- uses: actions/setup-node@v1
87+
- uses: actions/setup-node@v4
8588
with:
86-
node-version: '18'
87-
- run: yarn install --frozen-lockfile
89+
node-version: '20'
90+
- run: corepack enable
91+
- run: yarn install --immutable
8892
- name: generate
8993
run: cd packages/module && yarn generate
9094
- name: Build dist

.github/workflows/build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ jobs:
1717
- name: Run build script
1818
run: ./devSetup.sh
1919
shell: bash
20-
- uses: actions/setup-node@v1
20+
- uses: actions/setup-node@v4
2121
with:
22-
node-version: '18'
23-
- run: yarn install --frozen-lockfile
22+
node-version: '20'
23+
- run: corepack enable
24+
- run: yarn install --immutable
2425
- name: Build dist
2526
run: yarn build

.github/workflows/pr-preview.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
88
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
99
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
10-
GH_PR_NUM: ${{ github.event.number }}
10+
GH_PR_NUM: ${{ github.event.number }}
1111
steps:
1212
- uses: actions/checkout@v2
1313
# Yes, we really want to checkout the PR
@@ -21,10 +21,11 @@ jobs:
2121
git log origin/main..HEAD --format="%b"
2222
# Yes, we really want to checkout the PR
2323
# Injected by generate-workflows.js
24-
- uses: actions/setup-node@v1
24+
- uses: actions/setup-node@v4
2525
with:
26-
node-version: '18'
27-
- run: yarn install --frozen-lockfile
26+
node-version: '20'
27+
- run: corepack enable
28+
- run: yarn install --immutable
2829
- run: yarn lint:js
2930
name: Lint JS
3031
if: always()
@@ -37,4 +38,4 @@ jobs:
3738
name: Build docs
3839
- run: node .github/upload-preview.js packages/module/public
3940
name: Upload docs
40-
if: always()
41+
if: always()

.github/workflows/promote.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ jobs:
1313
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Build for promotion
17-
run: yarn install --frozen-lockfile && yarn build
1816
- uses: actions/setup-node@v3
1917
with:
20-
node-version: '18'
18+
node-version: '20'
2119
registry-url: 'https://registry.npmjs.org'
20+
- run: corepack enable
21+
- name: Build for promotion
22+
run: yarn install --immutable && yarn build
2223
- name: GitHub Tag Name example
2324
run: |
2425
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515
steps:
1616
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v1
17+
- uses: actions/setup-node@v4
1818
with:
19-
node-version: '18'
20-
- run: yarn install --frozen-lockfile
19+
node-version: '20'
20+
- run: corepack enable
21+
- run: yarn install --immutable
2122
- name: generate
2223
run: cd packages/module && yarn generate
2324
- name: Build dist

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ coverage
1414
# package managers
1515
yarn-error.log
1616
lerna-debug.log
17+
.yarn
1718

1819
# IDEs and editors
1920
.idea

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# PatternFly Topology
2-
2+
33
This package provides the resources necessary to use PatternFly Topology, an open source utility that you can use to create a visual representation of all the applications within your project, their build status, and the components and services associated with them.
44

5-
Topology utilizes some of PatternFly's React components https://github.com/patternfly/patternfly-react.
5+
Topology utilizes some of PatternFly's React components https://github.com/patternfly/patternfly-react.
66

7-
Documentation for Topology and its features is available on [the PatternFly website.](www.patternfly.org/topology/about-topology)
7+
Documentation for Topology and its features is available on [the PatternFly website.](www.patternfly.org/extensions/topology/overview)
88

99
## Table of contents
1010

@@ -78,7 +78,7 @@ To use Topology out of the box, follow these steps:
7878
## Example
7979

8080
```ts
81-
import * as React from 'react';
81+
import { memo, useState, useMemo } from 'react';
8282
import {
8383
EdgeStyle,
8484
Model,
@@ -172,10 +172,10 @@ const EDGES = [
172172
}
173173
];
174174

175-
export const TopologyBaselineDemo = React.memo(() => {
176-
const [selectedIds, setSelectedIds] = React.useState<string[]>([]);
175+
export const TopologyBaselineDemo = memo(() => {
176+
const [selectedIds, setSelectedIds] = useState<string[]>([]);
177177

178-
const controller = React.useMemo(() => {
178+
const controller = useMemo(() => {
179179
const model: Model = {
180180
nodes: NODES,
181181
edges: EDGES,
@@ -214,3 +214,9 @@ See the instructions to install and run the demo app, here: [Demo README.md](pac
214214
## Need help?
215215

216216
If you find a bug, have a request, or have any questions about Topology that aren't answered in our documentation, please [reach out to us on Slack.](https://patternfly.slack.com/archives/CK7URGJ2W)
217+
218+
## Contributing to Topology
219+
220+
### AI-assisted development guidelines
221+
222+
Please reference [PatternFly's AI-assisted development guidelines](https://github.com/patternfly/.github/blob/main/CONTRIBUTING.md) if you'd like to contribute code generated using AI.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,33 @@
2626
},
2727
"devDependencies": {
2828
"@babel/core": "^7.19.6",
29+
"@babel/plugin-proposal-class-properties": "^7.18.6",
30+
"@babel/plugin-proposal-decorators": "^7.21.0",
2931
"@babel/preset-env": "^7.19.4",
30-
"@babel/preset-react": "^7.18.6",
3132
"@babel/preset-flow": "^7.18.6",
33+
"@babel/preset-react": "^7.18.6",
3234
"@babel/preset-typescript": "^7.18.6",
33-
"@babel/plugin-proposal-decorators": "^7.21.0",
34-
"@babel/plugin-proposal-class-properties": "^7.18.6",
35+
"@octokit/rest": "^18.0.0",
36+
"@testing-library/dom": "9.0.0",
37+
"@testing-library/jest-dom": "5.16.5",
3538
"@testing-library/react": "^13.4.0",
3639
"@testing-library/user-event": "14.4.3",
37-
"@testing-library/jest-dom": "5.16.5",
38-
"@testing-library/dom": "9.0.0",
40+
"@types/react": "^18",
3941
"@typescript-eslint/eslint-plugin": "^5.42.0",
4042
"@typescript-eslint/parser": "^5.42.0",
41-
"@octokit/rest": "^18.0.0",
4243
"babel-jest": "^29.2.2",
4344
"concurrently": "^5.3.0",
4445
"eslint": "8.22.0",
46+
"eslint-config-prettier": "8.5.0",
47+
"eslint-config-standard-with-typescript": "^23.0.0",
4548
"eslint-plugin-import": "^2.25.2",
4649
"eslint-plugin-markdown": "^1.0.2",
47-
"eslint-plugin-prettier": "^3.1.4",
48-
"eslint-plugin-react": "^7.21.4",
49-
"eslint-config-standard-with-typescript": "^23.0.0",
5050
"eslint-plugin-n": "^15.0.0",
51+
"eslint-plugin-patternfly-react": "^4.80.4",
52+
"eslint-plugin-prettier": "^3.1.4",
5153
"eslint-plugin-promise": "^6.0.0",
54+
"eslint-plugin-react": "^7.21.4",
5255
"eslint-plugin-react-hooks": "^4.6.0",
53-
"eslint-config-prettier": "8.5.0",
54-
"eslint-plugin-patternfly-react": "^4.80.4",
5556
"jest": "^29.2.2",
5657
"jest-environment-jsdom": "^29.2.2",
5758
"jest-transform-stub": "^2.0.0",
@@ -60,8 +61,7 @@
6061
"react-dom": "^18",
6162
"serve": "^14.1.2",
6263
"surge": "^0.23.1",
63-
"typedoc": "0.23",
64-
"@types/react": "^18"
64+
"typedoc": "0.23"
6565
},
66-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
66+
"packageManager": "yarn@4.10.3"
6767
}

0 commit comments

Comments
 (0)