Repository navigation
Conversation
… is deleted Rather than display UI states to resolve broken links, the user likely wants the link entirely removed. So, instead of displaying a state they need to resolve, let's remove the links for them. If a link is supposed to be bound, we check if the source exists. While a synced navigation link is resolving, we hide it from display. Once it is resolved and valid, we display it.
jeryj
marked this pull request as ready for review
November 11, 2025 17:15
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -229 B (-0.01%) Total Size: 2.42 MB
ℹ️ View Unchanged
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Reverts #73142
Closes #72564
I wanted to try an alternate UX for resolving synced navigation link blocks when their synced source is deleted. Rather than present an Invalid state and error messages, let's assume they also want the synced page they deleted to be removed from the navigation block. Why should we bother giving a user more work (resolving all the invalid links from their navigation) instead of removing them so they don't have to?
Why?
Allowing synced navigation links with deleted sources causes odd UX and increases the code complexity. Instead of allowing this state, it's simpler to prevent these navigation links from rendering.
How?
Add a hasResolvedBoundEntity check when rendering navigation links. If it hasn't resolved, wait to render until we know the synced entity exists.
Some issues/tradeoffs with this approach:
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2025-11-11.at.10.40.04.AM.mov