Skip to content

Commit

Permalink
Removing Reakit as a dependency (#58631)
Browse files Browse the repository at this point in the history
Co-authored-by: andrewhayward <andrewhayward@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: diegohaz <hazdiego@git.wordpress.org>
  • Loading branch information
5 people authored Feb 5, 2024
1 parent 2cc3c3f commit 280084e
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 124 deletions.
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ const restrictedImports = [
name: 'lodash',
message: 'Please use native functionality instead.',
},
{
name: 'reakit',
message:
'Please use Reakit API through `@wordpress/components` instead.',
},
{
name: '@ariakit/react',
message:
Expand Down
111 changes: 0 additions & 111 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
### Internal

- `Composite`: Removing Reakit `Composite` implementation ([#58620](https://github.com/WordPress/gutenberg/pull/58620)).
- Removing Reakit as a dependency of the components package ([#58631](https://github.com/WordPress/gutenberg/pull/58631)).

## 25.16.0 (2024-01-24)

Expand Down
1 change: 0 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"path-to-regexp": "^6.2.1",
"re-resizable": "^6.4.0",
"react-colorful": "^5.3.1",
"reakit": "^1.3.11",
"remove-accents": "^0.5.0",
"use-lilius": "^2.0.1",
"uuid": "^9.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/composite/v2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Until we migrate away from Reakit, the 'current'
// Ariakit implementation is considered a v2.
// Although we have migrated away from Reakit, the 'current'
// Ariakit implementation is still considered a v2.

export * from './current';
2 changes: 1 addition & 1 deletion packages/components/src/context/wordpress-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import type * as React from 'react';

// Based on https://github.com/reakit/reakit/blob/master/packages/reakit-utils/src/types.ts
// Based on https://github.com/ariakit/ariakit/blob/reakit/packages/reakit-utils/src/types.ts
export type WordPressComponentProps<
/** Prop types. */
P,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ Divider's orientation. When using inside a flex container, you may need to make

### Inherited props

`Divider` also inherits all of the [`Separator` props](https://reakit.io/docs/separator/).
`Divider` also inherits all of the [`Separator` props](https://ariakit.org/reference/separator#optional-props).
2 changes: 1 addition & 1 deletion packages/components/src/utils/hooks/use-update-effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useRef, useEffect } from '@wordpress/element';
/**
* A `React.useEffect` that will not run on the first render.
* Source:
* https://github.com/reakit/reakit/blob/HEAD/packages/reakit-utils/src/useUpdateEffect.ts
* https://github.com/ariakit/ariakit/blob/reakit/packages/reakit-utils/src/useUpdateEffect.ts
*
* @param {import('react').EffectCallback} effect
* @param {import('react').DependencyList} deps
Expand Down
2 changes: 0 additions & 2 deletions packages/edit-site/src/components/page-patterns/grid-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ function GridItem( { categoryId, item, ...props } ) {
<li className={ patternClassNames }>
<button
className={ previewClassNames }
// Even though still incomplete, passing ids helps performance.
// @see https://reakit.io/docs/composite/#performance.
id={ `edit-site-patterns-${ item.name }` }
type="button"
{ ...props }
Expand Down

0 comments on commit 280084e

Please sign in to comment.