Skip to content

Commit

Permalink
Upgrade Reakit to stable v1.0.0 (#22352)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegohaz authored May 14, 2020
1 parent ead98ed commit 196d8ce
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"re-resizable": "^6.0.0",
"react-dates": "^17.1.1",
"react-spring": "^8.0.20",
"reakit": "^1.0.0-rc.2",
"reakit": "^1.0.2",
"rememo": "^3.0.0",
"tinycolor2": "^1.4.1",
"uuid": "^7.0.2"
Expand Down
4 changes: 0 additions & 4 deletions packages/components/src/alignment-matrix-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ export default function AlignmentMatrixControl( {
key={ cell }
value={ cell }
onFocus={ () => handleOnChange( cell ) }
onClick={ () =>
// VoiceOver doesn't focus elements on click
composite.move( cellId )
}
/>
);
} ) }
Expand Down
14 changes: 10 additions & 4 deletions packages/components/src/alignment-matrix-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import { render, unmountComponentAtNode } from 'react-dom';
import { act, Simulate } from 'react-dom/test-utils';
import { act } from 'react-dom/test-utils';

/**
* Internal dependencies
Expand Down Expand Up @@ -69,15 +69,21 @@ describe( 'AlignmentMatrixControl', () => {

const cells = getCells();

act( () => Simulate.click( cells[ 3 ] ) );
act( () => {
cells[ 3 ].focus();
} );

expect( spy.mock.calls[ 0 ][ 0 ] ).toBe( 'center left' );

act( () => Simulate.click( cells[ 4 ] ) );
act( () => {
cells[ 4 ].focus();
} );

expect( spy.mock.calls[ 1 ][ 0 ] ).toBe( 'center center' );

act( () => Simulate.click( cells[ 7 ] ) );
act( () => {
cells[ 7 ].focus();
} );

expect( spy.mock.calls[ 2 ][ 0 ] ).toBe( 'bottom center' );
} );
Expand Down
6 changes: 1 addition & 5 deletions packages/components/src/toolbar-item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ function ToolbarItem( { children, ...props }, ref ) {

return (
<BaseToolbarItem { ...accessibleToolbarState } { ...allProps }>
{ ( htmlProps ) =>
// Overwriting BaseToolbarItem's onMouseDown since it disables drag
// and drop
children( { ...htmlProps, onMouseDown: allProps.onMouseDown } )
}
{ children }
</BaseToolbarItem>
);
}
Expand Down

0 comments on commit 196d8ce

Please sign in to comment.