From 0eac2da1f37a828110fbc476bab0afd65fae06e3 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 26 Oct 2022 11:36:38 +0100 Subject: [PATCH] Add changelogs for internal refactorings using inert (#45269) --- 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 0404caf2eda2e3..abebbf294e609d 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -39,6 +39,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 98ad10e202737a..cedcdad872701f 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 0d9a9d093588a3..042758eda8484d 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)