-
Notifications
You must be signed in to change notification settings - Fork 40
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
[UX][D8] Allow menu items to be created even if no page exists at that path #422
Comments
This change sounds useful as you say. I think as part of this reversion it would also be good to introduce some sort of indication that your path is not yet valid, so that for exampe if you accidentally type in 'mynwpage' intending to point to an existing 'mynewpage' BD wouldnt decline as D7 does, but would still let you know you screwed up the path name. Perhaps with an 'add content on this path' link or such. |
Using autocomplete when typing paths would help in not screwing them up. I've been wanting to mention modules like Special Menu Items/Menu Item Container since Jen filed this a few days ago. These modules allow you to add menu items that do not point to a page/URL at all therefore acting either as placeholders/containers (parent menu items that hold ones that do point to a page/URL) or simple separators. Then, there's also the fantastic, amazing, super-duper Content Menu module that allows people to build their website in a menu-centric workflow. It allows to create a menu structure with "dummy" targets as well. But it's real strength is the fact that it also allows you to create a menu item and at the same time pick a content type and create a page for the item as a second step in a wizard-like workflow! Once done, you return to the menu edit page to either add more items or edit the content they link to directly from the menu edit page. Anyways, watch the screencast. I think that if a feature like this was added to backdrop, it would get the same spontaneous applause reaction that layouts got. Edit: ...Content Menu allows to add a menu item linking to an existing piece of content by browsing and selecting the existing content instead of having you type its path. So, not many chances of mistypes there. |
Maybe also relevant: allow people to add links to paths they don't have access to. In D7 even user 1 can't add a link to a custom menu callback that's only for non-admins, etc. |
Moving this to 1.x-future. We can get this in at any time, but I have a feeling this could take a while to get right. |
Overall the PR at backdrop/backdrop#549 looks good, but I've closed it for the time being until tests can be updated to get them passing, and tests are added to ensure the new functionality works as expected. |
Redirect module has an interesting UI that might be helpful here. When creating redirects, it gives you a warning if you're about to do something that might cause a problem, e.g. redirecting from I'm not sure it would be helpful from a UI standpoint if we did the same thing for menu items. It's a lot more code and it's slightly ugly to implement, but it's an interesting pattern to warn the user "hey, you might be doing something wrong" but leave it to them if they want to do it anyway. For something like menu items however, I'm not sure that making up menu paths would really be "wrong" in the first place. Like Jen said in the original issue, it might be completely common for users to fill out their menu first and make the pages later. |
Another fun possibility that we could borrow from redirect: Add links to create content on 404 pages. We could add links for "Add a piece of content here" (though how we would manage the type of content I'm not sure) or "Add a view here" or "Add a layout here"... Hmm this is getting overwhelming fast. 🤷 |
That launches a dialog with options:
Just thinking. How you'd pass the path to views UI, Layout UI etc I have no idea. But it would be cool though. |
...(something like) this has been (re)implemented in Drupal 8.2.x (existed in D6, was removed in D7), so this effectively makes this issue here part of #378 ...adding it to that list. |
This seems to be considered a major UX win in the 2015 D8 Usability Test (#2004). |
Noting that if the solution we go with here includes a warning (instead of an error), that warning needs to account of valid/existing file paths too (see #3945). |
Back in the Drupal 5 days, people used to be able to build out their menus first, and then add pages later. At some point this became impossible, and when a path was entered into the menu UI that didn't have a page yet, an error message was generated.
I would like to revert this change, and make it again possible to stub out a menu first - without the associated pages.
This will require some significant adjustments to the menu access system. In particular, we'll need to stop checking access to each menu item (link) on any interface where menu items (links) are being administered. I would also like to get rid of the stupid global
$menu_admin
which seems to just be a cheat so arguments didn't need to be added to all the access checking functions. We will of course then need to add these arguments to all the access checking functions.The text was updated successfully, but these errors were encountered: