Skip to content

Commit 4743520

Browse files
tlabajTitani
andauthored
Merge remote-tracking branch 'upstream/main' into v6 (#9792)
* Merge remote-tracking branch 'upstream/main' into v6 * fix snapshots --------- Co-authored-by: Titani <[email protected]>
1 parent b7e8065 commit 4743520

File tree

335 files changed

+11115
-9415
lines changed

Some content is hidden

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

335 files changed

+11115
-9415
lines changed

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module.exports = {
1010
],
1111
roots: ['<rootDir>/packages'],
1212
transform: {
13-
'^.+\\.[jt]sx?$': 'babel-jest'
13+
'^.+\\.[jt]sx?$': 'babel-jest',
14+
'^.+\\.svg$': 'jest-transform-stub'
1415
},
1516
setupFilesAfterEnv: ['<rootDir>/packages/testSetup.ts'],
1617
transformIgnorePatterns: ['node_modules/(?!@patternfly|@novnc|@popperjs|lodash|monaco-editor|react-monaco-editor)'],

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@
3737
"@octokit/rest": "^20.0.0",
3838
"@testing-library/jest-dom": "^5.16.5",
3939
"@testing-library/react": "^13.4.0",
40-
"@testing-library/user-event": "14.4.3",
41-
"@types/jest": "29.5.3",
40+
"@testing-library/user-event": "14.5.1",
41+
"@types/jest": "29.5.5",
4242
"@types/react": "^18",
4343
"@types/react-dom": "^18",
4444
"@typescript-eslint/eslint-plugin": "^5.59.2",
4545
"@typescript-eslint/parser": "^5.59.2",
4646
"babel-jest": "^27.2.5",
47+
"jest-transform-stub": "^2.0.0",
4748
"concurrently": "^7.6.0",
4849
"eslint": "^8.39.0",
4950
"eslint-plugin-markdown": "^3.0.0",

packages/eslint-plugin-patternfly-react/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
99

1010
- Release alphas from v6 and rebase from main ([#9692](https://github.com/patternfly/patternfly-react/issues/9692)) ([bb022ff](https://github.com/patternfly/patternfly-react/commit/bb022ffc65da8e8c5b5c984412f936cea9424676)), closes [#9651](https://github.com/patternfly/patternfly-react/issues/9651) [#9627](https://github.com/patternfly/patternfly-react/issues/9627) [#9555](https://github.com/patternfly/patternfly-react/issues/9555) [#9543](https://github.com/patternfly/patternfly-react/issues/9543) [#9578](https://github.com/patternfly/patternfly-react/issues/9578) [#9519](https://github.com/patternfly/patternfly-react/issues/9519) [#9603](https://github.com/patternfly/patternfly-react/issues/9603) [#9655](https://github.com/patternfly/patternfly-react/issues/9655) [#9614](https://github.com/patternfly/patternfly-react/issues/9614) [#9606](https://github.com/patternfly/patternfly-react/issues/9606) [#9628](https://github.com/patternfly/patternfly-react/issues/9628) [#9635](https://github.com/patternfly/patternfly-react/issues/9635) [#9649](https://github.com/patternfly/patternfly-react/issues/9649) [#9642](https://github.com/patternfly/patternfly-react/issues/9642) [#9633](https://github.com/patternfly/patternfly-react/issues/9633) [#9637](https://github.com/patternfly/patternfly-react/issues/9637) [#9584](https://github.com/patternfly/patternfly-react/issues/9584) [#9284](https://github.com/patternfly/patternfly-react/issues/9284)
1111

12+
# [5.2.0-prerelease.0](https://github.com/patternfly/patternfly-react/compare/eslint-plugin-patternfly-react@[email protected]) (2023-10-05)
13+
14+
**Note:** Version bump only for package eslint-plugin-patternfly-react
15+
16+
## 5.1.1 (2023-10-05)
17+
18+
**Note:** Version bump only for package eslint-plugin-patternfly-react
19+
1220
## 5.1.1-prerelease.1 (2023-08-29)
1321

1422
### Bug Fixes

packages/eslint-plugin-patternfly-react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "eslint-plugin-patternfly-react",
33
"version": "6.0.0-alpha.1",
4+
"version": "5.2.0-prerelease.0",
45
"private": false,
56
"main": "./lib/index.js",
67
"license": "MIT",

packages/react-charts/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,52 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
1919

2020
**Note:** Version bump only for package @patternfly/react-charts
2121

22+
# 7.2.0-prerelease.5 (2023-10-26)
23+
24+
**Note:** Version bump only for package @patternfly/react-charts
25+
26+
# 7.2.0-prerelease.4 (2023-10-10)
27+
28+
**Note:** Version bump only for package @patternfly/react-charts
29+
30+
# [7.2.0-prerelease.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-10)
31+
32+
**Note:** Version bump only for package @patternfly/react-charts
33+
34+
# 7.2.0-prerelease.2 (2023-10-09)
35+
36+
**Note:** Version bump only for package @patternfly/react-charts
37+
38+
# [7.2.0-prerelease.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-09)
39+
40+
### Bug Fixes
41+
42+
- **charts:** legendAllowWrap function generates an null error ([#9719](https://github.com/patternfly/patternfly-react/issues/9719)) ([5b4cbf4](https://github.com/patternfly/patternfly-react/commit/5b4cbf41bf11785ffe66dc263c7c26e61d25cacd))
43+
44+
# [7.2.0-prerelease.0](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-05)
45+
46+
**Note:** Version bump only for package @patternfly/react-charts
47+
48+
## [7.1.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-05)
49+
50+
**Note:** Version bump only for package @patternfly/react-charts
51+
52+
## 7.1.1-prerelease.10 (2023-10-03)
53+
54+
### Bug Fixes
55+
56+
- whitespace changes to trigger prereleases ([#9702](https://github.com/patternfly/patternfly-react/issues/9702)) ([741c248](https://github.com/patternfly/patternfly-react/commit/741c24825b503e116c77cf304aa3e4e3a9ff7841))
57+
58+
## [7.1.1-prerelease.9](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-22)
59+
60+
### Features
61+
62+
- **charts:** add RTL legend support ([#9570](https://github.com/patternfly/patternfly-react/issues/9570)) ([99d8d97](https://github.com/patternfly/patternfly-react/commit/99d8d975eeb2d562357cdcaa37502748d5794564))
63+
64+
## 7.1.1-prerelease.8 (2023-09-21)
65+
66+
**Note:** Version bump only for package @patternfly/react-charts
67+
2268
## [7.1.1-prerelease.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-18)
2369

2470
**Note:** Version bump only for package @patternfly/react-charts

packages/react-charts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ yarn test packages/react-charts
8989
```
9090

9191
[patternfly-4]: https://github.com/patternfly/patternfly
92-
[docs]: https://patternfly-react.surge.sh/
92+
[docs]: https://react-staging.patternfly.org/

packages/react-charts/src/components/Chart/Chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ export const Chart: React.FunctionComponent<ChartProps> = ({
627627
// Callback to compliment legendAllowWrap
628628
const computedLegend = getLegend();
629629
useEffect(() => {
630-
if (typeof legendAllowWrap === 'function') {
630+
if (computedLegend?.props && typeof legendAllowWrap === 'function') {
631631
const extraHeight = getLegendItemsExtraHeight({
632632
legendData: computedLegend.props.data,
633633
legendOrientation: computedLegend.props.orientation,

packages/react-charts/src/components/ChartPie/ChartPie.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ export const ChartPie: React.FunctionComponent<ChartPieProps> = ({
651651
// Callback to compliment legendAllowWrap
652652
const computedLegend = getLegend();
653653
useEffect(() => {
654-
if (typeof legendAllowWrap === 'function') {
654+
if (computedLegend?.props && typeof legendAllowWrap === 'function') {
655655
const extraHeight = getLegendItemsExtraHeight({
656656
legendData: computedLegend.props.data,
657657
legendOrientation: computedLegend.props.orientation,

packages/react-charts/src/components/ResizeObserver/examples/resizeObserver.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,24 @@ class MultiColorChart extends React.Component {
161161
this.setState({ width: this.containerRef.current.clientWidth });
162162
}
163163
};
164+
this.handleLegendAllowWrap = (extraHeight) => {
165+
if (extraHeight !== this.state.extraHeight) {
166+
this.setState({ extraHeight });
167+
}
168+
}
169+
this.getHeight = (baseHeight) => {
170+
const { extraHeight } = this.state;
171+
return baseHeight + extraHeight;
172+
};
173+
this.getPadding = () => {
174+
const { extraHeight } = this.state;
175+
return {
176+
bottom: 100 + extraHeight, // Adjusted to accomodate legend
177+
left: 50,
178+
right: 50,
179+
top: 50,
180+
};
181+
};
164182
}
165183

166184
componentDidMount() {
@@ -174,11 +192,11 @@ class MultiColorChart extends React.Component {
174192

175193
render() {
176194
const { width } = this.state;
177-
const itemsPerRow = width > 650 ? 4 : 2;
195+
const height = this.getHeight(250);
178196

179197
return (
180198
<div ref={this.containerRef}>
181-
<div style={{ height: '250px' }}>
199+
<div style={{ height: height + 'px' }}>
182200
<Chart
183201
ariaDesc="Average number of pets"
184202
ariaTitle="Area chart example"
@@ -188,32 +206,27 @@ class MultiColorChart extends React.Component {
188206
constrainToVisibleArea
189207
/>
190208
}
209+
legendAllowWrap={this.handleLegendAllowWrap}
191210
legendPosition="bottom-left"
192211
legendComponent={
193212
<ChartLegend
194213
data={[
195214
{ name: 'Cats' },
196-
{ name: 'Birds' },
197215
{
198216
name: 'Cats Threshold',
199217
symbol: { fill: chart_color_blue_300.var, type: 'threshold' }
200218
},
219+
{ name: 'Birds' },
201220
{
202221
name: 'Birds Threshold',
203222
symbol: { fill: chart_color_orange_300.var, type: 'threshold' }
204223
}
205224
]}
206-
itemsPerRow={itemsPerRow}
207225
/>
208226
}
209-
height={250}
227+
height={height}
210228
name="chart2"
211-
padding={{
212-
bottom: 100, // Adjusted to accomodate legend
213-
left: 50,
214-
right: 50,
215-
top: 50
216-
}}
229+
padding={this.getPadding()}
217230
maxDomain={{ y: 9 }}
218231
themeColor={ChartThemeColor.multiUnordered}
219232
width={width}

packages/react-code-editor/CHANGELOG.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,134 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
4545

4646
**Note:** Version bump only for package @patternfly/react-code-editor
4747

48+
# [5.2.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-30)
49+
50+
**Note:** Version bump only for package @patternfly/react-code-editor
51+
52+
# [5.2.0-prerelease.18](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-27)
53+
54+
**Note:** Version bump only for package @patternfly/react-code-editor
55+
56+
# [5.2.0-prerelease.17](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-27)
57+
58+
**Note:** Version bump only for package @patternfly/react-code-editor
59+
60+
# [5.2.0-prerelease.16](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-27)
61+
62+
**Note:** Version bump only for package @patternfly/react-code-editor
63+
64+
# [5.2.0-prerelease.15](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-26)
65+
66+
**Note:** Version bump only for package @patternfly/react-code-editor
67+
68+
# [5.2.0-prerelease.14](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-23)
69+
70+
**Note:** Version bump only for package @patternfly/react-code-editor
71+
72+
# [5.2.0-prerelease.13](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-20)
73+
74+
**Note:** Version bump only for package @patternfly/react-code-editor
75+
76+
# [5.2.0-prerelease.12](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-18)
77+
78+
**Note:** Version bump only for package @patternfly/react-code-editor
79+
80+
# [5.2.0-prerelease.11](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-17)
81+
82+
**Note:** Version bump only for package @patternfly/react-code-editor
83+
84+
# [5.2.0-prerelease.10](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-16)
85+
86+
**Note:** Version bump only for package @patternfly/react-code-editor
87+
88+
# [5.2.0-prerelease.9](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-16)
89+
90+
**Note:** Version bump only for package @patternfly/react-code-editor
91+
92+
# [5.2.0-prerelease.8](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-16)
93+
94+
**Note:** Version bump only for package @patternfly/react-code-editor
95+
96+
# [5.2.0-prerelease.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-16)
97+
98+
**Note:** Version bump only for package @patternfly/react-code-editor
99+
100+
# [5.2.0-prerelease.6](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-12)
101+
102+
**Note:** Version bump only for package @patternfly/react-code-editor
103+
104+
# [5.2.0-prerelease.5](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-10)
105+
106+
**Note:** Version bump only for package @patternfly/react-code-editor
107+
108+
# [5.2.0-prerelease.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-10)
109+
110+
**Note:** Version bump only for package @patternfly/react-code-editor
111+
112+
# [5.2.0-prerelease.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-10)
113+
114+
**Note:** Version bump only for package @patternfly/react-code-editor
115+
116+
# 5.2.0-prerelease.2 (2023-10-09)
117+
118+
**Note:** Version bump only for package @patternfly/react-code-editor
119+
120+
# [5.2.0-prerelease.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-09)
121+
122+
### Bug Fixes
123+
124+
- **CodeEditor:** hide button and link when read-only ([#9668](https://github.com/patternfly/patternfly-react/issues/9668)) ([0346933](https://github.com/patternfly/patternfly-react/commit/0346933cb61a3b11a2591acbde4760f58abffbcb))
125+
126+
# [5.2.0-prerelease.0](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-05)
127+
128+
**Note:** Version bump only for package @patternfly/react-code-editor
129+
130+
## [5.1.1](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-05)
131+
132+
**Note:** Version bump only for package @patternfly/react-code-editor
133+
134+
## 5.1.1-prerelease.23 (2023-10-03)
135+
136+
### Bug Fixes
137+
138+
- whitespace changes to trigger prereleases ([#9702](https://github.com/patternfly/patternfly-react/issues/9702)) ([741c248](https://github.com/patternfly/patternfly-react/commit/741c24825b503e116c77cf304aa3e4e3a9ff7841))
139+
140+
## [5.1.1-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-25)
141+
142+
**Note:** Version bump only for package @patternfly/react-code-editor
143+
144+
## [5.1.1-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-25)
145+
146+
**Note:** Version bump only for package @patternfly/react-code-editor
147+
148+
## [5.1.1-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-22)
149+
150+
**Note:** Version bump only for package @patternfly/react-code-editor
151+
152+
## [5.1.1-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-21)
153+
154+
**Note:** Version bump only for package @patternfly/react-code-editor
155+
156+
## [5.1.1-prerelease.18](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-21)
157+
158+
**Note:** Version bump only for package @patternfly/react-code-editor
159+
160+
## [5.1.1-prerelease.17](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-21)
161+
162+
**Note:** Version bump only for package @patternfly/react-code-editor
163+
164+
## [5.1.1-prerelease.16](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-21)
165+
166+
**Note:** Version bump only for package @patternfly/react-code-editor
167+
168+
## [5.1.1-prerelease.15](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-21)
169+
170+
**Note:** Version bump only for package @patternfly/react-code-editor
171+
172+
## [5.1.1-prerelease.14](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-20)
173+
174+
**Note:** Version bump only for package @patternfly/react-code-editor
175+
48176
## [5.1.1-prerelease.13](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-09-19)
49177

50178
### Bug Fixes

0 commit comments

Comments
 (0)