From a4807fd0b039acf6f2b53eaaed78d17308b08762 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 25 Oct 2022 09:24:54 +0100 Subject: [PATCH] Add changelogs for internal refactorings using inert --- packages/components/CHANGELOG.md | 1 + packages/components/src/disabled/test/index.tsx | 5 ----- packages/compose/CHANGELOG.md | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 1028c3cdbfa43..8a1ccbe334390 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -38,6 +38,7 @@ - `TabPanel`: updated to satisfy `react/exhaustive-deps` eslint rule ([#44935](https://github.com/WordPress/gutenberg/pull/44935)) - `ColorPalette`: Convert to TypeScript ([#44632](https://github.com/WordPress/gutenberg/pull/44632)). - `UnitControl`: Add tests ([#45260](https://github.com/WordPress/gutenberg/pull/45260)). +- `Disabled`: Refactor the component to rely on the HTML `inert` attribute. ## 21.3.0 (2022-10-19) diff --git a/packages/components/src/disabled/test/index.tsx b/packages/components/src/disabled/test/index.tsx index 98ad10e202737..cedcdad872701 100644 --- a/packages/components/src/disabled/test/index.tsx +++ b/packages/components/src/disabled/test/index.tsx @@ -24,7 +24,6 @@ describe( 'Disabled', () => { ); - // @ts-ignore expect( container.firstChild ).toHaveAttribute( 'inert' ); } ); @@ -40,12 +39,10 @@ describe( 'Disabled', () => { const { container, rerender } = render( ); - // @ts-ignore expect( container.firstChild ).toHaveAttribute( 'inert' ); rerender( ); - // @ts-ignore expect( container.firstChild ).not.toHaveAttribute( 'inert' ); } ); @@ -58,12 +55,10 @@ describe( 'Disabled', () => { const { rerender, container } = render( ); - // @ts-ignore expect( container.firstChild ).toHaveAttribute( 'inert' ); rerender( ); - // @ts-ignore expect( container.firstChild ).not.toHaveAttribute( 'inert' ); } ); diff --git a/packages/compose/CHANGELOG.md b/packages/compose/CHANGELOG.md index 0d9a9d093588a..042758eda8484 100644 --- a/packages/compose/CHANGELOG.md +++ b/packages/compose/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Internal + +- `useDisabled`: Refactor the component to rely on the HTML `inert` attribute. + ## 5.18.0 (2022-10-19) ## 5.17.0 (2022-10-05)