-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NavigationMenu: <LinkControl /> integration. (#18062)
* link-control: doc * navigation-menu-item: replace URLPopover by LinkControl * navigation-menu: do not set link when onClose * navigation-menu-item: ensuring hide popover once it closes * navigation-menu-item: anchor LinkControl at TextControl * navigation-menu-item: render external link * navigation-menu-item: remove link object from attrs * navigation-menu-item: handing close link popover * navigation-menu: apply colors correctly in edition mode * navigation-menu: set text color to external link * navigation-menu-item: apply text color to external link * fixing eslint errors/warnings * fix camelcase warning flawlessly props to @getdave * navigation-menu-item: set current link as null when it changes * link-control: doc fixes * Updates setting change handler to test for specific setting and value Addresses #18062 (comment) * Remove hyperlinks from nav item labels Addresses #18062 (comment) * Update attribute name Addresses #18062 (comment) * Fix save output to handle new tab attribute Addresses #18062 (comment) * Update to simplify link update with default args Addresses #18062 (comment) * Remove content accidentally re-added in merge of rebase * navigation-menu-item: set title as label when it's empty * navigation-menu-item: open LinkControl when new item * navigation-menu-item: new item workflow open link control and show fake placeholder when it's a new iotem * navigation-menu: rename state hook * navigation-menu-item: use camelCase for link ID * navigation-menu-item: set edit mode style * navigation-menu-item: remove fake placeholder stuff * navigation-menu-item: no use effect to Initialize is open state * navigation-menu-item: remove unneeded setting state * navigation-menu-item: move link control callback outside of the component rendering * navigation-menu-item: simplify closing linkcontrol It adds a hacky solution to deal with both events that happen at the same time: LinkControl.onClose and ToolbatButton.onClick, removing the useState ussage in favor adding a setTimeout call. * navigation-menu: fixing eslint errors * Update packages/block-library/src/navigation-menu-item/edit.js Co-Authored-By: Daniel Richards <[email protected]> * Update packages/block-library/src/navigation-menu-item/edit.js Co-Authored-By: Daniel Richards <[email protected]> * Fixes bug where Link UI was visually divorced from target Menu Item Addresses #18062 (comment) * Updates to remove unwanted prop being passed to LinkControl `fetchSearchSuggestions` seems to have been accidentally re-added. It’s not required. Addresses #18062 (comment) * navigation-menu: remove `destination` attr * navigation-menu-item: cleanup timer once unmount
- Loading branch information
Showing
6 changed files
with
168 additions
and
82 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