-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1033 from publishpress/release-4.1.1
Release 4.1.1
- Loading branch information
Showing
35 changed files
with
1,496 additions
and
1,418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 5 additions & 14 deletions
19
assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 23 additions & 30 deletions
53
assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/item.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,45 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { | ||
Button, | ||
__unstableCompositeItem as CompositeItem, | ||
} from '@wordpress/components'; | ||
import { forwardRef, useContext } from '@wordpress/element'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import InserterListboxContext from './context'; | ||
import { Button, Composite } from '@wordpress/components'; | ||
import { forwardRef } from '@wordpress/element'; | ||
|
||
function InserterListboxItem( | ||
{ isFirst, as: Component, children, ...props }, | ||
ref | ||
) { | ||
const state = useContext(InserterListboxContext); | ||
return ( | ||
<CompositeItem | ||
ref={ref} | ||
state={state} | ||
<Composite.Item | ||
ref={ ref } | ||
role="option" | ||
// Use the CompositeItem `focusable` prop over Button's | ||
// isFocusable. The latter was shown to cause an issue | ||
// with tab order in the inserter list. | ||
focusable | ||
{...props} | ||
> | ||
{(htmlProps) => { | ||
// Use the Composite.Item `accessibleWhenDisabled` prop | ||
// over Button's `isFocusable`. The latter was shown to | ||
// cause an issue with tab order in the inserter list. | ||
accessibleWhenDisabled | ||
{ ...props } | ||
render={ ( htmlProps ) => { | ||
const propsWithTabIndex = { | ||
...htmlProps, | ||
tabIndex: isFirst ? 0 : htmlProps.tabIndex, | ||
}; | ||
if (Component) { | ||
if ( Component ) { | ||
return ( | ||
<Component {...propsWithTabIndex}> | ||
{children} | ||
<Component { ...propsWithTabIndex }> | ||
{ children } | ||
</Component> | ||
); | ||
} | ||
if (typeof children === 'function') { | ||
return children(propsWithTabIndex); | ||
if ( typeof children === 'function' ) { | ||
return children( propsWithTabIndex ); | ||
} | ||
return <Button {...propsWithTabIndex}>{children}</Button>; | ||
}} | ||
</CompositeItem> | ||
return ( | ||
<Button __next40pxDefaultSize { ...propsWithTabIndex }> | ||
{ children } | ||
</Button> | ||
); | ||
} } | ||
/> | ||
); | ||
} | ||
|
||
export default forwardRef(InserterListboxItem); | ||
export default forwardRef( InserterListboxItem ); |
23 changes: 5 additions & 18 deletions
23
assets/jsx/workflow-editor/components/secondary-sidebar/inserter-listbox/row.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { forwardRef, useContext } from '@wordpress/element'; | ||
import { __unstableCompositeGroup as CompositeGroup } from '@wordpress/components'; | ||
import { forwardRef } from '@wordpress/element'; | ||
import { Composite } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import InserterListboxContext from './context'; | ||
|
||
function InserterListboxRow(props, ref) { | ||
const state = useContext(InserterListboxContext); | ||
return ( | ||
<CompositeGroup | ||
state={state} | ||
role="presentation" | ||
ref={ref} | ||
{...props} | ||
/> | ||
); | ||
function InserterListboxRow( props, ref ) { | ||
return <Composite.Group role="presentation" ref={ ref } { ...props } />; | ||
} | ||
|
||
export default forwardRef(InserterListboxRow); | ||
export default forwardRef( InserterListboxRow ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.