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

Removing Reakit as a dependency #58631

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -31,6 +31,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
Loading