-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Implement "Add block" UI for Nav block Link UI #57756
Changes from all commits
53ee18d
b77f221
45352f8
76b61bc
6d356c9
95fe6cf
f6be25d
b199be3
307521e
5db918f
c0114e9
6accbe7
6cb3ffe
a487e1f
8a4b390
2f27c7f
dc5c40f
891e969
38f60ca
a608a0d
75f40c5
eb2b568
616e5d5
c029c9a
63b5307
f85bb49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -563,7 +563,14 @@ export default function NavigationLinkEdit( { | |||
<LinkUI | ||||
clientId={ clientId } | ||||
link={ attributes } | ||||
onClose={ () => setIsLinkOpen( false ) } | ||||
onClose={ () => { | ||||
// If there is no link then remove the auto-inserted block. | ||||
// This avoids empty blocks which can provided a poor UX. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
if ( ! url ) { | ||||
// Need to handle refocusing the Nav block or the inserter? | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scruffian I'm sorry I missed this Todo 😢 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this solved? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I created a followup issue here: #58820 |
||||
onReplace( [] ); | ||||
} | ||||
} } | ||||
anchor={ popoverAnchor } | ||||
onRemove={ removeLink } | ||||
onChange={ ( updatedValue ) => { | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this component has always been private I've continued that here.