Skip to content
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

Rebase v6 branch #9832

Merged
merged 42 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d7308ae
fix(RTL): added right-to-left page demo (#9694)
mcoker Nov 2, 2023
e9f0b21
chore(release): releasing packages [ci skip]
patternfly-build Nov 2, 2023
4d4d623
fix(Wizard): onStepChange - skip isDisabled & isHidden (#9748)
jpuzz0 Nov 2, 2023
7f6a62c
fix(Text input): Added aria-expanded (#9705)
tlabaj Nov 2, 2023
bc19f91
fix(Notification Drawer): Added screen reader text for notification d…
tlabaj Nov 2, 2023
9f21cee
feat(Wizard): ability to add props to WizardFooter buttons (#9709)
adamviktora Nov 2, 2023
7eff077
chore(Divider): update tests to new standards (#9714)
mfrances17 Nov 2, 2023
4f459eb
chore(release): releasing packages [ci skip]
patternfly-build Nov 2, 2023
a772c6d
fix(TreeView): define button type (#9770)
kmcfaul Nov 2, 2023
817e9bd
bug(build): fixed built ESM files importing CJS files from react-styl…
wise-king-sullyman Nov 2, 2023
5febe85
chore(release): releasing packages [ci skip]
patternfly-build Nov 2, 2023
fc2907d
chore(deps): update dependency @patternfly/patternfly to v5.2.0-prere…
renovate[bot] Nov 3, 2023
559e6fd
chore(release): releasing packages [ci skip]
patternfly-build Nov 3, 2023
ab18059
feat(Datalist): implement full page Basic demo to match HTML #9048 (#…
Kells512 Nov 3, 2023
981361e
fix(ClipboardCopy): kepp caret position (#9772)
adamviktora Nov 3, 2023
74773b0
chore(release): releasing packages [ci skip]
patternfly-build Nov 3, 2023
b3345c2
chore(deps): update devdependencies (#9757)
renovate[bot] Nov 6, 2023
3131ff6
chore(deps): update dependency @patternfly/patternfly to v5.2.0-prere…
renovate[bot] Nov 10, 2023
93db0ff
chore(deps): update devdependencies (#9800)
renovate[bot] Nov 10, 2023
75442bf
chore(release): releasing packages [ci skip]
patternfly-build Nov 10, 2023
a12cf31
fix(DatePicker): updated logic for parsing and focus management (#9794)
thatblindgeye Nov 13, 2023
9dccfa9
chore(release): releasing packages [ci skip]
patternfly-build Nov 13, 2023
bf96edb
chore(PrimaryDetail): convert demos to TS (#9787)
jenny-s51 Nov 14, 2023
42fd765
chore(release): releasing packages [ci skip]
patternfly-build Nov 14, 2023
705e9ff
chore(misc): clean up instances of Array.apply (#9798)
jenny-s51 Nov 14, 2023
e96ac1d
chore(release): releasing packages [ci skip]
patternfly-build Nov 14, 2023
9b9622d
chore(eslint): Added React Testing Library linter plugin (#9805)
wise-king-sullyman Nov 14, 2023
4f123b1
chore(release): releasing packages [ci skip]
patternfly-build Nov 14, 2023
2a70043
chore(DataList): update tests (#9672)
kmcfaul Nov 15, 2023
a414253
bug(ClipboardCopy): change children type to string (#9743)
gitdallas Nov 15, 2023
88e1c34
chore(deps): update devdependencies (#9817)
renovate[bot] Nov 15, 2023
4b23675
fix Search Input - composable advanced search demo (#9484)
MariaAga Nov 15, 2023
a7075e0
docs(custom menu): add example with search input inline filtering (#9…
adamviktora Nov 15, 2023
a816ddd
chore(HelperText): update tests (#9761)
kmcfaul Nov 15, 2023
18c140a
fix(Chip): update tooltip vis when chip updates (#9819)
kmcfaul Nov 16, 2023
b957f2f
chore(DescriptionList): update tests (#9753)
kmcfaul Nov 16, 2023
e112034
chore(release): releasing packages [ci skip]
patternfly-build Nov 16, 2023
7d2fd26
chore(TreeView): updated tests (#9773)
thatblindgeye Nov 16, 2023
feeb331
chore(Table) convert demos to ts (#9621)
Dominik-Petrik Nov 17, 2023
3fa692c
chore(release): releasing packages [ci skip]
patternfly-build Nov 17, 2023
fc8f6eb
chore(deps): update devdependencies (#9829)
renovate[bot] Nov 20, 2023
c6b20d1
chore(rebase v6): Rebase v6 branch
tlabaj Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Javascript builds
node_modules
dist
__tests__
thirdparty
tsc_out
.out
Expand Down
9 changes: 9 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@
"rules": {
"patternfly-react/no-anonymous-functions": "off"
}
},
{
"files": ["**/*.test.[jt]s?(x)"],
"extends": ["plugin:testing-library/react"],
"rules": {
"testing-library/no-node-access": "off",
"react/jsx-key": "off",
"no-console": "off"
}
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock', 'packages/*/package.json') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
],
roots: ['<rootDir>/packages'],
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
'^.+\\.m?[jt]sx?$': 'babel-jest',
'^.+\\.svg$': 'jest-transform-stub'
},
setupFilesAfterEnv: ['<rootDir>/packages/testSetup.ts'],
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "14.5.1",
"@types/jest": "29.5.5",
"@types/jest": "29.5.8",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^5.59.2",
Expand All @@ -50,6 +50,7 @@
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-testing-library": "^6.1.0",
"fs-extra": "^11.1.1",
"glob": "^9.3.0",
"husky": "^4.3.0",
Expand All @@ -64,7 +65,8 @@
"react-dom": "^18",
"surge": "^0.23.1",
"ts-patch": "^2.1.0",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"ts-node": "^10.9.1"
},
"scripts": {
"build": "yarn clean && yarn build:generate && yarn build:esm && yarn build:cjs && yarn build:subpaths && yarn build:single:packages",
Expand All @@ -84,6 +86,7 @@
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache",
"lint:ts": "yarn lint packages/*/src",
"lint:versions": "node scripts/verifyPatternflyVersions.js",
"lint:tests": "yarn lint packages/*/src/components/*/__tests__/*.test.*",
"prepare": "ts-patch install -s",
"serve:docs": "yarn workspace @patternfly/react-docs serve",
"serve:integration": "lerna run serve:demo-app",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-charts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

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

# 7.2.0-prerelease.7 (2023-11-10)

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

# 7.2.0-prerelease.6 (2023-11-03)

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

# 7.2.0-prerelease.5 (2023-10-26)

**Note:** Version bump only for package @patternfly/react-charts
Expand Down
48 changes: 48 additions & 0 deletions packages/react-code-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,54 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

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

# [5.2.0-prerelease.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-17)

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

# [5.2.0-prerelease.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-16)

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

# [5.2.0-prerelease.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.28](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-13)

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

# [5.2.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-10)

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

# [5.2.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-03)

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

# [5.2.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-03)

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

# [5.2.0-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

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

# [5.2.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

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

# [5.2.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

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

# [5.2.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-30)

**Note:** Version bump only for package @patternfly/react-code-editor
Expand Down
70 changes: 70 additions & 0 deletions packages/react-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,76 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

- **Drawer:** Added start and end to position props, updated resizing to work with RTL ([#9627](https://github.com/patternfly/patternfly-react/issues/9627)) ([e12b872](https://github.com/patternfly/patternfly-react/commit/e12b8726b9ebc2fec921b7316a270a9c09decf96))

# [5.2.0-prerelease.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-17)

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

# [5.2.0-prerelease.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-16)

### Bug Fixes

- **Chip:** update tooltip vis when chip updates ([#9819](https://github.com/patternfly/patternfly-react/issues/9819)) ([18c140a](https://github.com/patternfly/patternfly-react/commit/18c140a2adcc1833e4b095755aa7495d1d88a177))

# [5.2.0-prerelease.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.28](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-14)

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

# [5.2.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-13)

### Bug Fixes

- **DatePicker:** updated logic for parsing and focus management ([#9794](https://github.com/patternfly/patternfly-react/issues/9794)) ([a12cf31](https://github.com/patternfly/patternfly-react/commit/a12cf313f0924a61a8cf20ee78b4b27290b9c05f))

# [5.2.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-10)

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

# [5.2.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-03)

### Bug Fixes

- **ClipboardCopy:** kepp caret position ([#9772](https://github.com/patternfly/patternfly-react/issues/9772)) ([981361e](https://github.com/patternfly/patternfly-react/commit/981361e0de354bbe06c4a799b6e7c92228dab51f))

### Features

- **Datalist:** implement full page Basic demo to match HTML [#9048](https://github.com/patternfly/patternfly-react/issues/9048) ([#9087](https://github.com/patternfly/patternfly-react/issues/9087)) ([ab18059](https://github.com/patternfly/patternfly-react/commit/ab1805993ed5e2b5ed3d2f1be4131e035152b468))

# [5.2.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-03)

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

# [5.2.0-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

### Bug Fixes

- **TreeView:** define button type ([#9770](https://github.com/patternfly/patternfly-react/issues/9770)) ([a772c6d](https://github.com/patternfly/patternfly-react/commit/a772c6d67bfa4154979ee14a34ec954406503109))

# [5.2.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

### Bug Fixes

- **Notification Drawer:** Added screen reader text for notification drawer item read state ([#9569](https://github.com/patternfly/patternfly-react/issues/9569)) ([bc19f91](https://github.com/patternfly/patternfly-react/commit/bc19f9148e872fb62d8cd2bf644a771d9c5650d7))
- **Text input:** Added aria-expanded ([#9705](https://github.com/patternfly/patternfly-react/issues/9705)) ([7f6a62c](https://github.com/patternfly/patternfly-react/commit/7f6a62c1a3f860a8759c63cde17da6b763dd7b48))
- **Wizard:** onStepChange - skip isDisabled & isHidden ([#9748](https://github.com/patternfly/patternfly-react/issues/9748)) ([4d4d623](https://github.com/patternfly/patternfly-react/commit/4d4d623d294bbc7821c6dc9156980f2b8c609c96))

### Features

- **Wizard:** ability to add props to WizardFooter buttons ([#9709](https://github.com/patternfly/patternfly-react/issues/9709)) ([9f21cee](https://github.com/patternfly/patternfly-react/commit/9f21cee5438c8ec4d0e2c5c938f9fffda013757b))

# [5.2.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-11-02)

### Bug Fixes

- **RTL:** added right-to-left page demo ([#9694](https://github.com/patternfly/patternfly-react/issues/9694)) ([d7308ae](https://github.com/patternfly/patternfly-react/commit/d7308aebec1e3ff22df548b5613f058c9ba35262))

# [5.2.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-10-30)

**Note:** Version bump only for package @patternfly/react-core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { render } from '@testing-library/react';
import { AboutModalBox } from '../AboutModalBox';

test('AboutModalBox Test', () => {
const { asFragment } = render(
<AboutModalBox aria-labelledby="id">
This is a AboutModalBox
</AboutModalBox>
);
const { asFragment } = render(<AboutModalBox aria-labelledby="id">This is a AboutModalBox</AboutModalBox>);
expect(asFragment()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ test('Renders children', () => {
});

test('Matches the snapshot', () => {
const { asFragment } = render(
<AccordionItem>Test</AccordionItem>
);
const { asFragment } = render(<AccordionItem>Test</AccordionItem>);
expect(asFragment()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test('Alert Group renders without children', () => {
});

test('Alert Group works with n children', () => {
const { asFragment } = render(
render(
<AlertGroup data-testid="container">
<Alert variant="success" title="alert title" />
<Alert variant="warning" title="another alert title" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ test('Clicking backToTop scrolls back to top of the element passed via scrollabl
const user = userEvent.setup();
const wrapper = document.getElementById('backToTopWrapper');
fireEvent.scroll(wrapper as HTMLElement, { target: { scrollY: 401 } });
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
wrapper!.scrollTo = jest.fn();
await user.click(screen.getByRole(`button`).parentElement as Element);

expect(wrapper?.scrollTo).toBeCalledTimes(1);
expect(wrapper?.scrollTo).toHaveBeenCalledTimes(1);
});

test('Passes correct text content to button child component', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import styles from '@patternfly/react-styles/css/components/Button/button';
import { css } from '@patternfly/react-styles';
import { Spinner, spinnerSize } from '../Spinner';
import { useOUIAProps, OUIAProps } from '../../helpers';
import { useOUIAProps, OUIAProps } from '../../helpers/OUIA/ouia';
import { Badge } from '../Badge';

export enum ButtonVariant {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';

import { render, screen } from '@testing-library/react';

import CartArrowDownIcon from '@patternfly/react-icons/dist/esm/icons/cart-arrow-down-icon';
import { Button, ButtonVariant } from '../Button';

Object.values(ButtonVariant).forEach((variant) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ test('Next year dates have correct year in aria label', () => {
});

test('InlineProps render correct wrapper component and attributes', () => {
render(<CalendarMonth inlineProps={{component: 'article', title: <div id="hi">Title</div>, ariaLabelledby: "hi"}} />);
render(
<CalendarMonth inlineProps={{ component: 'article', title: <div id="hi">Title</div>, ariaLabelledby: 'hi' }} />
);

const article = screen.getByRole('article');
expect(article).toHaveAttribute('aria-labelledby', 'hi');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('CardBody', () => {
test('allows passing in a React Component as the component', () => {
const Component = () => <div>im a div</div>;

render(<CardBody component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
render(<CardBody component={Component as unknown as keyof JSX.IntrinsicElements} />);
expect(screen.getByText('im a div')).toBeInTheDocument();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('CardFooter', () => {

test('allows passing in a React Component as the component', () => {
const Component = () => <div>im a div</div>;
render(<CardFooter component={(Component as unknown) as keyof JSX.IntrinsicElements} />);
render(<CardFooter component={Component as unknown as keyof JSX.IntrinsicElements} />);
expect(screen.getByText('im a div')).toBeInTheDocument();
});
});
11 changes: 11 additions & 0 deletions packages/react-core/src/components/Chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ class Chip extends React.Component<ChipProps, ChipState> {
});
}

componentDidUpdate(_prevProps: ChipProps, prevState: ChipState) {
const nextIsTooltipVisible = Boolean(
this.span.current && this.span.current.offsetWidth < this.span.current.scrollWidth
);
if (prevState.isTooltipVisible !== nextIsTooltipVisible) {
this.setState({
isTooltipVisible: nextIsTooltipVisible
});
}
}

setChipStyle = () => ({
[cssChipTextMaxWidth.name]: this.props.textMaxWidth
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ test('chip group with closeBtnAriaLabel', () => {
</ChipGroup>
);
expect(screen.getByLabelText('close button aria label')).toBeInTheDocument();
expect(screen.getByLabelText('close button aria label')).toHaveAccessibleName("close button aria label category");
expect(screen.getByLabelText('close button aria label')).toHaveAccessibleName('close button aria label category');
});

test('chip group onClick', async () => {
Expand Down Expand Up @@ -169,8 +169,6 @@ test('chip group expanded', async () => {
});

test('overflow chip does not render by default when < 4 children are passed', async () => {
const user = userEvent.setup();

render(
<ChipGroup>
<Chip>1</Chip>
Expand All @@ -183,8 +181,6 @@ test('overflow chip does not render by default when < 4 children are passed', as
});

test('overflow chip collapsed by default', async () => {
const user = userEvent.setup();

render(
<ChipGroup>
<Chip>1</Chip>
Expand Down
Loading
Loading