-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a Submenu block for use in Navigation (#33775)
* Add a Dropdown block for use in Navigation * display dropdowns below buttons in editor * Add open on click functionality. * Adjustments to click behaviour. * Fix submenu logic * Transform nav links to submenus * Change block name to Submenu and update classnames * Add submenu transform to navigation link. * Remove button default styling * Don't split at end. * Add block fixture. * Fix php lint errors. * Update submenu icon classname. * Use Submenu in Page List conversion to blocks. * Don't lose children when transforming to Submenu. * Fix link conversion in Page List block. * Add link to empty submenu and default navigation class. * Introduce hover/click toggle on Navigation. * Don't add link in submenu straightaway. * Open link control on parent element when hover is set. * Always show icons when opening on click. * Open submenus on click in the editor. * Fix button styles and change toggle label. * Update navigation fixture and fix php lint errors. * Fix php lint error. * Fix php lint error. * Try hiding submenu in block inserter. * Update menu items to blocks conversion. * Update menu items to blocks test. * Fix navigation link top level item status. * Update and add new e2e test for open on click. * Fix undo/redo trap. * Fix styling for nested submenus in the editor. * Remove obsolete lint ignore * Display block label in list view. * Fix dropdown z-index * Switch toggle position * Pointer cursor on button toggles. * Fix max nesting and top level link logic. * Show in inserter.
- Loading branch information
1 parent
3fab78d
commit 6be8b7d
Showing
31 changed files
with
1,477 additions
and
83 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"apiVersion": 2, | ||
"name": "core/navigation-submenu", | ||
"title": "Submenu", | ||
"category": "design", | ||
"parent": [ | ||
"core/navigation" | ||
], | ||
"description": "Add a submenu to your navigation.", | ||
"textdomain": "default", | ||
"attributes": { | ||
"label": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"rel": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "number" | ||
}, | ||
"opensInNewTab": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"kind": { | ||
"type": "string" | ||
}, | ||
"isTopLevelItem": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"usesContext": [ | ||
"textColor", | ||
"customTextColor", | ||
"backgroundColor", | ||
"customBackgroundColor", | ||
"overlayTextColor", | ||
"customOverlayTextColor", | ||
"overlayBackgroundColor", | ||
"customOverlayBackgroundColor", | ||
"fontSize", | ||
"customFontSize", | ||
"showSubmenuIcon", | ||
"openSubmenusOnClick", | ||
"style" | ||
], | ||
"supports": { | ||
"reusable": false, | ||
"html": false | ||
}, | ||
"viewScript": "file:./view.min.js", | ||
"editorStyle": "wp-block-navigation-submenu-editor", | ||
"style": "wp-block-navigation-submenu" | ||
} |
Oops, something went wrong.