-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix: Remove link action of Link UI for draft pages created from Nav block does not correctly remove link. #52415
Fix: Remove link action of Link UI for draft pages created from Nav block does not correctly remove link. #52415
Conversation
…lock does not correctly remove link.
Size Change: +3.33 kB (0%) Total Size: 1.43 MB
ℹ️ View Unchanged
|
Flaky tests detected in 7f34dc7. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5543535471
|
👋 👋 Thanks for the PR. I'd like to understand if this fix is specific to:
Just want to avoid introducing universal "fixes" which might not be applicable to wider contexts. I'm sure you've look at this but if you can help me understand I'd be very grateful 🙇 |
@getdave This issue seems specific to Draft pages in the Navigation Link Block, but as you mention, the fix proposed in this PR by @jorgefilipecosta is applied upstream. I was also looking into this and had come up with an alternative that addresses the issue in the Navigation Link Block rather than in the |
Reviewing this again in more detail now |
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.
I've review this and it seems to be the best overall fix. We want to avoid being in this preview state internally in the LinkControl if it has no value. It makes no sense UX wise and so we should avoid it.
I added a test for coverage.
…dd/defer-script-loading-strategy * 'trunk' of https://github.com/WordPress/gutenberg: (24 commits) Add filter to turn off Interactivity API for a block (#52579) Search: Remove unnecessary useEffect (#52604) Navigation: Simplify the useSelect for useNavigationMenus (#51977) Item: Unify focus style and add default font styles (#52495) Update Changelog for 16.2.1 Bump plugin version to 16.2.1 Avoid passing undefined `selectedBlockClientId` in `BlockActionsMenu` (#52595) Cover Block: Fix block deprecation when fixed background is enabled (#51612) Nav block: link text color inheritance fixes and tests (#51710) Stabilize defaultBlock, directInsert API's and getDirectInsertBlock selector (#52083) Fix console warning by improving error handling in Nav block classic menu conversion (#52591) Fix: Remove link action of Link UI for draft pages created from Nav block does not correctly remove link. (#52415) Lodash: Remove remaining `_.get()` from block editor and deprecate (#52561) Fix importing classic menus (#52573) ResizableFrame: Make keyboard accessible (#52443) Site Editor: Fix navigation menu sidebar actions order and label (#52592) correct a typo: sapce -> space (#52578) Avoid errors in Dimension visualizers when switching between iframed and non-iframed editors (#52588) Patterns: Add client side pagination to patterns list (#52538) Site Editor: Make sidebar back button go *back* instead of *up* if possible (#52456) ...
Thank you for the fix. Great to have you back 👍 |
Fixes: #50180
Fixes the issue where after removing a link to a draft page we don't go back to creating a new link and instead stay in a state saying link preview is not available which is not useful.