{
- if ( isLinkOpen && url ) {
+ if ( isLinkOpen && url && ! isExperimentalNavScreen ) {
// Does this look like a URL and have something TLD-ish?
if (
isURL( prependHTTP( label ) ) &&
@@ -264,6 +266,14 @@ function NavigationLinkEdit( {
return (
+ { isExperimentalNavScreen && isLinkOpen && (
+ setIsLinkOpen( false ) }
+ onChange={ ( args ) => setAttributes( args ) }
+ />
+ ) }
- { isLinkOpen && (
+ { ! isExperimentalNavScreen && isLinkOpen && (
setIsLinkOpen( false ) }
@@ -486,6 +496,11 @@ export default compose( [
getBlockParentsByBlockName( clientId, 'core/navigation' )
);
const navigationBlockAttributes = getBlockAttributes( rootBlock );
+ const isExperimentalNavScreen = get(
+ getSettings(),
+ '__experimentalNavigationScreen',
+ false
+ );
const colors = get( getSettings(), 'colors', [] );
const hasDescendants = !! getClientIdsOfDescendants( [ clientId ] )
.length;
@@ -502,6 +517,7 @@ export default compose( [
] )?.length;
return {
+ isExperimentalNavScreen,
isParentOfSelectedBlock,
isImmediateParentOfSelectedBlock,
hasDescendants,
diff --git a/packages/components/src/dropdown-menu/index.js b/packages/components/src/dropdown-menu/index.js
index 2525939403799d..07a4ee43a570e2 100644
--- a/packages/components/src/dropdown-menu/index.js
+++ b/packages/components/src/dropdown-menu/index.js
@@ -40,6 +40,7 @@ function DropdownMenu( {
icon = 'menu',
label,
popoverProps,
+ onToggle: dropdownOnToggle,
toggleProps,
menuProps,
disableOpenOnArrowDown = false,
@@ -86,6 +87,7 @@ function DropdownMenu( {
{
const openOnArrowDown = ( event ) => {
if ( disableOpenOnArrowDown ) {
diff --git a/packages/edit-navigation/src/index.js b/packages/edit-navigation/src/index.js
index bc858e2e964a67..20c1e6936d87e6 100644
--- a/packages/edit-navigation/src/index.js
+++ b/packages/edit-navigation/src/index.js
@@ -126,6 +126,8 @@ export function initialize( id, settings ) {
settings
);
+ settings.__experimentalNavigationScreen = true;
+
render(
,
document.getElementById( id )