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

Fix intermittent RichText e2e test failure #20457

Merged
merged 4 commits into from
Feb 26, 2020
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
9 changes: 2 additions & 7 deletions packages/components/src/slot-fill/bubbles-virtually/slot.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* WordPress dependencies
*/
import {
useEffect,
useRef,
useLayoutEffect,
useContext,
} from '@wordpress/element';
import { useRef, useLayoutEffect, useContext } from '@wordpress/element';
import isShallowEqual from '@wordpress/is-shallow-equal';

/**
Expand All @@ -25,7 +20,7 @@ export default function Slot( {
const ref = useRef();
const slot = useSlot( name );

useEffect( () => {
useLayoutEffect( () => {
registry.registerSlot( name, ref, fillProps );
return () => {
registry.unregisterSlot( name, ref );
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/slot-fill/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ import { createContext, useContext } from '@wordpress/element';
*/
import { Slot, Fill, Provider } from '../';

export default { title: 'Components/SlotFill', component: Slot };
export default {
title: 'Components/SlotFill',
component: Slot,
parameters: {
storyshots: { disable: true },
},
};

export const _default = () => {
return (
Expand Down
50 changes: 0 additions & 50 deletions storybook/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7887,56 +7887,6 @@ exports[`Storyshots Components/ScrollLock Default 1`] = `
</div>
`;

exports[`Storyshots Components/SlotFill Default 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:
<span />
</p>,
<p>
Age:
<span />
</p>,
]
`;

exports[`Storyshots Components/SlotFill With Context 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:
<span />
</p>,
<p>
Age:
<span />
</p>,
]
`;

exports[`Storyshots Components/SlotFill With Fill Props 1`] = `
Array [
<h2>
Profile
</h2>,
<p>
Name:

<span />
</p>,
<p>
Age:

<span />
</p>,
]
`;

exports[`Storyshots Components/Snackbar Default 1`] = `
<div
className="components-snackbar"
Expand Down