-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Alt: handle synced deleted source navigation link #73168
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
base: trunk
Are you sure you want to change the base?
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.
|
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
|
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