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

Navigation: Default to creating Page Links #50432

Closed
jasmussen opened this issue May 8, 2023 · 16 comments
Closed

Navigation: Default to creating Page Links #50432

jasmussen opened this issue May 8, 2023 · 16 comments
Assignees
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

In the navigation block, if you go into the "add new menu item" quick inserter, it should default to page links. If you type in a page that doesn't exist, you need to be able to create a new page, or it should become a custom link. This used to work, but may have regressed since the Page Link block doesn't allow you to create a page, but the "custom link" does.

Late in the 6.2 effort, a change was pushed to default to page links again, but was reverted. Let's revisit the reasons causing the revert, and fix those issues so Page Links can be default again.

@jasmussen jasmussen converted this from a draft issue May 8, 2023
@jasmussen jasmussen added Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Block] Navigation Affects the Navigation Block [Block] Navigation Link Affects the Navigation Link Block labels May 8, 2023
@jasmussen jasmussen moved this from Needs issue to Needs feedback in 6.3 Design May 8, 2023
@jasmussen
Copy link
Contributor Author

CC: @scruffian @draganescu as I think you were involved in both the initial PR and can resurface the context that caused us to need to revert. 🙏

@draganescu
Copy link
Contributor

I may be wrong but I am not sure it worked like that ever. The navigation block inserted custom links by default. Page and post are just variations of custom link and we use these variations for specific improvements, like keeping page link URIs in sync. The change was reverted because it created a flow where one would only be able to add a custom link by transforming a page link to a custom link, or something like that.

@jasmussen
Copy link
Contributor Author

The way I see it, the reason we have a "Page Link" variation in the first place, is so that we can suggest pages in the URL link dialog. If we aren't going to do that, we shouldn't have link variations at all. To be clear, I don't think that's a solution, because overwhelmingly when you build out menus on your site, you'll want to link to content on your site.

The change was reverted because it created a flow where one would only be able to add a custom link by transforming a page link to a custom link, or something like that.

I only vaguely recall the slack thread, I recall the use case was valid enough. But it'd be good to get to the bottom of this so we can solve that flow. Custom link, conceptually, are any random link you can add, which has no relation to content on your site.

@draganescu
Copy link
Contributor

@jasmussen I was just adding context - I agree with you that we should improve in the direction of being presented with a LinkUI that favors your site's content and then random external links.

@jasmussen
Copy link
Contributor Author

@richtabor I think you've done some work on the link UI. Will this issue be addressed as part of that work? If yes, then we can maybe connect this one with the link UI tracking issue. What do you think?

@richtabor
Copy link
Member

@richtabor I think you've done some work on the link UI. Will this issue be addressed as part of that work?

Yes, I'll connect the dots. Putting together the issues today.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Jul 19, 2023
@jasmussen
Copy link
Contributor Author

@draganescu just doing a little triage, can we pick this one back up? Does it need to be added to any tracking issues?

@draganescu
Copy link
Contributor

I am investigating the current situation as the comments across the issues confuse me.

@draganescu
Copy link
Contributor

In the navigation block, if you go into the "add new menu item" quick inserter, it should default to page links.

So as it stands now:

  • the appender when it autoinserts blocks in navigation creates a custom link allows users to search for everything
  • if they find and add a page the custom link is converted to a page variation of the custom link.

To change this behavior we'd need to figure out:

  • if everytime I press [+] I get a "page" which is a custom link variation that only searches in pages
  • How do I ever insert a link to a post or an external link?

The reason the original attempt was reverted was b/c the above was not solved and the only way to get any other kind of link when auto insert was active, was to add a bogus page then transform that to custom link. Obvisously a broken design.

Also the question still remains of what is the value of changing the current behavior. The custom link is providing all the tools to find and create pages, to link to posts and to link to external links, all from a simple popover.

If you type in a page that doesn't exist, you need to be able to create a new page, or it should become a custom link. This used to work, but may have regressed since the Page Link block doesn't allow you to create a page, but the "custom link" does.

If you type in a page that doesn't exist, you need to be able to create a new page, or it should become a custom link. This used to work, but may have regressed since the Page Link block doesn't allow you to create a page, but the "custom link" does.

All kinds of links allow for page creation as a default. There is no difference, maybe there was something but now in trunk no matter the variation, if you search you're offered the page creation (draft) option.

That all being said, I think we should close this issue.

@jasmussen
Copy link
Contributor Author

if everytime I press [+] I get a "page" which is a custom link variation that only searches in pages
How do I ever insert a link to a post or an external link?

The problem with dropping you into the custom links field is that it suggests literally anything, whereas it really should suggest pages, which is what you'll arguably be linking to 80% of the time. Here it's suggesting fonts 😅

Screenshot 2023-08-24 at 08 38 58

Can we make it so that when it inserts a page link, it suggests the following scrollable list of pages from #50891:

Screenshot 2023-08-24 at 08 41 07

But as soon as you search, if if you just paste a full URL, it searches everything?

@draganescu
Copy link
Contributor

That is different than what this issue asks for. We need to change what the default suggestions are across the link UI, it may be part of the link control refresh effort, and it's unrelated to the navigation block's functionality.

@jasmussen
Copy link
Contributor Author

I'm not suggesting changing the default suggestions across the link UI. I'm saying the link UI needs to show pages when invoked from the Page Link block, and can show other suggestions when opened from the Custom Link block.

@scruffian
Copy link
Contributor

I created an issue for what I believe is the real issue here: #53904

@draganescu
Copy link
Contributor

I'm not suggesting changing the default suggestions across the link UI. I'm saying the link UI needs to show pages when invoked from the Page Link block, and can show other suggestions when opened from the Custom Link block.

@jasmussen this is already happening: if you add a link item in the navigation block and search for a page, and select it, the custom link block will turn in a page link variation of itself. By effect, if you try to edit the link it will suggest pages. I don't think this is what you want. You want the default suggestions when adding a navigation item to be pages, not after, before the custom link is setup. That change is not about the navigation block "defaulting to pages" it's about improving how we show suggestions.

What needs to happen is to always initially suggest pages. Once the search starts suggest whatever matches but always prioritise pages.

@jasmussen
Copy link
Contributor Author

Happy to close this one if I'm missing nuance, and I'd appreciate @richtabor input as well, as he's been deep in the design of the link control. Just to clarify, given the types of different menu items you might add across pages, posts, categories, links, CPTs, and in principle even types of social links, we have an opportunity for the link control to be aware of the block that opens it, and suggest accordingly. If the link control is a single unified control that always suggests pages (ideally in a scrollable tree-view matching the site structure as outlined), that would be better than what we have today, but it would also make the different menu block variations mostly meaningless. At that point we could have simply a single "Menu Item" block, instead of several different ones. But then you'd have to search for the name of a category to pick one, right?

@draganescu
Copy link
Contributor

At that point we could have simply a single "Menu Item" block, instead of several different ones. But then you'd have to search for the name of a category to pick one, right?

No because we always want to allow users to find what they mean to find when making a link. We can infer that if the link is open from a navigation block we should suggest pages, and prioritize pages in results. That's about it.

Happy to close this one

I'll close it in favor of #53904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs dev
Development

Successfully merging a pull request may close this issue.

5 participants