Skip to content
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

Site Editor - Fix NavigateToLink component #27165

Closed
Addison-Stavlo opened this issue Nov 21, 2020 · 6 comments · Fixed by #50908
Closed

Site Editor - Fix NavigateToLink component #27165

Addison-Stavlo opened this issue Nov 21, 2020 · 6 comments · Fixed by #50908
Labels
[Package] Edit Site /packages/edit-site [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Comments

@Addison-Stavlo
Copy link
Contributor

The NavigateToLink component enhances the link-control to allow a user to navigate to that links context within the site editor when applicable. This component seems to have broken at some point in time, as it doesn't seem possible to get it to appear in the link-control (it only appears if it can resolve a context to navigate to).

  • Set a NavLink to a post entity in the site editor.
  • Open the link control and verify there is no NavigateToLink component (edit icon) in the popover.

Upon quick inspection, it seems the props this component is dependent (type and id) on are coming in as undefined.

@Addison-Stavlo Addison-Stavlo added [Type] Bug An existing feature does not function as intended [Feature] Full Site Editing [Package] Edit Site /packages/edit-site labels Nov 21, 2020
@kathrynwp kathrynwp added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Aug 9, 2022
@kathrynwp
Copy link

@Addison-Stavlo Hi there! Are you still able to replicate this with the latest version of WordPress? If so, would you be able to clarify the steps to replicate in a little more detail? Thanks!

@Addison-Stavlo
Copy link
Contributor Author

Oh wow, this is an old one! IF I am remembering the context correctly:

This NavigateToLink component was set up so that when a selects a link within the site editor (like a page in their navigation menu), it would provide an "Edit Page Template" option in that dropdown at the time to navigate the site editor to the template that that page/post would be viewed on. At some point the props to the component got messed up and the option to navigate to that template stopped showing up.

This is a couple years old at this point and it seems this functionality has been broken for a while. This component is still filled into the site editor but that "Edit Page Template" option on a link never shows up.

So IIRC you would repro by:

  • Enter the Site Editor
  • Select a page link
  • open the link control popover (where you would edit the link URL, or open in new tab option)
  • notice there is no "Edit Page Template" option showing up.

@kathrynwp
Copy link

@Addison-Stavlo Ah, thanks for those steps. I just tested and see what you mean, and there is no "edit page template" option showing.

@talldan Would you happen know if this is a feature that's actually meant to be working, since as Addison points out, it's still referenced in the code? Thanks!

@Mamaduka
Copy link
Member

The component is no longer used in the core after #47454.

@draganescu, @getdave, should we remove it?

@getdave
Copy link
Contributor

getdave commented May 24, 2023

I don't see a reason why we need it. We can deprecate it.

@Mamaduka
Copy link
Member

Mamaduka commented May 24, 2023

@getdave, it's not a public component, so we can just remove it. I'll create a PR. Thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Edit Site /packages/edit-site [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants